dotfiles/.functions/salt.sh

9 lines
324 B
Bash
Raw Permalink Normal View History

2021-11-12 11:51:33 +00:00
#!/bin/bash
function salt() {
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
}