2017-03-16 17:17:08 +08:00
|
|
|
---
|
2017-10-04 16:39:17 +08:00
|
|
|
- name: set_fact docker_exec_cmd
|
|
|
|
set_fact:
|
2017-10-16 21:04:23 +08:00
|
|
|
docker_exec_cmd_mgr: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
2017-10-04 16:39:17 +08:00
|
|
|
when:
|
|
|
|
- containerized_deployment
|
|
|
|
|
2017-09-15 06:48:53 +08:00
|
|
|
- name: include pre_requisite.yml
|
|
|
|
include: pre_requisite.yml
|
2017-04-13 01:57:33 +08:00
|
|
|
when: not containerized_deployment
|
2017-03-16 17:17:08 +08:00
|
|
|
|
2017-09-15 06:48:53 +08:00
|
|
|
- name: include docker/main.yml
|
|
|
|
include: docker/main.yml
|
2017-04-13 01:57:33 +08:00
|
|
|
when: containerized_deployment
|
2017-10-16 21:04:23 +08:00
|
|
|
|
|
|
|
- name: get enabled modules from ceph-mgr
|
|
|
|
command: "{{ docker_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} --format json mgr module ls"
|
|
|
|
register: enabled_ceph_mgr_modules
|
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
|
|
|
|
|
|
- name: disable ceph mgr enabled modules
|
|
|
|
command: "{{ docker_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} mgr module disable {{ item }}"
|
|
|
|
with_items: "{{ enabled_ceph_mgr_modules.stdout | from_json }}"
|
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
|
|
|
|
|
|
- name: add modules to ceph-mgr
|
|
|
|
command: "{{ docker_exec_cmd_mgr | default('') }} ceph --cluster {{ cluster }} mgr module enable {{ item }}"
|
|
|
|
with_items: "{{ ceph_mgr_modules }}"
|
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|