Skip to content

Commit

Permalink
Facilitate to notify services using the same config file
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyr committed Mar 2, 2015
1 parent 806c3d9 commit c77c6e8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
11 changes: 9 additions & 2 deletions tasks/api.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---

- name: Create Sensu API config
- name: Create Sensu API specific config
template:
src: config.json.j2
dest: /etc/sensu/config.json
dest: /etc/sensu/config_api.json
notify: Restart sensu-api

- name: Create symlink to the main config for sensu-api
file:
src: /etc/sensu/config_api.json
dest: /etc/sensu/config.json
state: link
when: sensu_install_api and not sensu_install_server

- name: Make sure sensu-api is enabled and started
service:
name: sensu-api
Expand Down
12 changes: 10 additions & 2 deletions tasks/server.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
---

- name: Create Sensu server config
- name: Create Sensu server specific config
template:
src: config.json.j2
dest: /etc/sensu/config.json
dest: /etc/sensu/config_server.json
notify: Restart sensu-server

- name: Create symlink to the main config for sensu-server
file:
src: /etc/sensu/config_server.json
dest: /etc/sensu/config.json
state: link
force: yes
when: sensu_install_server

- name: Make sure Sensu server services are enabled and started
service:
name: sensu-server
Expand Down

0 comments on commit c77c6e8

Please sign in to comment.