]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
generate_group_vars_sample: update for ceph-defaults 1727/head
authorSébastien Han <seb@redhat.com>
Wed, 2 Aug 2017 08:35:26 +0000 (10:35 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 2 Aug 2017 15:12:20 +0000 (17:12 +0200)
Signed-off-by: Sébastien Han <seb@redhat.com>
generate_group_vars_sample.sh
group_vars/all.yml.sample
group_vars/mons.yml.sample
group_vars/osds.yml.sample

index 1e7bd07a42323dc43fc42ba156d5e6763162da37..bb26a229f746512a2c641daac2ac9af4cffa1836 100755 (executable)
@@ -1,14 +1,13 @@
 #!/usr/bin/env bash
-
 set -euo pipefail
 
+
 #############
 # VARIABLES #
 #############
 
 basedir=$(dirname "$0")
-no_header="ceph-docker-common" # pipe separated list of roles with no header, MUST end with '$', e.g: 'foo$|bar$'
-merge_in_all="ceph-common$|ceph-docker-common$" # pipe separated list of roles you want to merge in all.yml.sample, MUST end with '$', e.g: 'foo$|bar$'
+do_not_generate="ceph-common$|ceph-docker-common$" # pipe separated list of roles we don't want to generate sample file, MUST end with '$', e.g: 'foo$|bar$'
 
 
 #############
@@ -52,7 +51,7 @@ generate_group_vars_file () {
 for role in "$basedir"/roles/ceph-*; do
   rolename=$(basename "$role")
 
-  if echo "$rolename" | grep -qE "$merge_in_all"; then
+  if [[ $rolename == "ceph-defaults" ]]; then
     output="all.yml.sample"
   elif [[ $rolename == "ceph-agent" ]]; then
     output="agent.yml.sample"
@@ -62,17 +61,13 @@ for role in "$basedir"/roles/ceph-*; do
     output="${rolename:5}s.yml.sample"
   fi
 
-
-  # Do not re-regenerate the header for certain roles
-  # since we merge them in all.yml.sample
-  if ! echo "$rolename" | grep -qE "$no_header"; then
-    populate_header
-  fi
-
   defaults="$role"/defaults/main.yml
   if [[ ! -f $defaults ]]; then
     continue
   fi
 
-  generate_group_vars_file
+  if ! echo "$rolename" | grep -qE "$do_not_generate"; then
+    populate_header
+    generate_group_vars_file
+  fi
 done
index 5466c4ce6748bfd1c929c93fd28e938d646d88cf..de54eca35b0a46b6be41eddabd3dad8710059ff6 100644 (file)
@@ -30,6 +30,12 @@ dummy:
 # INSTALL #
 ###########
 
+# Set uid/gid to default '64045' for bootstrap directories.
+# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
+# These values have to be set according to the base OS used by the container image, NOT the host.
+#bootstrap_dirs_owner: "64045"
+#bootstrap_dirs_group: "64045"
+
 #mon_group_name: mons
 #osd_group_name: osds
 #rgw_group_name: rgws
@@ -197,9 +203,12 @@ dummy:
 # generated, you may find it useful to disable fsid generation to
 # avoid cluttering up your ansible repo. If you set `generate_fsid` to
 # false, you *must* generate `fsid` in another way.
+# ACTIVATE THE FSID VARIABLE FOR NON-VAGRANT DEPLOYMENT
 #fsid: "{{ cluster_uuid.stdout }}"
 #generate_fsid: true
 
+#ceph_conf_key_directory: /etc/ceph
+
 #cephx: true
 #max_open_files: 131072
 
@@ -324,6 +333,14 @@ dummy:
 #handler_health_osd_check_delay: 30
 #handler_health_osd_check: true
 
+# Confiure the type of NFS gatway access.  At least one must be enabled for an
+# NFS role to be useful
+#
+# Set this to true to enable File access via NFS.  Requires an MDS role.
+#nfs_file_gw: true
+# Set this to true to enable Object access via NFS. Requires an RGW role.
+#nfs_obj_gw: false
+
 ###################
 # CONFIG OVERRIDE #
 ###################
@@ -358,7 +375,7 @@ dummy:
 ##########
 # DOCKER #
 ##########
-
+#docker_exec_cmd:
 #docker: false
 #ceph_docker_image: "ceph/daemon"
 #ceph_docker_image_tag: latest
@@ -368,42 +385,10 @@ dummy:
 #containerized_deployment_with_kv: false
 #containerized_deployment: false
 #mon_containerized_default_ceph_conf_with_kv: false
-
-# Confiure the type of NFS gatway access.  At least one must be enabled for an
-# NFS role to be useful
-#
-# Set this to true to enable File access via NFS.  Requires an MDS role.
-#nfs_file_gw: true
-# Set this to true to enable Object access via NFS. Requires an RGW role.
-#nfs_obj_gw: false
-
-# this is only here for usage with the rolling_update.yml playbook
-# do not ever change this here
-#rolling_update: false
-
-#fsid: "{{ cluster_uuid.stdout }}"
-#generate_fsid: true
 #ceph_docker_registry: docker.io
 #ceph_docker_enable_centos_extra_repo: false
-
 #ceph_docker_on_openstack: false
 
-#mon_use_fqdn: false # if set to true, the MON name used will be the fqdn
-
-# Set uid/gid to default '64045' for bootstrap directories.
-# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
-# These values have to be set according to the base OS used by the container image, NOT the host.
-#bootstrap_dirs_owner: "64045"
-#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 #
@@ -413,3 +398,8 @@ dummy:
 #kv_port: 2379
 #containerized_deployment_with_kv: false
 
+
+# this is only here for usage with the rolling_update.yml playbook
+# do not ever change this here
+#rolling_update: false
+
index e1eac739e2d366b0b6d47108db32aed00637ca3a..ab3b058c67457300bf4a76af20c46cab692d55ab 100644 (file)
@@ -113,7 +113,6 @@ dummy:
 ##########
 # DOCKER #
 ##########
-#docker_exec_cmd:
 #ceph_mon_docker_subnet: "{{ public_network }}"# subnet of the monitor_interface
 
 # ceph_mon_docker_extra_env:
index 7b723462928999540e1080f5f19b47fee6d19cd5..0a270399c7bcf7fb4368ca4eae853bd0b459d060 100644 (file)
@@ -219,6 +219,7 @@ dummy:
 # Encrypted OSD with dedicated journal: ceph_osd_docker_prepare_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1 -e OSD_DMCRYPT=1 -e OSD_JOURNAL={{ raw_journal_devices[0] }} -e OSD_FILESTORE=1
 #
 #
+#ceph_osd_docker_devices: "{{ devices }}"
 #ceph_osd_docker_prepare_env: -e CLUSTER={{ cluster }} -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1
 
 # ACTIVATE DEVICE