From a951b7f957d2debea6a1c6087ee52dda2f92895e Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 4 Jul 2017 16:43:58 +0200 Subject: [PATCH] Docker-common: Add missing variables declaration Some variables are missing from ceph-docker-common role since the include of check_mandatory_vars.yml has been re-added in the ceph-mon role. Signed-off-by: Guillaume Abrioux --- group_vars/all.yml.sample | 15 ++++++++++++--- roles/ceph-common/defaults/main.yml | 1 + roles/ceph-docker-common/defaults/main.yml | 7 +++++++ roles/ceph-mon/tasks/check_mandatory_vars.yml | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index e7822d167..8f5dafb6c 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -247,12 +247,14 @@ dummy: ## Monitor options # -# You must define monitor_interface. -# You can also specify for each monitor which address the monitor will bind to in your **inventory host file** by using 'monitor_address' variable. -# Preference will go to monitor_address if both are defined. +# You must define either monitor_interface, monitor_address or monitor_address_block. +# These variables must be defined at least in all.yml and overrided if needed (inventory host file or group_vars/*.yml). +# Eg. If you want to specify for each monitor which address the monitor will bind to you can set it in your **inventory host file** by using 'monitor_address' variable. +# Preference will go to monitor_address if both monitor_address and monitor_interface are defined. # To use an IPv6 address, use the monitor_address setting instead (and set ip_version to ipv6) #monitor_interface: interface #monitor_address: 0.0.0.0 +#monitor_address_block: [] # set to either ipv4 or ipv6, whichever your network is using #ip_version: ipv4 #mon_use_fqdn: false # if set to true, the MON name used will be the fqdn in the ceph.conf @@ -421,6 +423,13 @@ dummy: #ceph_conf_key_directory: /etc/ceph +########### +# Network # +########### +#monitor_interface: 'interface' +#monitor_address: '0.0.0.0' +#monitor_address_block: [] + ############ # KV store # ############ diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index f12ab632b..4cf298840 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -246,6 +246,7 @@ rbd_client_admin_socket_path: /var/run/ceph # must be writable by QEMU and allow # To use an IPv6 address, use the monitor_address setting instead (and set ip_version to ipv6) monitor_interface: interface monitor_address: 0.0.0.0 +monitor_address_block: [] # set to either ipv4 or ipv6, whichever your network is using ip_version: ipv4 mon_use_fqdn: false # if set to true, the MON name used will be the fqdn in the ceph.conf diff --git a/roles/ceph-docker-common/defaults/main.yml b/roles/ceph-docker-common/defaults/main.yml index e2ea55803..39599a2ba 100644 --- a/roles/ceph-docker-common/defaults/main.yml +++ b/roles/ceph-docker-common/defaults/main.yml @@ -16,6 +16,13 @@ bootstrap_dirs_group: "64045" ceph_conf_key_directory: /etc/ceph +########### +# Network # +########### +monitor_interface: 'interface' +monitor_address: '0.0.0.0' +monitor_address_block: [] + ############ # KV store # ############ diff --git a/roles/ceph-mon/tasks/check_mandatory_vars.yml b/roles/ceph-mon/tasks/check_mandatory_vars.yml index 9707c149a..cb0b95070 100644 --- a/roles/ceph-mon/tasks/check_mandatory_vars.yml +++ b/roles/ceph-mon/tasks/check_mandatory_vars.yml @@ -5,4 +5,4 @@ when: - monitor_interface == 'interface' - monitor_address == '0.0.0.0' - - not monitor_address_block + - monitor_address_block | length == 0 -- 2.39.5