]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
generate_group_vars_sample.sh: fix script indent
authorSébastien Han <seb@redhat.com>
Mon, 15 May 2017 08:38:36 +0000 (10:38 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 15 May 2017 13:52:58 +0000 (15:52 +0200)
Using indent of 2 on the entire script.

Signed-off-by: Sébastien Han <seb@redhat.com>
generate_group_vars_sample.sh

index 9befa3efa5f6323f78fcff8f93709fbb2dfdc2c3..c238d8cda2314dd2017aa81703cb704d34479a2c 100755 (executable)
@@ -7,13 +7,13 @@ basedir=$(dirname "$0")
 for role in "$basedir"/roles/ceph-*; do
   rolename=$(basename "$role")
   if [[ $rolename == "ceph-common" ]]; then
-      output="all.yml.sample"
+    output="all.yml.sample"
   elif [[ $rolename == "ceph-agent" ]]; then
-      output="agent.yml.sample"
+    output="agent.yml.sample"
   elif [[ $rolename == "ceph-fetch-keys" ]]; then
-      output="ceph-fetch-keys.yml.sample"
+    output="ceph-fetch-keys.yml.sample"
   else
-      output="${rolename:5}s.yml.sample"
+    output="${rolename:5}s.yml.sample"
   fi
 
   cat <<EOF > "$basedir"/group_vars/"$output"
@@ -29,16 +29,16 @@ dummy:
 EOF
   defaults="$role"/defaults/main.yml
   if [[ ! -f $defaults ]]; then
-      continue
+    continue
   fi
 
   if [ "$(uname)" == "Darwin" ]; then
-  sed '/^---/d; s/^\([A-Za-z[:space:]]\)/#\1/' \
-        "$defaults" >> "$basedir"/group_vars/"$output"
+    sed '/^---/d; s/^\([A-Za-z[:space:]]\)/#\1/' \
+      "$defaults" >> "$basedir"/group_vars/"$output"
     echo >> "$basedir"/group_vars/"$output"
   elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
     sed '/^---/d; s/^\([A-Za-z[:space:]].\+\)/#\1/' \
-        "$defaults" >> "$basedir"/group_vars/"$output"
+      "$defaults" >> "$basedir"/group_vars/"$output"
     echo >> "$basedir"/group_vars/"$output"
   else
     echo "Unsupported platform"