Generate a copy of ceph.conf locally

Refers to #2697

This change creates a copy of `ceph.conf` in ansible server.

Signed-off-by: Ha Phan <thanhha.work@gmail.com>
pull/2823/head
Ha Phan 2018-06-05 16:43:55 +08:00 committed by mergify[bot]
parent a4a3d9a01b
commit b7b8aba47b
4 changed files with 30 additions and 0 deletions

View File

@ -78,6 +78,8 @@ dummy:
#ceph_rbdmirror_firewall_zone: public #ceph_rbdmirror_firewall_zone: public
#ceph_iscsi_firewall_zone: public #ceph_iscsi_firewall_zone: public
# Generate local ceph.conf in fetch directory
#ceph_conf_local: false
############ ############
# PACKAGES # # PACKAGES #

View File

@ -78,6 +78,8 @@ fetch_directory: ~/ceph-ansible-keys
#ceph_rbdmirror_firewall_zone: public #ceph_rbdmirror_firewall_zone: public
#ceph_iscsi_firewall_zone: public #ceph_iscsi_firewall_zone: public
# Generate local ceph.conf in fetch directory
#ceph_conf_local: false
############ ############
# PACKAGES # # PACKAGES #

View File

@ -26,6 +26,30 @@
- restart ceph rgws - restart ceph rgws
- restart ceph mgrs - restart ceph mgrs
- restart ceph rbdmirrors - restart ceph rbdmirrors
- name: "ensure fetch directory exists"
run_once: true
become: false
local_action:
module: file
path: "{{ fetch_directory }}/{{ fsid }}/etc/ceph"
state: directory
mode: "0755"
when:
- ceph_conf_local
- name: "generate {{ cluster }}.conf configuration file locally"
local_action: config_template
become: false
run_once: true
args:
src: "ceph.conf.j2"
dest: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.conf"
config_overrides: "{{ ceph_conf_overrides }}"
config_type: ini
when:
- inventory_hostname in groups[mon_group_name]
- ceph_conf_local
when: when:
- not containerized_deployment|bool - not containerized_deployment|bool

View File

@ -70,6 +70,8 @@ ceph_restapi_firewall_zone: public
ceph_rbdmirror_firewall_zone: public ceph_rbdmirror_firewall_zone: public
ceph_iscsi_firewall_zone: public ceph_iscsi_firewall_zone: public
# Generate local ceph.conf in fetch directory
ceph_conf_local: false
############ ############
# PACKAGES # # PACKAGES #