Hello,

I'm attempting to make some things happen with nested playbooks. Seems like 
including full on playbooks (as opposed to "taskbooks") from within "tasks" 
is not supported as described here 
<https://github.com/ansible/ansible/issues/15309#issuecomment-206786728>. Doing 
vars, vars_files, vars_prompts are not supported when including at the 
playbook level is not supported. Also, doing variable substitution at this 
level is also tricky. Doing variable substitution with variables supplied 
at the inventory level (IE group_vars) is not supported. This also seems to 
be the case with group_vars at the playbook level. However, extra-vars are 
able to be substituted as described here 
<https://groups.google.com/d/msg/ansible-project/WdvouAZ3BUM/ORDHjqCZgJAJ>.

I figured maybe I'd be able to get around some of these things by using 
callbacks or vars_plugins. Callbacks seem to happen after playbook parsing 
so that is a no go. The vars_plugins don't seem to be able to access 
variables at the same scope that extra-vars are at. I can manipulate the 
'all' group but that doesn't seem to matter. Judging by the post in the 
previous link a dynamic inventory wont' help.

Only solution I'm seeing currently is creating some sort of wrapper around 
ansible-playbook that passes the correct extra-vars or requiring my users 
to pass something which I'm not really fond of. Is there any way I can 
extend Ansible to allow for manipulating the extra-vars variables so I can 
do variable substitution at the playbook level?

Any help would be much appreciated. I am usually able to navigate around 
any Ansible problems I have but seem to be stuck on this one.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to