If you use limit it won't gather facts from machines not in the limit group.
(There have been a few threads about this) On Fri, May 16, 2014 at 11:13 AM, Dick Davies <[email protected]>wrote: > Hi, > > I've got a fairly complex playbook which uses Ansibles > orchestration features > (i.e. "for n in groups['some group'] ....") and a big enough stack > that I'd like to pass '--limit' to my plays as we build out configs etc. > > An example: several servers lookup members of the 'zookeepers' > group to generate their config files > (this is just one example; different hosts have different dependencies). > > So if i try > > ansible-playbook -i inventory site.yml --limit nonzkhost > > the run fails with: > > fatal: [nonzkhost1] => {'msg': "One or more undefined variables: 'dict > object' has no attribute 'ansible_eth1'", 'failed': True} > > To use the '--limit' flag, I have to remember to also list all > zookeepers in a play. > Similar issues happen with Ansibles 'retry' feature. > > I think my issue is that I need actual facts gathered from those hosts > rather than just their names (which are accessible in the inventory of > course). > > Is there a flag I can pass to get a full 'GATHER FACTS' pass before > only running a play against selected nodes, or am I just Doing It Wrong > here? > > -- > 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/CAK5eLPTkZk-o0egFBu9kgZDKHrbOW1W5JvxFA_fDj2rBa0RGkw%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%2BnsWgzp-CQUqp%3DoXHcRZPvxBq4XmwTteTQRoBehzAmKumjfcA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
