client.yml 1021 B

12345678910111213141516171819202122232425262728
  1. ---
  2. # tasks/client.yml: Deploy various client-side configurations for Sensu
  3. - include_vars: "{{ item }}"
  4. with_first_found:
  5. - "{{ ansible_distribution }}.yml"
  6. - "{{ ansible_os_family }}.yml"
  7. - default.yml
  8. - name: Deploy Sensu client RabbitMQ configuration
  9. template: dest="{{ sensu_config_path }}/conf.d/rabbitmq.json"
  10. owner={{ sensu_user_name }} group={{ sensu_group_name }}
  11. src=rabbitmq.json.j2
  12. notify: restart sensu-client service
  13. - name: Deploy Sensu client service configuration
  14. template: dest="{{ sensu_config_path }}/conf.d/client.json"
  15. owner={{ sensu_user_name }} group={{ sensu_group_name }}
  16. src={{ sensu_client_config }}
  17. notify: restart sensu-client service
  18. - include: "{{ item }}"
  19. with_first_found:
  20. - "{{ ansible_distribution }}/client.yml"
  21. - "{{ ansible_os_family }}/client.yml"
  22. - name: Ensure Sensu client service is running
  23. service: name=sensu-client state=started enabled=yes