client.yml 676 B

12345678910111213141516171819202122
  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. notify: restart sensu-client service
  11. - include: "{{ role_path }}/tasks/SmartOS/client.yml"
  12. when: ansible_distribution == "SmartOS"
  13. static: false
  14. - name: Ensure Sensu client service is running
  15. service:
  16. name: "{{ sensu_client_service_name }}"
  17. state: started
  18. enabled: yes