From 0794d38a99b7d84fafd65ad9ab0570b3f8f392ed Mon Sep 17 00:00:00 2001 From: "Shawn K. O'Shea" Date: Tue, 8 Jun 2021 17:00:56 -0400 Subject: [PATCH] Support ansible collections installation Combine ability to install roles to root-owned path https://www.vagrantup.com/docs/provisioning/ansible_local#install-galaxy-roles-in-a-path-owned-by-root with support to also install collections https://github.com/hashicorp/vagrant/issues/10958#issuecomment-724431455 --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 4f089d9..7db49ce 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -18,7 +18,7 @@ Vagrant.configure("2") do |config| ansible.playbook = "playbook.yml" ansible.galaxy_role_file = "requirements.yml" ansible.galaxy_roles_path = "/etc/ansible/roles" - ansible.galaxy_command = "sudo ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --force" + ansible.galaxy_command = "sudo ansible-galaxy collection install -r %{role_file} --force && sudo ansible-galaxy role install -r %{role_file} --force" ansible.provisioning_path = "/ansible" ansible.compatibility_mode = "2.0" #ansible.verbose = '-vvvv'