Have you found a way to solve this for the --limit case? On Tuesday, September 10, 2013 7:22:34 AM UTC-6, Nick Groenen wrote: > > I have a very large playbook which configures our entire > infrastructure. Because of this, various steps are tagged so that only > specific parts of the playbook can be run, cutting down on runtime > when required. > > Parts of this setup use facts/hostvars to automatically create correct > configuration files. For example, nginx config adding all the > application servers that are defined in the inventory to the correct > upstream definitions, and iptables on the appservers automatically > opening up the correct ports to the loadbalancers. > > However, when running the playbook with --limit, or --tags, not all > hosts are contacted, and as a result, facts aren't available on every > system in the infrastructure. This causes all kinds of problems for my > setup, obviously. > > Is there any way to force gathering of facts on all hosts, even when > specifying one of these options? Or another way to deal with this > situation that I haven't thought of? > > Right now, I'm solving it for the --tags case by having one task at > the start of the playbook, which simply calls the ping module and has > every tag that's used listed. This way, this task is kicked off no > matter which tag is specified, causing facts to be gathered on every > system in our inventory. > > Obviously, this isn't a practical solution however, nor does it solve > the case where limit it used. >
-- 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]. For more options, visit https://groups.google.com/groups/opt_out.
