From: Guillaume Abrioux Date: Mon, 9 Apr 2018 11:02:44 +0000 (+0200) Subject: defaults: fix backward compatibility X-Git-Tag: v3.1.0beta5~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=66c4118dcd0c8e7a7081bce5c8d6ba7752b959fd;p=ceph-ansible.git defaults: fix backward compatibility backward compatibility with `ceph_mon_docker_interface` and `ceph_mon_docker_subnet` was not working since there wasn't lookup on `monitor_interface` and `public_network` Signed-off-by: Guillaume Abrioux --- diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index a738d1991..cddfb9209 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -337,7 +337,7 @@ dummy: # 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. -#monitor_interface: interface +#monitor_interface: "{{ ceph_mon_docker_interface if ceph_mon_docker_interface != 'interface' else 'interface' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 #monitor_address: 0.0.0.0 #monitor_address_block: subnet # set to either ipv4 or ipv6, whichever your network is using @@ -347,7 +347,7 @@ dummy: ## OSD options # #journal_size: 5120 # OSD journal size in MB -#public_network: 0.0.0.0/0 +#public_network: "{{ ceph_mon_docker_subnet if ceph_mon_docker_subnet != '0.0.0.0/0' else '0.0.0.0/0' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 #cluster_network: "{{ public_network | regex_replace(' ', '') }}" #osd_mkfs_type: xfs #osd_mkfs_options_xfs: -f -i size=2048 @@ -495,8 +495,8 @@ dummy: #ceph_docker_registry: docker.io #ceph_docker_enable_centos_extra_repo: false #ceph_docker_on_openstack: false -#ceph_mon_docker_interface: "{{ monitor_interface }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 -#ceph_mon_docker_subnet: "{{ public_network }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 +#ceph_mon_docker_interface: "interface" # backward compatibility with stable-2.2, will disappear in stable 3.1 +#ceph_mon_docker_subnet: "0.0.0.0/0" # backward compatibility with stable-2.2, will disappear in stable 3.1 #mon_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 #osd_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 #mds_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index ee46f6e90..40578c489 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -337,7 +337,7 @@ ceph_repository: rhcs # 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. -#monitor_interface: interface +#monitor_interface: "{{ ceph_mon_docker_interface if ceph_mon_docker_interface != 'interface' else 'interface' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 #monitor_address: 0.0.0.0 #monitor_address_block: subnet # set to either ipv4 or ipv6, whichever your network is using @@ -347,7 +347,7 @@ ceph_repository: rhcs ## OSD options # #journal_size: 5120 # OSD journal size in MB -#public_network: 0.0.0.0/0 +#public_network: "{{ ceph_mon_docker_subnet if ceph_mon_docker_subnet != '0.0.0.0/0' else '0.0.0.0/0' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 #cluster_network: "{{ public_network | regex_replace(' ', '') }}" #osd_mkfs_type: xfs #osd_mkfs_options_xfs: -f -i size=2048 @@ -495,8 +495,8 @@ ceph_repository: rhcs #ceph_docker_registry: docker.io #ceph_docker_enable_centos_extra_repo: false #ceph_docker_on_openstack: false -#ceph_mon_docker_interface: "{{ monitor_interface }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 -#ceph_mon_docker_subnet: "{{ public_network }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 +#ceph_mon_docker_interface: "interface" # backward compatibility with stable-2.2, will disappear in stable 3.1 +#ceph_mon_docker_subnet: "0.0.0.0/0" # backward compatibility with stable-2.2, will disappear in stable 3.1 #mon_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 #osd_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 #mds_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 32272af0a..cfb882245 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -329,7 +329,7 @@ rbd_client_admin_socket_path: /var/run/ceph # must be writable by QEMU and allow # 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. -monitor_interface: interface +monitor_interface: "{{ ceph_mon_docker_interface if ceph_mon_docker_interface != 'interface' else 'interface' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 monitor_address: 0.0.0.0 monitor_address_block: subnet # set to either ipv4 or ipv6, whichever your network is using @@ -339,7 +339,7 @@ mon_use_fqdn: false # if set to true, the MON name used will be the fqdn in the ## OSD options # journal_size: 5120 # OSD journal size in MB -public_network: 0.0.0.0/0 +public_network: "{{ ceph_mon_docker_subnet if ceph_mon_docker_subnet != '0.0.0.0/0' else '0.0.0.0/0' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 cluster_network: "{{ public_network | regex_replace(' ', '') }}" osd_mkfs_type: xfs osd_mkfs_options_xfs: -f -i size=2048 @@ -487,8 +487,8 @@ ceph_docker_image_tag: latest ceph_docker_registry: docker.io ceph_docker_enable_centos_extra_repo: false ceph_docker_on_openstack: false -ceph_mon_docker_interface: "{{ monitor_interface }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 -ceph_mon_docker_subnet: "{{ public_network }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 +ceph_mon_docker_interface: "interface" # backward compatibility with stable-2.2, will disappear in stable 3.1 +ceph_mon_docker_subnet: "0.0.0.0/0" # backward compatibility with stable-2.2, will disappear in stable 3.1 mon_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 osd_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 mds_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1