2017-04-20 00:30:40 +08:00
|
|
|
---
|
|
|
|
- name: create rgw pools if create_pools is defined
|
|
|
|
command: ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }}
|
|
|
|
changed_when: false
|
2018-03-05 06:06:48 +08:00
|
|
|
run_once: true
|
2017-04-20 00:30:40 +08:00
|
|
|
with_dict: "{{ create_pools }}"
|
2017-09-15 06:48:53 +08:00
|
|
|
when:
|
2018-03-05 06:06:48 +08:00
|
|
|
- not containerized_deployment
|
|
|
|
|
|
|
|
# On first monitor.
|
|
|
|
- name: set_fact docker_exec_rgw_cmd
|
|
|
|
set_fact:
|
|
|
|
docker_exec_rgw_cmd: "docker exec ceph-mon-{{ hostvars[groups.get(mon_group_name)[0]]['ansible_hostname'] }}"
|
|
|
|
when:
|
|
|
|
- containerized_deployment
|
|
|
|
|
|
|
|
- name: create rgw pools if create_pools is defined
|
|
|
|
command: "{{ docker_exec_rgw_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool create {{ item.key }} {{ item.value.pg_num }}"
|
|
|
|
changed_when: false
|
|
|
|
run_once: true
|
|
|
|
with_dict: "{{ create_pools }}"
|
|
|
|
delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
|
|
when:
|
|
|
|
- containerized_deployment
|