That's the puppy!

Thanks for the insight. That template syntax doesn't seem to be documented 
anywhere that I can see. Might be useful if it was...

Thanks

Jerry


On Thursday, 7 May 2015 17:06:40 UTC+1, Brian Coca wrote:
>
> not sure why you expect those vars to be part of host, your definition 
> makes them accessible like this: 
>
> {% for host in shinken_hosts %} 
> define host{ 
>   use         generic-host 
>   host_name   {{ host.name }} 
>   address     {{ host.address }} 
>   alias        {{ host.name }} 
>   check_command    {{ check_command }} 
>   _SSHPORT    {{ ssh_port }} 
>   contacts    {{ contacts }} 
> } 
> {% endfor %} 
>
> which is different from how you define them in the shinken_hosts 
>
> I think you want: 
> {% for host in shinken_hosts %} 
> define host{ 
>   use         generic-host 
>   host_name   {{ host.name }} 
>   address     {{ host.address }} 
>   alias        {{ host.name }} 
>   check_command    {{ host.check_command|default(check_command) }} 
>   _SSHPORT    {{ host.ssh_port|default(ssh_port) }} 
>   contacts    {{ host.contacts|default(contacts) }} 
> } 
> {% endfor %} 
>
>
> -- 
> 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/4fba063f-24b3-4130-89ce-4248a725d929%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to