The idiomatic way is:

- hosts: thisserver
  tasks: []

- hosts: webservers
  tasks:
    -

Rather than have the delegate_to in there, as that will run once per host
in the host loop and will be very abusive of that extra server or servers

Or just

- hosts: all
  tasks: []

- hosts: webservers
  gather_facts: no  # already done
  tasks:
    -


On Thu, Dec 18, 2014 at 10:44 AM, Antoine Rouaze <[email protected]>
wrote:
>
> Ok, with these two ways I can get the facts like this
> "hostvars['mrk-test-sql1']"
>
> Thanks for the help !
>
> Antoine Rouaze
>
> On Thursday, December 18, 2014 4:33:37 PM UTC+1, Brian Coca wrote:
>>
>> Currently, 2 ways:
>>
>> - create a first play that just gathers on all hosts, it can be in
>> same file as the current play or not, but it needs to be run on the
>> same ansible invocation.
>> - enabled fact caching, you just have to have contacted that host
>> withing the cache lifetime.
>>
>>
>>
>> --
>> Brian Coca
>>
>  --
> 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/b3a78178-b931-4300-817d-6c6d08a13f89%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/b3a78178-b931-4300-817d-6c6d08a13f89%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 [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/CA%2BnsWgxmtC_BmrS5nCvNn0JaweWqPL%3D7u6yuc%2BtOvPciux92oA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to