From b2c17d60515bbbe283f534d7d0c9034e57589929 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Fri, 5 Jul 2019 08:45:22 +0200 Subject: [PATCH] Add mon address to ceph release version check Change-Id: Ia4801d09ff1165c44561fd286fc57e903da2c602 --- ansible/roles/ceph/tasks/upgrade.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/ceph/tasks/upgrade.yml b/ansible/roles/ceph/tasks/upgrade.yml index 0669732510..d26c5a036b 100644 --- a/ansible/roles/ceph/tasks/upgrade.yml +++ b/ansible/roles/ceph/tasks/upgrade.yml @@ -37,7 +37,7 @@ - name: Check final release (as running on MONs) become: true - shell: docker exec ceph_mon ceph version | cut -d' ' -f5 + command: "docker exec ceph_mon ceph -m {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }} versions" changed_when: false register: ceph_release_command delegate_to: "{{ groups['ceph-mon'][0] }}" @@ -45,7 +45,7 @@ - name: Finalize the upgrade by disallowing older OSDs become: true - command: docker exec ceph_mon ceph osd require-osd-release {{ ceph_release_command.stdout }} + command: "docker exec ceph_mon ceph -m {{ hostvars[inventory_hostname]['ansible_' + storage_interface]['ipv4']['address'] }} osd require-osd-release {{ ((ceph_release_command.stdout|from_json).mon | string).split(' ')[4] }}" changed_when: false delegate_to: "{{ groups['ceph-mon'][0] }}" run_once: true