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
Depends-On: I4538d64ed49b4a6e4670d1e1d050fc5443e2edb0
This commit is contained in:
fpantano 2019-10-30 12:57:47 +01:00
parent f157e1afb1
commit e8048707f7

View File

@ -604,6 +604,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: