Skip to content

Instantly share code, notes, and snippets.

@jm2dev
Last active September 24, 2020 11:03
Show Gist options
  • Save jm2dev/1a272685e0b3955c75f0e2472a08c5fb to your computer and use it in GitHub Desktop.
Save jm2dev/1a272685e0b3955c75f0e2472a08c5fb to your computer and use it in GitHub Desktop.
Make tasks for ansible.
help: ## Print this help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
setup: ## python virtual environment
python3 -m venv .venv
VIRTUAL_ENV_DISABLE_PROMPT=true source .venv/bin/activate;\
pip install --upgrade pip;\
pip install -r requirements.txt
playbook=archlinux-workstation.yml
run: ## run main playbook
VIRTUAL_ENV_DISABLE_PROMPT=true source .venv/bin/activate;\
env ANSIBLE_FORCE_COLOR=true ansible-playbook -i hosts $(playbook) -K
debug: ## verbose run
VIRTUAL_ENV_DISABLE_PROMPT=true source .venv/bin/activate;\
env ANSIBLE_FORCE_COLOR=true ansible-playbook -vvv -i hosts $(playbook) -K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment