client.yml 1.1 KB

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. - name: Ensure the Sensu config directory is present
  7. file: dest={{ sensu_config_path }}/conf.d state=directory recurse=yes
  8. owner={{ sensu_user_name }} group={{ sensu_group_name }}
  9. - name: Deploy Sensu client RabbitMQ configuration
  10. template: dest="{{ sensu_config_path }}/conf.d/rabbitmq.json"
  11. owner={{ sensu_user_name }} group={{ sensu_group_name }}
  12. src=rabbitmq.json.j2
  13. notify: restart sensu-client service
  14. - name: Deploy Sensu client service configuration
  15. template: dest="{{ sensu_config_path }}/conf.d/client.json"
  16. owner={{ sensu_user_name }} group={{ sensu_group_name }}
  17. src={{ sensu_client_config }}
  18. notify: restart sensu-client service
  19. - include: SmartOS/client.yml
  20. when: ansible_distribution == "SmartOS"
  21. - name: Ensure Sensu client service is running
  22. service: name=sensu-client state=started enabled=yes