Adds ceph-systemd tag in external_upgrade_tasks for systemd units
When upgrading the host operating system we'll also replace docker with podman; ceph-ansible provides for a special playbook meant to refresh the systemd units to work with podman. This change adds a task which on upgrade will execute the special playbook. It requires ceph_ansible_limit to be set by the user as that gets translated into a --limit option for the playbook execution so that it runs only against a specific node undergoing upgrade of the host operating system. Change-Id: I99bc5342360e307a9ee499cde5f2a0b5d78170f8 (cherry picked from commite8048707f7
) (cherry picked from commite866739b6c
)
This commit is contained in:
parent
e4a70940db
commit
3ec4d25cbb
|
@ -710,6 +710,7 @@ outputs:
|
|||
- '{{playbook_dir}}/ceph-ansible/inventory.yml'
|
||||
- '--extra-vars'
|
||||
- '@{{playbook_dir}}/ceph-ansible/extra_vars.yml'
|
||||
- '{% if ceph_ansible_limit is defined and ceph_ansible_limit|length > 0 %}--limit {{ ceph_ansible_limit }}{% endif %}'
|
||||
- name: run ceph-ansible (immediate log at {{playbook_dir}}/ceph-ansible/ceph_ansible_command.log)
|
||||
# needs become to be able to read the ssh private key
|
||||
become: true
|
||||
|
@ -784,6 +785,16 @@ outputs:
|
|||
set_fact:
|
||||
ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/rolling_update.yml"]
|
||||
external_upgrade_tasks:
|
||||
- when: step|int == 0
|
||||
tags: ceph-systemd
|
||||
block:
|
||||
- name: stop if _limit is unset
|
||||
fail:
|
||||
msg: The ceph-ansible systemd units migration playbook limit is not set; please use -e ceph_ansible_limit=##nodename##
|
||||
when: (ceph_ansible_limit is not defined) or (ceph_ansible_limit|length == 0)
|
||||
- name: set ceph_ansible_playbooks_default
|
||||
set_fact:
|
||||
ceph_ansible_playbooks_default: ["/usr/share/ceph-ansible/infrastructure-playbooks/docker-to-podman.yml"]
|
||||
- when: step|int == 0
|
||||
tags: ceph
|
||||
block:
|
||||
|
|
Loading…
Reference in New Issue