fixed shebang and better salt function

This commit is contained in:
Jonas Forsberg
2020-08-02 17:26:23 +02:00
parent b00a4f7a6f
commit 87964e593b

View File

@@ -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(){