Revert changes in for loop because param value is changed.
This commit is contained in:
parent
1388487199
commit
33a0e05e3d
6 changed files with 6 additions and 6 deletions
|
@ -19,7 +19,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
set -- "/${__object_id}"
|
set -- "/${__object_id}"
|
||||||
for param in $__object/parameter/*; do
|
for param in $(ls "$__object/parameter/"); do
|
||||||
case "$param" in
|
case "$param" in
|
||||||
source)
|
source)
|
||||||
source="$(cat "$__object/parameter/source")"
|
source="$(cat "$__object/parameter/source")"
|
||||||
|
|
|
@ -84,7 +84,7 @@ echo "{"
|
||||||
# parameters we define ourself
|
# parameters we define ourself
|
||||||
printf ' "data_dir": "%s"\n' "$data_dir"
|
printf ' "data_dir": "%s"\n' "$data_dir"
|
||||||
|
|
||||||
for param in $__object/parameter/*; do
|
for param in $(ls "$__object/parameter/"); do
|
||||||
case "$param" in
|
case "$param" in
|
||||||
state|user|group|json-config) continue ;;
|
state|user|group|json-config) continue ;;
|
||||||
ca-file-source|cert-file-source|key-file-source)
|
ca-file-source|cert-file-source|key-file-source)
|
||||||
|
|
|
@ -50,7 +50,7 @@ fi
|
||||||
echo "{"
|
echo "{"
|
||||||
printf ' "check": {\n'
|
printf ' "check": {\n'
|
||||||
printf ' "name": "%s"\n' "$name"
|
printf ' "name": "%s"\n' "$name"
|
||||||
for param in $__object/parameter/*; do
|
for param in $(ls "$__object/parameter/"); do
|
||||||
case "$param" in
|
case "$param" in
|
||||||
state|name) continue ;;
|
state|name) continue ;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -42,7 +42,7 @@ fi
|
||||||
echo "{"
|
echo "{"
|
||||||
printf ' "service": {\n'
|
printf ' "service": {\n'
|
||||||
printf ' "name": "%s"\n' "$name"
|
printf ' "name": "%s"\n' "$name"
|
||||||
for param in $__object/parameter/*; do
|
for param in $(ls "$__object/parameter/"); do
|
||||||
case "$param" in
|
case "$param" in
|
||||||
state|name|check-interval) continue ;;
|
state|name|check-interval) continue ;;
|
||||||
check-script)
|
check-script)
|
||||||
|
|
|
@ -75,7 +75,7 @@ require="__directory/etc/consul-template" \
|
||||||
|
|
||||||
# Generate hcl config file
|
# Generate hcl config file
|
||||||
(
|
(
|
||||||
for param in $__object/parameter/*; do
|
for param in $(ls "$__object/parameter/"); do
|
||||||
case "$param" in
|
case "$param" in
|
||||||
auth-password|state|ssl-*|syslog-*|version|vault-token|vault-ssl*) continue ;;
|
auth-password|state|ssl-*|syslog-*|version|vault-token|vault-ssl*) continue ;;
|
||||||
auth-username)
|
auth-username)
|
||||||
|
|
|
@ -38,7 +38,7 @@ fi
|
||||||
# Generate hcl config file
|
# Generate hcl config file
|
||||||
(
|
(
|
||||||
printf 'template {\n'
|
printf 'template {\n'
|
||||||
for param in $__object/parameter/*; do
|
for param in $(ls "$__object/parameter/"); do
|
||||||
case "$param" in
|
case "$param" in
|
||||||
source-file)
|
source-file)
|
||||||
source="$(cat "$__object/parameter/$param")"
|
source="$(cat "$__object/parameter/$param")"
|
||||||
|
|
Loading…
Reference in a new issue