Assume I run a playbook with --limit A

Host A accesses hosvars['B']. But these vars are not available. 

I know I can write a *now* playbook and call it without limit, like 

  - hosts: all 
    gather_facts: true 
  - hosts: "A" 
    (( actions ))

but this requires me to write a new playbook, and defeats the purpose of 
the --limit option. Unfortunately host caching also doesn't work here, as 
it only caches remote facts and not the vars defined in the host_vars and 
group_vars directories. 

Another super-ugly workaround is to make the login to host B fail (set an 
invalid username in inventories file), but I think it's obvious that this 
is terrible ;-)

So how can I use --limit  in combination with 
hostvars['some_host_out_of_limit']? 


-- 
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/9d9ce0e0-0300-4945-9f7b-b8a823f2b71c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to