summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2020-03-23 18:32:18 +0100
committerMichael Adam <obnox@samba.org>2020-03-25 22:32:23 +0100
commit09a0c42ac33cc4f09ddff85e81352a2db8563cb2 (patch)
treea5b5bd92d40bc286881cc33568b4aec3edc988a7
parent0a6172336dd09795807292a549d3167f2740755d (diff)
downloadsamba-integration-09a0c42ac33cc4f09ddff85e81352a2db8563cb2.tar.gz
samba-integration-09a0c42ac33cc4f09ddff85e81352a2db8563cb2.tar.xz
samba-integration-09a0c42ac33cc4f09ddff85e81352a2db8563cb2.zip
Add a setup VM.
This also adds a no-op playbook run after setting up the setup vm. The effect of this is to let this generate the ansible inventory for running ansible outside of vagrant. Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r--vagrant/Vagrantfile11
-rw-r--r--vagrant/no-op-playbook.yml4
2 files changed, 15 insertions, 0 deletions
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index c8852cd..e675f1f 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -35,4 +35,15 @@ Vagrant.configure("2") do |config|
end
end
end
+
+ # setup vm:
+ # We will runn all our setup playbooks from there.
+ config.vm.define "setup" do |setup|
+ setup.vm.hostname = "setup"
+ # Run a no-op playbook to create the inventory file.
+ # Based on that, one can run ansible without vagrant.
+ setup.vm.provision "no-op", type:'ansible' do |ansible|
+ ansible.playbook = "no-op-playbook.yml"
+ end
+ end
end
diff --git a/vagrant/no-op-playbook.yml b/vagrant/no-op-playbook.yml
new file mode 100644
index 0000000..bf01d5e
--- /dev/null
+++ b/vagrant/no-op-playbook.yml
@@ -0,0 +1,4 @@
+---
+- name: no-op
+ hosts: all
+ gather_facts: no