# Use of --limit crashes the play because of missing facts in the dict

**URL:** <https://forum.ansible.com/t/use-of-limit-crashes-the-play-because-of-missing-facts-in-the-dict/14377>\
**Category:** Ansible Project\
**Created:** [January 18, 2014, 8:09am UTC](https://forum.ansible.com/t/use-of-limit-crashes-the-play-because-of-missing-facts-in-the-dict/14377 "2014-01-18T08:09:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes\_Zillmann](https://avatars.discourse-cdn.com/v4/letter/j/58f4c7/32.png) [@Johannes\_Zillmann](https://forum.ansible.com/u/Johannes_Zillmann)\
**Post date:** [January 18, 2014, 8:09am UTC](https://forum.ansible.com/t/use-of-limit-crashes-the-play-because-of-missing-facts-in-the-dict/14377/1 "2014-01-18T08:09:50Z")

</div>

Hi guys,

i have an playbook an its likely to fail with a timeout since i’m targeting ec2.  
So i usually retry with the --limit option.

Now the thing is that every host in the play need the address of the provided ‘master’ host. Accessing it with

> {{ hostvars[groups[‘master’][0]][‘ansible\_fqdn’] }}

But when the master is excluded in a the retry operation because it was successful in the first run, the above code will fail with

> {‘msg’: “One or more undefined variables: ‘dict’ object has no attribute ‘ansible\_fqdn’”, ‘failed’: True}

Is there any way fixing this without dropping the use of --limit ?

best regards  
Johannes

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [January 18, 2014, 9:46pm UTC](https://forum.ansible.com/t/use-of-limit-crashes-the-play-because-of-missing-facts-in-the-dict/14377/2 "2014-01-18T21:46:35Z")

</div>

This is a limitation of using limit groups.
