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.

79 lines
1.8 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. notify: load xfs module
  23. - name: autoload xfs module
  24. copy:
  25. content: "xfs\n"
  26. dest: /etc/modules-load.d/xfs.conf
  27. notify: load xfs module
  28. - name: install network bridge utilities
  29. apt:
  30. pkg:
  31. - bridge-utils
  32. - vlan
  33. state: present
  34. update_cache: yes
  35. cache_valid_time: 3600
  36. notify: restart networking
  37. # We should fix this bug. We really should. It's a bug.
  38. # Bridge-utils requires a complete system reboot to enable the new bridge.
  39. - name: configure network bridge with vlans
  40. template:
  41. src: templates/interfaces.j2
  42. dest: /etc/network/interfaces
  43. notify: restart networking
  44. - name: install utilities
  45. apt:
  46. pkg:
  47. - vim
  48. - htop
  49. state: present
  50. update_cache: yes
  51. cache_valid_time: 3600
  52. - name: enable lvm wipe signature
  53. lineinfile:
  54. dest: /etc/lvm/lvm.conf
  55. state: present
  56. line: " wipe_signatures_when_zeroing_new_lvs = 0"
  57. regexp: '^\s*.+wipe_signatures_when_zeroing_new_lvs = '
  58. notify: restart lvm
  59. handlers:
  60. - name: restart networking
  61. service:
  62. name: networking
  63. state: restarted
  64. - name: restart lvm
  65. shell: /etc/init.d/lvm2 reload
  66. - name: load xfs module
  67. modprobe:
  68. name: xfs
  69. state: present
  70. - hosts: status
  71. roles:
  72. - role: icinga2-monitoring