I have a bunch of indecisive galaxy roles and many custom roles.
The problem is that I cannot simultaneously load my own roles and the roles of galaxies using the Vagrantfile :ansible .
Without tramps, this command works well when I added the ANSIBLE_ROLES_PATH environment ANSIBLE_ROLES_PATH :
ANSIBLE_ROLES_PATH=./custom_roles ansible-playbook project.yml --inventory dev.ini -vvvv --ask-sudo-pass
My Vagrant configuration is as follows:
config.vm.provision :ansible do |ansible| ansible.raw_arguments = ['--timeout=300'] ansible.playbook = "project.yml" ansible.verbose = "vvv" ansible.groups = { "env-dev:children" => ["app-web", "app-db"], "app-web" => ["my-app"], "app-db" => ["my-app"], } end
I see that autoload supporting roles are inside ./roles , but I cannot add my own roles to this directory due to version control ( ./roles is in my .gitignore )
Here is the directory structure to better understand what is going on:
- roles/ - postgresql/... - php/... - custom_roles/ - my-role-1/... - my-role-1/... - .gitignore <- ignore ./roles - project.yml - roles.yml - dev.ini - Vagrantfile
vagrant ansible
ClΓ©ment prΓ©vost
source share