Created
February 13, 2016 01:14
-
-
Save dgellow/dded9e8fbc918e6db35e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION = 13.1.2 | |
TARBALL = virtualenv-$(VERSION).tar.gz | |
URL = https://pypi.python.org/packages/source/v/virtualenv/$(TARBALL) | |
REQUIREMENTS = ansible==1.9.0.1 | |
PIP = venv/bin/pip | |
ANSIBLE = venv/bin/ansible-playbook | |
.DEFAULT_GOAL := help | |
venv: | |
curl -O $(URL) | |
tar xzf $(TARBALL) | |
rm $(TARBALL) | |
python virtualenv-$(VERSION)/virtualenv.py venv | |
rm -rf virtualenv-$(VERSION) | |
ansible: venv | |
$(PIP) install $(REQUIREMENTS) | |
deploy-prod: ansible | |
$(ANSIBLE) tasks-prod.yml -i hosts-prod | |
deploy-dev: ansible | |
$(ANSIBLE) tasks-dev.yml -i hosts-dev | |
deploy-test: ansible | |
$(ANSIBLE) tasks-test.yml -i hosts-test | |
help: | |
@echo "Available tasks (default is marked with *):" | |
@echo "*help print this help message" | |
@echo " deploy-prod deploy to production server" | |
@echo " deploy-dev deploy to dev (aka préprod) server" | |
@echo " deploy-test deploy to test server (futur préprod)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment