Created
March 11, 2016 13:34
-
-
Save arondeparon/33766c8c44e4a27fcca7 to your computer and use it in GitHub Desktop.
Automatically install Ansible requirements when executing Vagrant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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