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/CAJ5XC8%3DZ7gwLb3NgTL%2Bm1D8GuE%2B%2BU%3DSdawMokdZFjj4D-vEdQg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.