I needed
{% if 'ansible_br305' in hostvars[hosts] %} and it works!
Thanks.
On Thursday, October 2, 2014 3:39:44 PM UTC-7, Barry Morrison wrote:
>
> I have some legacy servers, and I have some servers that aren't legacy and
> being built a new way with new network interfaces.
>
> The playbook/template worked matching on the old template and facts, but
> now that a new interface exists, I need to see if it it exists, and if it
> does, use it.
>
> I've got this https://gist.github.com/esacteksab/b1b2439fa6acb68dfc1e
>
> And errors but -vvvv isn't clear what host(s) it's failing on.
>
> Is this supported in the template? Is the matching correct as far as
> hostvars[host]['ansible_br305'] or is there some other way to get at facts
> in a template?
>
> Thanks!
>
--
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/432e9b84-4370-4d6d-a412-21b2b4578aa0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.