diff --git a/ansible/roles/ceph/tasks/upgrade.yml b/ansible/roles/ceph/tasks/upgrade.yml index 6de4f2c343..659c78820c 100644 --- a/ansible/roles/ceph/tasks/upgrade.yml +++ b/ansible/roles/ceph/tasks/upgrade.yml @@ -3,7 +3,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] }}" @@ -11,7 +11,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