From e8048707f7a56e52d8664ece8a4adbf958c0001e Mon Sep 17 00:00:00 2001 From: fpantano Date: Wed, 30 Oct 2019 12:57:47 +0100 Subject: [PATCH] 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 --- deployment/ceph-ansible/ceph-base.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deployment/ceph-ansible/ceph-base.yaml b/deployment/ceph-ansible/ceph-base.yaml index fbfd8b3fc7..800e95991f 100644 --- a/deployment/ceph-ansible/ceph-base.yaml +++ b/deployment/ceph-ansible/ceph-base.yaml @@ -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: