diff --git a/.functions.sh b/.functions.sh index 88126a2..0a7c5b5 100644 --- a/.functions.sh +++ b/.functions.sh @@ -1,5 +1,10 @@ +#!/bin/bash function salt() { - sudo salt-call --local --file-root "$HOME/salt/states" --pillar-root "$HOME/salt/pillars" "$@" pillar="{username: $USER}" + if [[ "$1" == "state.apply" ]]; then + sudo salt-call --local --file-root "$HOME/salt/states" --pillar-root "$HOME/salt/pillars" "$@" pillar="{username: $USER}" + else + sudo salt-call --local --file-root "$HOME/salt/states" --pillar-root "$HOME/salt/pillars" "$@" + fi } function pw(){