Browse Source

Allow to set extra ansible options

Example:

$ ANSIBLE_EXTRA_OPTS='--limit @playbook.retry' make
remove-logs
Andreas Linz 3 years ago
parent
commit
302792c54d
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      Makefile

+ 4
- 3
Makefile View File

@ -1,12 +1,13 @@
.PHONY: vm vagrant clean clean-all
APPS:=$(dir $(wildcard build/*/))
ANSIBLE_OPTS="--vault-password-file=./vault.pass"
ANSIBLE_OPTS:="--vault-password-file=./vault.pass"
ANSIBLE_EXTRA_OPTS:=
all: vm
vm: playbook.yml Vagrantfile vagrant
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook $(ANSIBLE_OPTS)\
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook $(ANSIBLE_OPTS) $(ANSIBLE_EXTRA_OPTS)\
--extra-vars='var_domain="klingt.vnet"'\
--private-key='./.vagrant/machines/default/virtualbox/private_key'\
--inventory-file='./.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory'\
@ -14,7 +15,7 @@ vm: playbook.yml Vagrantfile vagrant
playbook.yml
klingt.net: playbook.yml Vagrantfile
ansible-playbook $(ANSIBLE_OPTS)\
ansible-playbook $(ANSIBLE_OPTS) $(ANSIBLE_EXTRA_OPTS)\
--vault-password-file='./vault.pass'\
--verbose\
playbook.yml

Loading…
Cancel
Save