Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.6 KiB

  1. ---
  2. - hosts: vm_hosts
  3. roles:
  4. - role: ssh_server
  5. vars:
  6. management_vlan: 9
  7. virtual_machine_vlan: 13
  8. tasks:
  9. - name: install lxc related packages
  10. apt:
  11. name: "{{ item }}"
  12. state: present
  13. update_cache: yes
  14. cache_valid_time: 3600
  15. with_items:
  16. - lxc
  17. - python
  18. - python-lxc
  19. - name: install network bridge utilities
  20. apt:
  21. name: "{{ item }}"
  22. state: present
  23. update_cache: yes
  24. cache_valid_time: 3600
  25. with_items:
  26. - bridge-utils
  27. - vlan
  28. notify: restart networking
  29. # We should fix this bug. We really should. It's a bug.
  30. # Bridge-utils requires a complete system reboot to enable the new bridge.
  31. - name: configure network bridge with vlans
  32. template:
  33. src: templates/interfaces.j2
  34. dest: /etc/network/interfaces
  35. notify: restart networking
  36. - name: install utilities
  37. apt:
  38. name: "{{ item }}"
  39. state: present
  40. update_cache: yes
  41. cache_valid_time: 3600
  42. with_items:
  43. - vim
  44. - htop
  45. - name: enable lvm wipe signature
  46. lineinfile:
  47. dest: /etc/lvm/lvm.conf
  48. state: present
  49. line: " wipe_signatures_when_zeroing_new_lvs = 0"
  50. regexp: '^\s*.+wipe_signatures_when_zeroing_new_lvs = '
  51. notify: restart lvm
  52. handlers:
  53. - name: restart networking
  54. service:
  55. name: networking
  56. state: restarted
  57. - name: restart lvm
  58. shell: /etc/init.d/lvm2 reload
  59. - hosts: status
  60. roles:
  61. - role: icinga2-monitoring