]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
contrib: fix generate group_vars samples
authorSébastien Han <seb@redhat.com>
Wed, 6 Jun 2018 06:41:46 +0000 (14:41 +0800)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Mon, 13 Aug 2018 20:57:15 +0000 (20:57 +0000)
For ceph-iscsi-gw and ceph-rbd-mirror roles the group_name are named
differently (by default) than the role name so we have to change the
script to generate the correct name.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1602327
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 315ab08b1604e655eee4b493eb2c1171a67df506)

generate_group_vars_sample.sh
group_vars/all.yml.sample
group_vars/iscsi-gws.yml.sample [deleted file]
group_vars/iscsigws.yml.sample [new file with mode: 0644]
group_vars/rbd-mirrors.yml.sample [deleted file]
group_vars/rbdmirrors.yml.sample [new file with mode: 0644]
group_vars/rhcs.yml.sample

index de8264ff6e7f3c01efe59015065eb0916577c475..6808d23c64a1cf3d6e6716a655a35431d77df5d0 100755 (executable)
@@ -66,6 +66,10 @@ for role in "$basedir"/roles/ceph-*; do
     output="agent.yml.sample"
   elif [[ $rolename == "ceph-fetch-keys" ]]; then
     output="ceph-fetch-keys.yml.sample"
+  elif [[ $rolename == "ceph-rbd-mirror" ]]; then
+    output="rbdmirrors.yml.sample"
+  elif [[ $rolename == "ceph-iscsi-gw" ]]; then
+    output="iscsigws.yml.sample"
   else
     output="${rolename:5}s.yml.sample"
   fi
index 7f7fb6b9b174530f632dc875e80b7a4a47b75616..bde581cc8bf19b283fe9bc6adea2eb0387d4cdde 100644 (file)
@@ -495,9 +495,9 @@ dummy:
 # do not ever change this here
 #rolling_update: false
 
-
 #####################
 # Docker pull retry #
 #####################
 #docker_pull_retry: 3
 #docker_pull_timeout: "300s"
+
diff --git a/group_vars/iscsi-gws.yml.sample b/group_vars/iscsi-gws.yml.sample
deleted file mode 100644 (file)
index 620bb6b..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
----
-# Variables here are applicable to all host groups NOT roles
-
-# This sample file generated by generate_group_vars_sample.sh
-
-# Dummy variable to avoid error because ansible does not recognize the
-# file as a good configuration file when no variable in it.
-dummy:
-
-# You can override vars by using host or group vars
-
-# Specify the iqn for ALL gateways. This iqn is shared across the gateways, so an iscsi
-# client sees the gateway group as a single storage subsystem.
-#gateway_iqn: "iqn.2003-01.com.redhat.iscsi-gw:ceph-igw"
-
-# gateway_ip_list provides a list of the IP Addrresses - one per gateway - that will be used
-# as an iscsi target portal ip. The list must be comma separated - and the order determines
-# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
-# gateways can be added, but the order must *not* be changed.
-#gateway_ip_list: 0.0.0.0
-
-# rbd_devices defines the images that should be created and exported from the iscsi gateways.
-# If the rbd does not exist, it will be created for you. In addition you may increase the
-# size of rbd's by changing the size parameter and rerunning the playbook. A size value lower
-# than the current size of the rbd is ignored.
-#
-# the 'host' parameter defines which of the gateway nodes should handle the physical
-# allocation/expansion or removal of the rbd
-# to remove an image, simply use a state of 'absent'. This will first check the rbd is not allocated
-# to any client, and the remove it from LIO and then delete the rbd image
-#
-# NB. this variable definition can be commented out to bypass LUN management
-#
-# Example:
-#
-#rbd_devices:
-#  - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
-#  - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
-#  - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
-#  - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
-#rbd_devices: {}
-
-
-# client_connections defines the client ACL's to restrict client access to specific LUNs
-# The settings are as follows;
-# - image_list is a comma separated list of rbd images of the form <pool name>.<rbd_image_name>
-# - chap supplies the user and password the client will use for authentication of the
-#   form <user>/<password>
-# - status shows the intended state of this client definition - 'present' or 'absent'
-#
-# NB. this definition can be commented out to skip client (nodeACL) management
-#
-# Example:
-#
-#client_connections:
-#  - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
-#  - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
-
-#client_connections: {}
-
-# Whether or not to generate secure certificate to iSCSI gateway nodes
-#generate_crt: False
-
diff --git a/group_vars/iscsigws.yml.sample b/group_vars/iscsigws.yml.sample
new file mode 100644 (file)
index 0000000..620bb6b
--- /dev/null
@@ -0,0 +1,63 @@
+---
+# Variables here are applicable to all host groups NOT roles
+
+# This sample file generated by generate_group_vars_sample.sh
+
+# Dummy variable to avoid error because ansible does not recognize the
+# file as a good configuration file when no variable in it.
+dummy:
+
+# You can override vars by using host or group vars
+
+# Specify the iqn for ALL gateways. This iqn is shared across the gateways, so an iscsi
+# client sees the gateway group as a single storage subsystem.
+#gateway_iqn: "iqn.2003-01.com.redhat.iscsi-gw:ceph-igw"
+
+# gateway_ip_list provides a list of the IP Addrresses - one per gateway - that will be used
+# as an iscsi target portal ip. The list must be comma separated - and the order determines
+# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
+# gateways can be added, but the order must *not* be changed.
+#gateway_ip_list: 0.0.0.0
+
+# rbd_devices defines the images that should be created and exported from the iscsi gateways.
+# If the rbd does not exist, it will be created for you. In addition you may increase the
+# size of rbd's by changing the size parameter and rerunning the playbook. A size value lower
+# than the current size of the rbd is ignored.
+#
+# the 'host' parameter defines which of the gateway nodes should handle the physical
+# allocation/expansion or removal of the rbd
+# to remove an image, simply use a state of 'absent'. This will first check the rbd is not allocated
+# to any client, and the remove it from LIO and then delete the rbd image
+#
+# NB. this variable definition can be commented out to bypass LUN management
+#
+# Example:
+#
+#rbd_devices:
+#  - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
+#  - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
+#  - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
+#  - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
+#rbd_devices: {}
+
+
+# client_connections defines the client ACL's to restrict client access to specific LUNs
+# The settings are as follows;
+# - image_list is a comma separated list of rbd images of the form <pool name>.<rbd_image_name>
+# - chap supplies the user and password the client will use for authentication of the
+#   form <user>/<password>
+# - status shows the intended state of this client definition - 'present' or 'absent'
+#
+# NB. this definition can be commented out to skip client (nodeACL) management
+#
+# Example:
+#
+#client_connections:
+#  - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
+#  - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
+
+#client_connections: {}
+
+# Whether or not to generate secure certificate to iSCSI gateway nodes
+#generate_crt: False
+
diff --git a/group_vars/rbd-mirrors.yml.sample b/group_vars/rbd-mirrors.yml.sample
deleted file mode 100644 (file)
index b680b05..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
----
-# Variables here are applicable to all host groups NOT roles
-
-# This sample file generated by generate_group_vars_sample.sh
-
-# Dummy variable to avoid error because ansible does not recognize the
-# file as a good configuration file when no variable in it.
-dummy:
-
-#########
-# SETUP #
-#########
-
-#fetch_directory: fetch/
-
-# Even though rbd-mirror nodes should not have the admin key
-# at their disposal, some people might want to have it
-# distributed on rbd-mirror nodes. Setting 'copy_admin_key' to 'true'
-# will copy the admin key to the /etc/ceph/ directory. Only
-# valid for Luminous and later releases.
-#copy_admin_key: false
-
-# NOTE: deprecated generic local user id for pre-Luminous releases
-#ceph_rbd_mirror_local_user: "admin"
-
-
-#################
-# CONFIGURATION #
-#################
-
-#ceph_rbd_mirror_configure: false
-#ceph_rbd_mirror_pool: ""
-
-# NOTE (leseb): the following variable needs the name of the remote cluster.
-# The name of this cluster must be different than your local cluster simply
-# because we need to have both keys and ceph.conf inside /etc/ceph.
-# Thus if cluster names are identical we can not have them under /etc/ceph
-#ceph_rbd_mirror_remote_cluster: ""
-
-# NOTE: the rbd-mirror daemon needs a user to authenticate with the
-# remote cluster. By default, this key should be available under
-# /etc/ceph/<remote_cluster>.client.<remote_user>.keyring
-#ceph_rbd_mirror_remote_user: ""
-
-
-##########
-# DOCKER #
-##########
-
-# Resource limitation
-# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
-# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
-# These options can be passed using the 'ceph_rbd_mirror_docker_extra_env' variable.
-#ceph_rbd_mirror_docker_memory_limit: 1g
-#ceph_rbd_mirror_docker_cpu_limit: 1
-
-#ceph_rbd_mirror_docker_extra_env:
-#ceph_config_keys: [] # DON'T TOUCH ME
-
-
-###########
-# SYSTEMD #
-###########
-# ceph_rbd_mirror_systemd_overrides will override the systemd settings
-# for the ceph-rbd-mirror services.
-# For example,to set "PrivateDevices=false" you can specify:
-#ceph_rbd_mirror_systemd_overrides:
-#  Service:
-#    PrivateDevices: False
-
diff --git a/group_vars/rbdmirrors.yml.sample b/group_vars/rbdmirrors.yml.sample
new file mode 100644 (file)
index 0000000..b680b05
--- /dev/null
@@ -0,0 +1,70 @@
+---
+# Variables here are applicable to all host groups NOT roles
+
+# This sample file generated by generate_group_vars_sample.sh
+
+# Dummy variable to avoid error because ansible does not recognize the
+# file as a good configuration file when no variable in it.
+dummy:
+
+#########
+# SETUP #
+#########
+
+#fetch_directory: fetch/
+
+# Even though rbd-mirror nodes should not have the admin key
+# at their disposal, some people might want to have it
+# distributed on rbd-mirror nodes. Setting 'copy_admin_key' to 'true'
+# will copy the admin key to the /etc/ceph/ directory. Only
+# valid for Luminous and later releases.
+#copy_admin_key: false
+
+# NOTE: deprecated generic local user id for pre-Luminous releases
+#ceph_rbd_mirror_local_user: "admin"
+
+
+#################
+# CONFIGURATION #
+#################
+
+#ceph_rbd_mirror_configure: false
+#ceph_rbd_mirror_pool: ""
+
+# NOTE (leseb): the following variable needs the name of the remote cluster.
+# The name of this cluster must be different than your local cluster simply
+# because we need to have both keys and ceph.conf inside /etc/ceph.
+# Thus if cluster names are identical we can not have them under /etc/ceph
+#ceph_rbd_mirror_remote_cluster: ""
+
+# NOTE: the rbd-mirror daemon needs a user to authenticate with the
+# remote cluster. By default, this key should be available under
+# /etc/ceph/<remote_cluster>.client.<remote_user>.keyring
+#ceph_rbd_mirror_remote_user: ""
+
+
+##########
+# DOCKER #
+##########
+
+# Resource limitation
+# For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints
+# Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations
+# These options can be passed using the 'ceph_rbd_mirror_docker_extra_env' variable.
+#ceph_rbd_mirror_docker_memory_limit: 1g
+#ceph_rbd_mirror_docker_cpu_limit: 1
+
+#ceph_rbd_mirror_docker_extra_env:
+#ceph_config_keys: [] # DON'T TOUCH ME
+
+
+###########
+# SYSTEMD #
+###########
+# ceph_rbd_mirror_systemd_overrides will override the systemd settings
+# for the ceph-rbd-mirror services.
+# For example,to set "PrivateDevices=false" you can specify:
+#ceph_rbd_mirror_systemd_overrides:
+#  Service:
+#    PrivateDevices: False
+
index d5777459f8b7665f8374fef6327d40f835a8fd0e..49fd086a76393485bf4ca9604d7c676416991a80 100644 (file)
@@ -495,9 +495,9 @@ ceph_repository: rhcs
 # do not ever change this here
 #rolling_update: false
 
-
 #####################
 # Docker pull retry #
 #####################
 #docker_pull_retry: 3
 #docker_pull_timeout: "300s"
+