True, the dummy boilerplate is small, but it has to precede every playbook. 
(I also thought it had to include at least one task to be in effect.)

The main issue is performance. I'm not dynamically provisioning, so these 
things never change. I thought maybe there's some trick people are using to 
avoid the lookup, e.g. automatically using DNS/hosts file or 
auto-generating config files.

On Wednesday, June 4, 2014 3:16:03 PM UTC+1, James Cammarata wrote:
>
> It's really not bad, the "dummy" play just looks like this:
>
> - hosts: all
>
> And that's it, followed by other plays. You can limit it more of course, 
> if you don't need facts about every system in your inventory, but the setup 
> step needs to be run on systems to get their facts. However it only needs 
> to be run once, and after that all other plays can specify "gather_facts: 
> no" to skip it.
>
>
> On Tue, Jun 3, 2014 at 8:40 PM, Michael Mahemoff <mic...@mahemoff.com 
> <javascript:>> wrote:
>
>> I know this has come up before, but I've not come across a real answer 
>> for it.
>>
>> It's common for a given host to depend on other hosts. App servers need 
>> to know the IP of databases they consume, databases need to know IPs of app 
>> servers that will be accessing them etc etc. In Ansible, the IP of other 
>> hosts is not automatically exposed. One practice I've seen is to run a 
>> dummy play just to force the other host's facts to be discovered, but this 
>> gets tedious, clutters up scripts, and slows down their execution. I'm sure 
>> there must be a better way, but I don't know what.
>>  
>> -- 
>> 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 ansible-proje...@googlegroups.com <javascript:>.
>> To post to this group, send email to ansible...@googlegroups.com 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/2b8c908f-ab9e-4e64-b0fd-e822252a96de%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/2b8c908f-ab9e-4e64-b0fd-e822252a96de%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/14870b07-c42a-4e2c-ae11-bbc97f26b5f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to