client.yml 763 B

12345678910111213141516171819202122232425262728
  1. ---
  2. # tasks/client.yml: Deploy various client-side configurations for Sensu
  3. - name: Include ansible_distribution vars
  4. include_vars:
  5. file: "{{ ansible_distribution }}.yml"
  6. tags: client
  7. - name: Deploy Sensu client service configuration
  8. tags: client
  9. template:
  10. dest: "{{ sensu_config_path }}/conf.d/client.json"
  11. owner: "{{ sensu_user_name }}"
  12. group: "{{ sensu_group_name }}"
  13. src: "{{ sensu_client_config }}"
  14. mode: "0640"
  15. notify: restart sensu-client service
  16. - include_tasks: "{{ role_path }}/tasks/SmartOS/client.yml"
  17. tags: client
  18. when: ansible_distribution == "SmartOS"
  19. - name: Ensure Sensu client service is running
  20. tags: client
  21. service:
  22. name: "{{ sensu_client_service_name }}"
  23. state: started
  24. enabled: yes