Skip to content

Instantly share code, notes, and snippets.

@ArondeParon
Created March 11, 2016 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArondeParon/33766c8c44e4a27fcca7 to your computer and use it in GitHub Desktop.
Save ArondeParon/33766c8c44e4a27fcca7 to your computer and use it in GitHub Desktop.
Automatically install Ansible requirements when executing Vagrant
# Put this before Vagrant.configure and you're good to go
def install_ansible_requirements
dir = File.dirname(File.expand_path(__FILE__))
if (File.exist?("#{dir}/ansible/requirements.yml"))
system "ansible-galaxy install -r #{dir}/ansible/requirements.yml"
end
end
install_ansible_requirements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment