Fix a few more extraneous splits

Just use this_node if applicable, or the raw node.hostname.
This commit is contained in:
2023-09-01 15:42:28 -04:00
parent 87803cb7a2
commit 95b47f8b09
3 changed files with 7 additions and 7 deletions

View File

@ -34,11 +34,11 @@
# 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
shell: "{% if is_coordinator %}sleep {{ 30 * (hostvars[inventory_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mon@{{ inventory_hostname.split('.')[0] }}.service{% endif %}"
shell: "{% if is_coordinator %}sleep {{ 30 * (hostvars[inventory_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mon@{{ this_node }}.service{% endif %}"
ignore_errors: true
- name: restart ceph-mgr
shell: "{% if is_coordinator %}sleep {{ 30 * (hostvars[inventory_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mgr@{{ inventory_hostname.split('.')[0] }}.service{% endif %}"
shell: "{% if is_coordinator %}sleep {{ 30 * (hostvars[inventory_hostname].ansible_local.host_id|int - 1) }} && systemctl restart ceph-mgr@{{ this_node }}.service{% endif %}"
ignore_errors: true
- name: restart pvcnoded