diff options
Diffstat (limited to 'vagrant')
-rw-r--r-- | vagrant/Makefile | 19 | ||||
-rw-r--r-- | vagrant/ansible/Makefile | 10 | ||||
-rw-r--r-- | vagrant/ansible/roles/client.test.prep/defaults/main.yml (renamed from vagrant/ansible/roles/client.test.prep/defaults/test_repo.yml) | 0 |
3 files changed, 19 insertions, 10 deletions
diff --git a/vagrant/Makefile b/vagrant/Makefile index 597c6e8..ce885c5 100644 --- a/vagrant/Makefile +++ b/vagrant/Makefile @@ -1,30 +1,35 @@ INVENTORY := ./vagrant_ansible_inventory VSSH := ssh -F ssh-config-host +ifdef EXTRA_VARS + ANSIBLE_EXTRA_VARS := -e '${EXTRA_VARS}' + SSH_EXTRA_VARS := EXTRA_VARS='${EXTRA_VARS}' +endif + local: - @ansible-playbook --inventory localhost, local.yml + @ansible-playbook --inventory localhost, ${ANSIBLE_EXTRA_VARS} local.yml hosts.update.only: - @ansible-playbook --inventory=$(INVENTORY) hosts.update.yml + @ansible-playbook --inventory=$(INVENTORY) ${ANSIBLE_EXTRA_VARS} hosts.update.yml setup.prep.only: - @ansible-playbook --inventory=$(INVENTORY) setup.prep.yml + @ansible-playbook --inventory=$(INVENTORY) ${ANSIBLE_EXTRA_VARS} setup.prep.yml setup.prep: local hosts.update.only setup.prep.only setup.prep.copy: - @ansible-playbook --inventory=$(INVENTORY) --start-at-task "copy ansible playbooks to setup machine" setup.prep.yml + @ansible-playbook --inventory=$(INVENTORY) ${ANSIBLE_EXTRA_VARS} --start-at-task "copy ansible playbooks to setup machine" setup.prep.yml setup.test.only: - @ansible-playbook --inventory=$(INVENTORY) setup.test.yml + @ansible-playbook --inventory=$(INVENTORY) ${ANSIBLE_EXTRA_VARS} setup.test.yml setup.cluster.only: - @$(VSSH) setup "make -C /home/vagrant/ansible setup.cluster" + @$(VSSH) setup "${SSH_EXTRA_VARS} make -C /home/vagrant/ansible setup.cluster" setup.cluster: setup.prep setup.test.only setup.cluster.only setup.clients: - @$(VSSH) setup "make -C /home/vagrant/ansible setup.clients" + @$(VSSH) setup "${SSH_EXTRA_VARS} make -C /home/vagrant/ansible setup.clients" setup.site: setup.cluster setup.clients diff --git a/vagrant/ansible/Makefile b/vagrant/ansible/Makefile index e3d3454..a0c6c95 100644 --- a/vagrant/ansible/Makefile +++ b/vagrant/ansible/Makefile @@ -1,13 +1,17 @@ INVENTORY := ./vagrant_ansible_inventory +ifdef EXTRA_VARS + ANSIBLE_EXTRA_VARS := -e '${EXTRA_VARS}' +endif + setup.test: - @ansible-playbook -i $(INVENTORY) ./test.local.yml + @ansible-playbook -i $(INVENTORY) ${ANSIBLE_EXTRA_VARS} ./test.local.yml setup.cluster: - @ansible-playbook -i $(INVENTORY) ./setup-cluster.yml + @ansible-playbook -i $(INVENTORY) ${ANSIBLE_EXTRA_VARS} ./setup-cluster.yml setup.clients: - @ansible-playbook -i $(INVENTORY) ./setup-clients.yml + @ansible-playbook -i $(INVENTORY) ${ANSIBLE_EXTRA_VARS} ./setup-clients.yml setup.site: setup.cluster setup.clients diff --git a/vagrant/ansible/roles/client.test.prep/defaults/test_repo.yml b/vagrant/ansible/roles/client.test.prep/defaults/main.yml index 614eb97..614eb97 100644 --- a/vagrant/ansible/roles/client.test.prep/defaults/test_repo.yml +++ b/vagrant/ansible/roles/client.test.prep/defaults/main.yml |