| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- ---
- # tasks/common.yml: Deploy configurations common to client and server for Sensu
- - include_vars: "{{ ansible_distribution }}.yml"
- - name: Ensure the Sensu config directory is present
- file:
- dest: "{{ sensu_config_path }}/conf.d"
- state: directory
- owner: "{{ sensu_user_name }}"
- group: "{{ sensu_group_name }}"
- - name: Deploy Sensu Redis configuration
- template:
- dest: "{{ sensu_config_path }}/conf.d/redis.json"
- owner: "{{ sensu_user_name }}"
- group: "{{ sensu_group_name }}"
- src: "{{ sensu_redis_config }}"
- when: sensu_deploy_redis
- notify:
- - restart sensu-server service
- - restart sensu-api service
- - restart sensu-enterprise service
- - restart sensu-client service
- - name: Deploy Sensu RabbitMQ configuration
- template:
- dest: "{{ sensu_config_path }}/conf.d/rabbitmq.json"
- owner: "{{ sensu_user_name }}"
- group: "{{ sensu_group_name }}"
- src: "{{ sensu_rabbitmq_config }}"
- when: sensu_transport == "rabbitmq"
- notify:
- - restart sensu-server service
- - restart sensu-api service
- - restart sensu-enterprise service
- - restart sensu-client service
- - name: Deploy Sensu transport configuration
- template:
- dest: "{{ sensu_config_path }}/conf.d/transport.json"
- owner: "{{ sensu_user_name }}"
- group: "{{ sensu_group_name }}"
- src: transport.json.j2
- notify:
- - restart sensu-server service
- - restart sensu-api service
- - restart sensu-enterprise service
- - restart sensu-client service
|