I tried your suggestion, and also Brian's following suggestion of a 
different variable, and it reports:

ERROR! 'hostvars' is undefined

And I can debug out all the hostvars in all the task calls with no issue as 
long as I am not trying to call the role.

pre_tasks:
  - debug: var=dorole
  - debug: var=hostvars[inventory_hostname]['dorole']

Maybe an order of processing issue?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/456012c2-0c86-4679-81ed-16f32364f04d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to