From 9ead92d08b2307b14daabd6051430a2fd0dde0af Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Sat, 10 Nov 2018 03:04:35 +0100 Subject: [PATCH] Adding support for libvirt-based images. Automatize management of inventory for provisioning on up action. --- Vagrantfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 3b7b9bb..c475ca9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -18,6 +18,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| vb.name = "NethServer" end + config.vm.provider :libvirt do |lv| + lv.name = "NethServer" + end + # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs # `vagrant box outdated`. This is not recommended. @@ -127,7 +131,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # # chef.validation_client_name = "ORGNAME-validator" config.vm.provision "ansible" do |ansible| - ansible.inventory_path = "provision_hosts" + # Using default dynamic inventory ansible.playbook = "provision.yml" + ansible.groups = { + "vagrant" => [ "NethServer" ] + } + ansible.compatibility_mode = "2.0" end end