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.

55 lines
1.0 KiB

  1. ---
  2. - hosts: biff
  3. roles:
  4. - role: lxc_guest
  5. vm_name: logger
  6. - role: ssh_server
  7. ansible_connection: ssh_lxc
  8. ansible_ssh_lxc_name: logger
  9. - hosts: all
  10. tasks:
  11. - name: Install rsyslog on client
  12. apt:
  13. name: rsyslog
  14. update_cache: yes
  15. - hosts: logger
  16. tasks:
  17. - name: Configure rsyslog server
  18. blockinfile:
  19. block: >
  20. $ModLoad imudp
  21. $UDPServerRun 514
  22. $$ModLoad imtcp
  23. $InputTCPServerRun 514
  24. dest: /etc/rsyslog.conf
  25. state: present
  26. - name: Enable rsyslog on server
  27. service:
  28. name: rsyslog
  29. enabled: yes
  30. state: started
  31. - hosts: all
  32. vars:
  33. - log_destination:
  34. tasks:
  35. - name: Configure rsyslog client
  36. template:
  37. dest: /etc/rsyslog.d/50-default.conf
  38. src: templates/rsyslog_client.conf
  39. - name: Enable rsyslog on client
  40. service:
  41. name: rsyslog
  42. enabled: yes
  43. state: started
  44. - hosts: status
  45. roles:
  46. - role: icinga2-monitoring