When I do this:
{{ hostvars['server1']['timestamp.stdout'] }}

as in: 
      - name: "Backup {{ proddbname }} Database"
        mysql_db: "state=dump name={{ proddbname }} target={{ homedir }}{{ 
proddbname }}{{ hostvars['server01']['timestamp.stdout'] }}.sql.gz"

It gives me the error
fatal: [proddbhost]: FAILED! => {"failed": true, "msg": "'dict object' has 
no attribute 'timestamp.stdout'"}


On Friday, May 20, 2016 at 8:56:35 AM UTC-5, Brian Coca wrote:
>
> hostvars are not accessible at the play level, but should be accessible 
> within the play.
>
>
> ----------
> Brian Coca
>

-- 
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/f784a2ba-9fb2-4875-93e1-011d8efdc080%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to