Implement consistent restart handlers
Retries and daemon reloads are added to all the handlers and the ordering of each task is set out according to the same pattern as they keystone role. Change-Id: Icc250e811fb89024f3f3c2f9520d1a6c9c21f0d3
This commit is contained in:
parent
6eb316499f
commit
a8997f8cfd
@ -16,35 +16,66 @@
|
||||
- name: reload nginx
|
||||
service:
|
||||
name: "nginx"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
register: _restart
|
||||
until: _restart | success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: reload rsyncd
|
||||
service:
|
||||
name: "{{ rsyncd_service_name }}"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
register: _restart
|
||||
until: _restart | success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: reload acng
|
||||
service:
|
||||
name: "apt-cacher-ng"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
register: _restart
|
||||
until: _restart | success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: reload lsyncd
|
||||
service:
|
||||
name: "lsyncd"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
register: _restart
|
||||
until: _restart | success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: reload git-daemon
|
||||
service:
|
||||
name: "git-daemon"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
register: _restart
|
||||
until: _restart | success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: reload git socket
|
||||
service:
|
||||
name: "git.socket"
|
||||
state: restarted
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
register: _restart
|
||||
until: _restart | success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user