client.yml 695 B

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