42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
|
- name: Clone ZFS extsotarge module
|
||
|
ansible.builtin.git:
|
||
|
repo: https://github.com/brigriffin/ganeti-extstorage-zfs.git
|
||
|
dest: /usr/share/ganeti/extstorage/zfs
|
||
|
single_branch: true
|
||
|
version: master
|
||
|
force: true
|
||
|
|
||
|
- name: Set zpool for extstorage module
|
||
|
ansible.builtin.template:
|
||
|
src: exstorage.sh.j2
|
||
|
dest: /usr/share/ganeti/extstorage/zfs/etc/ganeti-{{ groups['nodes'].index(inventory_hostname) + 1 }}.sh
|
||
|
mode: "0644"
|
||
|
|
||
|
- name: Make everything executable
|
||
|
ansible.builtin.file:
|
||
|
dest: /usr/share/ganeti/extstorage/zfs
|
||
|
recurse: true
|
||
|
mode: "0755"
|
||
|
|
||
|
- name: Enable ext template
|
||
|
ansible.builtin.command:
|
||
|
cmd: /usr/share/ganeti/extstorage/zfs/install/1-enable-ext-template.sh
|
||
|
chdir: /usr/share/ganeti/extstorage/zfs/install/
|
||
|
register: enable_ext_template_result
|
||
|
changed_when: enable_ext_template_result.rc == 0
|
||
|
when: inventory_hostname in groups['master']
|
||
|
|
||
|
- name: Create log directory
|
||
|
ansible.builtin.command:
|
||
|
cmd: /usr/share/ganeti/extstorage/zfs/install/2-create-log-directory.sh
|
||
|
chdir: /usr/share/ganeti/extstorage/zfs/install/
|
||
|
creates: /var/log/ganeti/extstorage
|
||
|
register: create_log_directory_result
|
||
|
|
||
|
- name: Create lvm wrappers
|
||
|
ansible.builtin.command:
|
||
|
cmd: /usr/share/ganeti/extstorage/zfs/install/3-lvm-wrappers.sh
|
||
|
chdir: /usr/share/ganeti/extstorage/zfs/install/
|
||
|
register: lvm_wrappers_result
|
||
|
changed_when: lvm_wrappers_result.rc == 0
|