mirror of https://github.com/ceph/ceph-ansible.git
generate_group_vars_sample.sh: fix script indent
Using indent of 2 on the entire script.
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 7fddcad8ea
)
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/1539/head
parent
90cf33cb6f
commit
932496d8de
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue