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.

49 lines
895 B

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