roles:
- ceph-defaults
+ - ceph-config
- { role: ceph-common, when: not containerized_deployment }
- { role: ceph-docker-common, when: containerized_deployment }
- ceph-mon
roles:
- ceph-defaults
+ - ceph-config
- { role: ceph-common, when: not containerized_deployment }
- { role: ceph-docker-common, when: containerized_deployment }
- ceph-osd
roles:
- ceph-defaults
+ - ceph-config
- { role: ceph-common, when: not containerized_deployment }
- { role: ceph-docker-common, when: containerized_deployment }
- ceph-mds
roles:
- ceph-defaults
+ - ceph-config
- { role: ceph-common, when: not containerized_deployment }
- { role: ceph-docker-common, when: containerized_deployment }
- ceph-rgw
roles:
- ceph-defaults
- - ceph-common
+ - ceph-config
+ - { role: ceph-common, when: not containerized_deployment }
+ - { role: ceph-docker-common, when: containerized_deployment }
- ceph-client
+
+
+- name: upgrade ceph mgr node
+
+ vars:
+ upgrade_ceph_packages: True
+
+ hosts:
+ - "{{ mgr_group_name|default('mgrs') }}"
+
+ serial: 1
+ become: True
+
+ pre_tasks:
+ # this task has a failed_when: false to handle the scenario where no mgr existed before the upgrade
+ - name: stop ceph mgrs
+ service:
+ name: ceph-mgr@{{ ansible_hostname }}
+ state: stopped
+ enabled: yes
+ failed_when: false
+ when:
+ - not containerized_deployment
+
+ roles:
+ - ceph-defaults
+ - ceph-config
+ - { role: ceph-common, when: not containerized_deployment }
+ - { role: ceph-docker-common, when: containerized_deployment }
+ - { role: ceph-mgr, when: "ceph_release_num.{{ ceph_release }} >= ceph_release_num.luminous" }
+
+ post_tasks:
+ - name: start ceph mgrs
+ service:
+ name: ceph-mgr@{{ ansible_hostname }}
+ state: started
+ enabled: yes
+ when:
+ - not containerized_deployment
+
+ - name: restart containerized ceph mgrs
+ service:
+ name: ceph-mgr@{{ ansible_hostname }}
+ state: restarted
+ enabled: yes
+ when:
+ - containerized_deployment
+
+
+- name: show ceph status
+
+ hosts:
+ - "{{ mon_group_name|default('mons') }}"
+
+ become: True
+
+ roles:
+ - ceph-defaults
+
+ tasks:
+ - name: set_fact docker_exec_cmd_status
+ set_fact:
+ docker_exec_cmd_status: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
+ when:
+ - containerized_deployment
+
+ - name: show ceph status
+ command: "{{ docker_exec_cmd_status|default('') }} ceph --cluster {{ cluster }} -s"
+ delegate_to: "{{ groups[mon_group_name][0] }}"