Add mon address to ceph release version check

Change-Id: Ia4801d09ff1165c44561fd286fc57e903da2c602
This commit is contained in:
Michal Nasiadka 2019-07-05 08:45:22 +02:00
parent 26f2aecfa1
commit b2c17d6051
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@
- name: Check final release (as running on MONs) - name: Check final release (as running on MONs)
become: true 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 changed_when: false
register: ceph_release_command register: ceph_release_command
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
@ -45,7 +45,7 @@
- name: Finalize the upgrade by disallowing older OSDs - name: Finalize the upgrade by disallowing older OSDs
become: true 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 changed_when: false
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
run_once: true run_once: true