Added venv check

This commit is contained in:
Austen Adler 2018-07-06 13:39:37 -04:00
parent e1d80ce73f
commit a456bf734c
3 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.stfolder .stfolder
main.retry main.retry
private private
.env

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
ansible

View File

@ -8,7 +8,11 @@ if [ -z "$1" ]; then
echo "Example: $0 default,vim" echo "Example: $0 default,vim"
exit 1 exit 1
fi fi
ansible-playbook -i 'localhost,' main.yml --tags $1 if [ -f .env/bin/activate ]; then
echo "Found virtualenv. Sourcing..."
source .env/bin/activate
fi
ansible-playbook -i 'localhost,' main.yml --tags "$1"
# Could also sync vim: # Could also sync vim:
# ansible-playbook -i hosts main.yml --tags default,vim # ansible-playbook -i hosts main.yml --tags default,vim
# vim +'call Initialize()' +'qa' # vim +'call Initialize()' +'qa'