From c878e99589bde0eecb8ac72a7ec8bc1f66403eeb Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 18 Nov 2019 18:12:00 +0100 Subject: [PATCH] update: only run post osd upgrade play on 1 mon There is no need to run these tasks n times from each monitor. Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/rolling_update.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index e7abec455..7930aa3ce 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -470,7 +470,7 @@ - name: complete osd upgrade - hosts: "{{ mon_group_name|default('mons') }}" + hosts: "{{ mon_group_name|default('mons') }}[0]" become: True tasks: - import_role: @@ -492,18 +492,15 @@ - name: get osd versions command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} versions" register: ceph_versions - delegate_to: "{{ groups[mon_group_name][0] }}" - name: set_fact ceph_versions_osd set_fact: ceph_versions_osd: "{{ (ceph_versions.stdout|from_json).osd }}" - delegate_to: "{{ groups[mon_group_name][0] }}" # length == 1 means there is a single osds versions entry # thus all the osds are running the same version - name: complete osds upgrade command: "{{ container_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} osd require-osd-release luminous" - delegate_to: "{{ groups[mon_group_name][0] }}" when: - (ceph_versions.get('stdout', '{}')|from_json).get('osd', {}) | length == 1 - ceph_versions_osd | string is search("ceph version 12") -- 2.39.5