We've discussed fact caching options in the past.

There may be some in the future.

Until now, talk to the hosts first.




On Thu, Jun 5, 2014 at 11:14 AM, Dick Davies <[email protected]> wrote:

> Is there an option to use the FQDNs in the inventory itself then?
> If they resolve then you don't need to facts gather, right?
>
> On 4 June 2014 16:50, Michael Mahemoff <[email protected]> wrote:
> > 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 <[email protected]>
> >> 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 [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/2b8c908f-ab9e-4e64-b0fd-e822252a96de%40googlegroups.com
> .
> >>> 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/14870b07-c42a-4e2c-ae11-bbc97f26b5f5%40googlegroups.com
> .
> >
> > 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/CAK5eLPRkH7DXDqz65Bpwba1kt%2BLuGRw70QC1hBgCzQJVHKa2Zw%40mail.gmail.com
> .
> 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%2BnsWgyWcXzrd4G%2BFnMrkFZqKr-z-0H9%2BL0i9qLtuxmLKQ-Xuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to