mirror of
https://github.com/samsapti/bachelor-project.git
synced 2024-11-22 04:47:53 +00:00
17 lines
376 B
Bash
Executable file
17 lines
376 B
Bash
Executable file
#!/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
|