Apply fix with some tweaks to other serial handlers
This commit is contained in:
parent
15768130e2
commit
372b949930
|
@ -30,14 +30,16 @@
|
||||||
# * etc.
|
# * etc.
|
||||||
# This results in a practical sense in a "serial=1" sequence of restarts allowing the service
|
# This results in a practical sense in a "serial=1" sequence of restarts allowing the service
|
||||||
# to float its primary around after changing a configuration.
|
# to float its primary around after changing a configuration.
|
||||||
|
# Note that this only applies to coordinators; hypervisor-only nodes restart immediately in
|
||||||
|
# parallel, and the first two of three handlers do not apply to hypervisor-only nodes.
|
||||||
- name: restart ceph-mon
|
- name: restart ceph-mon
|
||||||
shell: sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mon@{{ ansible_hostname }}.service
|
shell: "{% if is_coordinator %}sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mon@{{ ansible_hostname }}.service{% endif %}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: restart ceph-mgr
|
- name: restart ceph-mgr
|
||||||
shell: sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mgr@{{ ansible_hostname }}.service
|
shell: "{% if is_coordinator %}sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mgr@{{ ansible_hostname }}.service{% endif %}"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: restart pvcd
|
- name: restart pvcd
|
||||||
shell: sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} && systemctl restart pvcd.service
|
shell: "{% if is_coordinator %}sleep {{ 15 * (hostvars[ansible_hostname].ansible_local.host_id|int - 1) }} &&{% endif %} systemctl restart pvcd.service"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
Loading…
Reference in New Issue