12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- - name: 'Install Ganeti related packages'
- apt:
- pkg:
- - 'ganeti'
- - 'ganeti-instance-debootstrap'
- - 'drbd-utils'
- - 'dnsutils'
- install_recommends: 'no'
- state: 'present'
- tags:
- - 'hypervisor'
- - 'ganeti'
- - name: 'Install ganeti instances templates for debootstrap'
- template:
- src: 'ganeti/instance-debootstrap/{{ item }}.conf.j2'
- dest: '/etc/ganeti/instance-debootstrap/variants/{{ item }}.conf'
- owner: 'root'
- group: 'root'
- mode: '0644'
- with_items:
- - 'jessie'
- - 'stretch'
- - 'buster'
- tags:
- - 'hypervisor'
- - 'ganeti'
- - name: 'Enable ganeti instances templates for debootstrap'
- lineinfile:
- dest: '/etc/ganeti/instance-debootstrap/variants.list'
- regexp: '^{{ item }}$'
- line: '{{ item }}'
- owner: 'root'
- group: 'root'
- mode: '0644'
- with_items:
- - 'jessie'
- - 'stretch'
- - 'buster'
- tags:
- - 'hypervisor'
- - 'ganeti'
- - name: 'Exclude DRBD devices from lvm devices while using ganeti'
- blockinfile:
- dest: '/etc/lvm/lvm.conf'
- marker: ' # ======= {mark} Exclude DRBD devices while using ganeti (managed by ansible) ======'
- content: ' filter = ["r|/dev/drbd[0-9]+|"]'
- insertafter: '^\s*devices\s+{'
- tags:
- - 'hypervisor'
- - 'ganeti'
- - name: 'Add options for kernel modules while using ganeti'
- template:
- src: 'ganeti/kernel/modprobe.conf.j2'
- dest: '/etc/modprobe.d/ganeti.conf'
- owner: 'root'
- group: 'root'
- mode: '0644'
- notify:
- - 'Rebuild initramfs'
- tags:
- - 'hypervisor'
- - 'ganeti'
- - name: 'Add kernel modules to load while using ganeti'
- template:
- src: 'ganeti/kernel/modules.conf.j2'
- dest: '/etc/modules-load.d/ganeti.conf'
- owner: 'root'
- group: 'root'
- mode: '0644'
- tags:
- - 'hypervisor'
- - 'ganeti'
- # vim: ft=yaml.ansible
|