Last active
March 15, 2017 22:26
-
-
Save thydel/c5ba9cb9e4d3fb18d8452ca5ad9217df to your computer and use it in GitHub Desktop.
Use ansible from git helper
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
#!/usr/bin/make -f | |
top:; @date | |
Makefile:; | |
# get various ansible versions | |
base := ~/usr/ext | |
version := devel | |
version := stable-2.2 | |
version := stable-2.3 | |
stables := 1.9 2.0 2.1 2.2 2.3 | |
versions := $(stables:%=stable-%) devel | |
url := git://github.com/ansible/ansible.git | |
clone = (cd $(base); git clone --branch $(version) --recursive $(url) ansible-$(version)) | |
pull = (cd $(base)/ansible-$(version); git pull --rebase; git submodule update --init --recursive) | |
setup = source $(base)/ansible-$(version)/hacking/env-setup -q | |
pkgs = sudo aptitude install python-netaddr | |
help: | |
@$(foreach version,$(versions),echo '$(clone)';) | |
@echo | |
@$(foreach version,$(versions),echo '$(pull)';) | |
@echo | |
@$(foreach version,$(versions),echo '$(setup)';) | |
@echo | |
@echo 'source <(< ~/.gpg-agent-info xargs -i echo export {})' | |
clone pull setup:; @echo '$($@)' | |
roles:; ansible-galaxy install -i -r requirements.yml | |
.PHONY: roles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment