mirror of https://github.com/ceph/ceph-ansible.git
update: fix var register
Even if the task is skipped, ansible registers the var as 'skipped' so this task the task using this variable for its next usage. Signed-off-by: Sébastien Han <seb@redhat.com>pull/1939/head
parent
ca76c46981
commit
b9050d6229
|
@ -312,37 +312,24 @@
|
|||
- ceph-defaults
|
||||
|
||||
tasks:
|
||||
- name: unset osd flags
|
||||
command: ceph osd unset {{ item }} --cluster {{ cluster }}
|
||||
with_items:
|
||||
- noout
|
||||
- noscrub
|
||||
- nodeep-scrub
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
when: not containerized_deployment
|
||||
- name: set_fact docker_exec_cmd_osd
|
||||
set_fact:
|
||||
docker_exec_cmd_update_osd: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
||||
when:
|
||||
- containerized_deployment
|
||||
|
||||
- name: unset containerized osd flags
|
||||
command: |
|
||||
docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph osd unset {{ item }} --cluster {{ cluster }}
|
||||
- name: unset osd flags
|
||||
command: "{{ docker_exec_cmd_update_osd|default('') }} ceph osd unset {{ item }} --cluster {{ cluster }}"
|
||||
with_items:
|
||||
- noout
|
||||
- noscrub
|
||||
- nodeep-scrub
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
when: containerized_deployment
|
||||
|
||||
- name: get osd versions
|
||||
command: ceph --cluster {{ cluster }} versions
|
||||
command: "{{ docker_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} versions"
|
||||
register: ceph_versions
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
when: not containerized_deployment
|
||||
|
||||
- name: containers - get osd versions
|
||||
command: |
|
||||
docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} versions
|
||||
register: ceph_versions
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
when: containerized_deployment
|
||||
|
||||
- name: set_fact ceph_versions_osd
|
||||
set_fact:
|
||||
|
@ -352,21 +339,12 @@
|
|||
# length == 1 means there is a single osds versions entry
|
||||
# thus all the osds are running the same version
|
||||
- name: complete osds upgrade
|
||||
command: ceph --cluster {{ cluster }} osd require-osd-release luminous
|
||||
command: "{{ docker_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} osd require-osd-release luminous"
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
when:
|
||||
- not containerized_deployment
|
||||
- (ceph_versions.stdout|from_json).osd | length == 1
|
||||
- ceph_versions_osd | string | search("ceph version 12")
|
||||
|
||||
- name: containers - complete osds upgrade
|
||||
command: |
|
||||
docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} osd require-osd-release luminous
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
when:
|
||||
- containerized_deployment
|
||||
- (ceph_versions.stdout|from_json).osd | length == 1
|
||||
- ceph_versions_osd | string | search("ceph version 12")
|
||||
|
||||
- name: upgrade ceph mdss cluster
|
||||
|
||||
|
|
Loading…
Reference in New Issue