1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-26 06:08:35 +01:00
eoli3n-dotfiles/install.sh
2017-12-17 00:57:03 +01:00

29 lines
712 B
Bash
Executable File

#!/bin/bash
cd "$( dirname "${BASH_SOURCE[0]}" )"
if [[ ! -f /usr/bin/ansible ]]
then
echo "Please install ansible"
exit 1
fi
if [[ -z ${1+x} ]]
then
echo "Please choose a tag to install as param:"
ansible-playbook -i "localhost," -c local install.yml --list-tags
exit 1
fi
echo "### DRYRUN #################################################################"
ansible-playbook -i "localhost," -c local install.yml --ask-become-pass -CD -t $1
echo "Do you want to install ? (y/N)"
read ok
if [[ "$ok" == "y" ]]
then
echo "### RUN ####################################################################"
ansible-playbook -i "localhost," -c local install.yml --ask-become-pass -t $1
fi