Skip to content

Commit 161925a

Browse files
Changes default log level for salt-call command in the provision script
After this, the invocation can change as - provision # To provision normally provision --debug # Provision with debug info When the log level is debug, it prints sensitive data on the console (like passwords) This commit helps avoid that by changing the default log level
1 parent 9da66f8 commit 161925a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

provision

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ git archive --remote=ssh://$PILLAR_GIT_URL --format=tgz master | tar xvz -C /opt
2727
mkdir -p /srv
2828
ln -sf /opt/magudi/salt/roots /srv/salt
2929
ln -sf /opt/pillar /srv/pillar
30-
salt-call --local state.highstate -l debug
30+
31+
if [ "$1" = "--debug" ]; then
32+
LOG_LEVEL="debug"
33+
else
34+
LOG_LEVEL="warning" # The default
35+
fi
36+
37+
salt-call --local state.highstate -l $LOG_LEVEL
3138

3239
# Ensure that next run will have the updated version
3340
# of the this file. Self updating!!!

0 commit comments

Comments
 (0)