client.yml 711 B

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