mirror of
https://github.com/samsapti/bachelor-project.git
synced 2024-11-29 16:27:53 +00:00
17 lines
376 B
Bash
17 lines
376 B
Bash
|
#!/usr/bin/env sh
|
||
|
|
||
|
BASE_CMD="ansible-playbook playbook.yml -i inventory --ask-vault-pass"
|
||
|
|
||
|
if [ -z "$(ansible-galaxy collection list community.general 2>/dev/null)" ]; then
|
||
|
ansible-galaxy collection install community.general
|
||
|
fi
|
||
|
|
||
|
case $1 in
|
||
|
root)
|
||
|
$BASE_CMD -u root ;;
|
||
|
user)
|
||
|
$BASE_CMD --ask-become-pass -u mpc-player ;;
|
||
|
*)
|
||
|
exit 1 ;;
|
||
|
esac
|