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.

68 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. pkg:
  12. - lxc
  13. - python3
  14. - python3-lxc
  15. state: present
  16. update_cache: yes
  17. cache_valid_time: 3600
  18. - name: install common lxc filesystem support
  19. apt:
  20. name: xfsprogs
  21. state: present
  22. - name: install network bridge utilities
  23. apt:
  24. pkg:
  25. - bridge-utils
  26. - vlan
  27. state: present
  28. update_cache: yes
  29. cache_valid_time: 3600
  30. notify: restart networking
  31. # We should fix this bug. We really should. It's a bug.
  32. # Bridge-utils requires a complete system reboot to enable the new bridge.
  33. - name: configure network bridge with vlans
  34. template:
  35. src: templates/interfaces.j2
  36. dest: /etc/network/interfaces
  37. notify: restart networking
  38. - name: install utilities
  39. apt:
  40. pkg:
  41. - vim
  42. - htop
  43. state: present
  44. update_cache: yes
  45. cache_valid_time: 3600
  46. - name: enable lvm wipe signature
  47. lineinfile:
  48. dest: /etc/lvm/lvm.conf
  49. state: present
  50. line: " wipe_signatures_when_zeroing_new_lvs = 0"
  51. regexp: '^\s*.+wipe_signatures_when_zeroing_new_lvs = '
  52. notify: restart lvm
  53. handlers:
  54. - name: restart networking
  55. service:
  56. name: networking
  57. state: restarted
  58. - name: restart lvm
  59. shell: /etc/init.d/lvm2 reload
  60. - hosts: status
  61. roles:
  62. - role: icinga2-monitoring