Hi All,
Maybe there is already a setting for this and I am just missing it…
With the ansible-playbook command line how do I specify the directory to use for the roles?
Right now I have things set up sort of like follows:
ourhosts.ini
ourvariables.yml
deploy_nyc.yml
deploy_ams.yml
deploy_sgp.yml
roles/
common/
webtier/
monitoring/
fooapp/
Inside each of our deploy_nyc.yml files we target different hosts with different roles etc. In order not to have to remember many of the details of each of the scripts we might turn around and have lots of these scripts. Eg
deploy_blogsite_nyc.yml
deploy_fullmonitoring_sgp.yml,
etc.
In that way we just tweak these scripts with the hosts and tags and roles etc we want… But to do this I would like to be able to have the structure:
ourhosts.ini
ourvariables.yml
deploy/
deploy_nyc.wml
deploy_ams.yml
deploy_sgp.yml
roles/
common/
webtier/
monitoring/
fooapp/
And then I would like to be able to open up a command line and go something like:
cd deploy
ansible-playbook --inventory-file=“…/outhosts.ini” --extra-vars=“…/ourvariables.yml” --roles-directory=“…/roles” deploy_nyc.yml
but --roles-directory doesn’t exist. Does some other thing exist to do this? If not is this a reasonable thing to add?
Thanks!
Jason