Skip to content

Commit

Permalink
Restart services when init scripts/services change
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkza committed Nov 25, 2016
1 parent 14e1ac7 commit 2717edf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tasks/sentinel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
paths:
- ../templates
when: redis_as_service and ansible_service_mgr|default() != 'systemd'
notify: restart sentinel

- name: create sentinel systemd service
template:
Expand All @@ -33,6 +34,8 @@
paths:
- ../templates
when: redis_as_service and ansible_service_mgr|default() == 'systemd'
notify: restart sentinel


- name: set sentinel to start at boot
service:
Expand Down
2 changes: 2 additions & 0 deletions tasks/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
paths:
- ../templates
when: redis_as_service and ansible_service_mgr | default != 'systemd'
notify: restart redis

- name: create redis systemd service
template:
Expand All @@ -33,6 +34,7 @@
paths:
- ../templates
when: redis_as_service and ansible_service_mgr | default == 'systemd'
notify: restart redis

- name: set redis to start at boot
service:
Expand Down

0 comments on commit 2717edf

Please sign in to comment.