#!/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$'
#############
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"
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
# 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
# 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
#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 #
###################
##########
# DOCKER #
##########
-
+#docker_exec_cmd:
#docker: false
#ceph_docker_image: "ceph/daemon"
#ceph_docker_image_tag: latest
#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 #
#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
+