summaryrefslogtreecommitdiffstats
path: root/vagrant/ansible
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2020-05-16 21:06:09 +0100
committerMichael Adam <obnox@samba.org>2020-05-18 13:05:50 +0200
commit9d1638757ddab05ebaca2248c28fd57830a2c4f4 (patch)
tree7d5d4e69d4b598e97f62689fe473ba8048785713 /vagrant/ansible
parent53fe7a7065ef25d349f765fdefcdc787072ec776 (diff)
downloadsamba-integration-9d1638757ddab05ebaca2248c28fd57830a2c4f4.tar.gz
samba-integration-9d1638757ddab05ebaca2248c28fd57830a2c4f4.tar.xz
samba-integration-9d1638757ddab05ebaca2248c28fd57830a2c4f4.zip
Take extra environmental variable EXTRA_VARS
To allow users to override variables used in the ansible playbooks. This at the moment is only used for test_repo and test_repo_branch to allow users to specify the repo and branch to used to run their test. Extra variables specified in the form EXTRA_VARS="test_repo=https://github.com/spuiuk/samba-integration.git test_repo_branch=tests-consistency_check" make setup.site Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Diffstat (limited to 'vagrant/ansible')
-rw-r--r--vagrant/ansible/Makefile10
-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
2 files changed, 7 insertions, 3 deletions
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