What version of Ansible are you using? It works for me with v1.8.2. Even
when referencing an undefined variable, I don't get an exception.

Can you paste the nfs-client task which fails?

Tom


On 5 January 2015 at 05:55, hce h <[email protected]> wrote:

> Hi,
>
> I cannot install ansible to one of our NFS server, I tried to fake a
> dictionary variable at following playbook:
>
> - { role: nfs-client, nfsServer: { 'ansible_facts': { 'ansible_eth0' : {
> 'ipv4' : { 'address': 'hce.com' } } } } }
>
> The nfs-client tasks uses the variable nfsServer['ansible_facts'], but I
> got following error, it cannot find dictionary variable
> nfsServer['ansible_facts']:
>
> fatal: One or more undefined variables: 'dict' object has no attribute
> 'ansible_facts'.
>
> What I was missing the syntax here?
>
> Thanks.
>
> - j
>
>
>
>
>
>
>
>
>  --
> 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/995e60f0-a5f4-4a6c-971f-5dfd226f61d9%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/995e60f0-a5f4-4a6c-971f-5dfd226f61d9%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/CAAnNz0PCqvJUrkh%3DsZuY1H3tpGVngH6_DjXH9_0FMeSErb1quQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to