- name: deploy drbd hosts: "{{target}}" gather_facts: no become: "{{ become_var | default(false) }}" tasks: # check for drbd kernel module - name: v9 in da place shell: executable: /bin/bash cmd: | ls -lhF /lib/modules/`uname -r`/updates/drbd.ko ls -lhF /lib/modules/`uname -r`/updates/drbd_transport_rdma.ko ls -lhF /lib/modules/`uname -r`/updates/drbd_transport_tcp.ko changed_when: false check_mode: false register: output - debug: var=output.stdout # todo - check for zfs kernel module when storage is zfs - name: define nodes set_fact: nodes: "{{ groups[cluster] }}" - debug: var=nodes - name: drbd overal config copy: src: drbd.conf dest: /etc/drbd.conf - name: clean-up defaults file: path: /etc/drbd.d/global_common.conf state: absent # todo - keep nodes defined from ansible or switch to dnc.conf? # note - this is a manual sync script that is being used for initial setup # ideally not necessary once DNC is up - name: sync drbd resources script template: src: sync dest: /root/sync mode: 0755 - include_tasks: "4-storage-incl-{{system}}.yml" - include_tasks: "4-storage-incl-zfs.yml" when: storage == 'zfs'