Use a virtualenv

The instructions require a minimum version of Ansible and netaddr. Enforce
these dependencies through a venv. Particularly useful when switching between
other projects. Also, useful for the future as Kargo expands, and may require
additional dependencies.
This commit is contained in:
John Dewey 2017-02-17 16:20:03 -08:00
parent b84cc14694
commit b79c0615a0
No known key found for this signature in database
GPG key ID: 85CA6C7BD56CF2EB
3 changed files with 13 additions and 0 deletions

1
.gitignore vendored
View file

@ -14,3 +14,4 @@ temp
/ssh-bastion.conf
**/*.sw[pon]
vagrant/
venv/

11
Makefile Normal file
View file

@ -0,0 +1,11 @@
venv: venv/bin/activate
venv/bin/activate: requirements.txt
test -d venv || virtualenv --no-setuptools -p `which python` venv
. venv/bin/activate; pip install -r requirements.txt
clean:
$(RM) -rf venv
find . -name "*.pyc" -exec $(RM) -rf {} \;
.PHONY:clean venv

View file

@ -73,6 +73,7 @@ in order to avoid any issue during deployment you should disable your firewall.
* The target servers are configured to allow **IPv4 forwarding**.
* **Copy your ssh keys** to all the servers part of your inventory.
* **Ansible v2.2 (or newer) and python-netaddr**
* Build and source a venv `make && venv/bin/activate`
## Network plugins