From a456bf734c59473569b3a75c1becca7788669da2 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Fri, 6 Jul 2018 13:39:37 -0400 Subject: [PATCH] Added venv check --- .gitignore | 1 + requirements.txt | 1 + sync.sh | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index d535eca..b76c28d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .stfolder main.retry private +.env diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..90d4055 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +ansible diff --git a/sync.sh b/sync.sh index c2dc5ed..82b1387 100755 --- a/sync.sh +++ b/sync.sh @@ -8,7 +8,11 @@ if [ -z "$1" ]; then echo "Example: $0 default,vim" exit 1 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: # ansible-playbook -i hosts main.yml --tags default,vim # vim +'call Initialize()' +'qa'