Open seanho00 opened 6 years ago
When using hostvars
to access variables of a host not in the current play, inventory variables are available, but not host facts.
The tinc role (tasks/main.yml
for servers) doesn't have this issue, because all the info needed from hosts not in current play is in inventory vars, not host facts.
The issue here is xnbd_address
is set (in inventory) to the host's VPN address, which needs to be gleaned from host facts; it is not set in inventory.
Facts for hosts not in play should be accessible, because we're using fact caching.
Perhaps it's a one-pass jinja templating issue?
xnbd-client task only works properly when all xnbd-servers are in the current play.
Template
client.conf
fails to get proper VPN IP for each host in xnbd-server group, when role is run fromsite.yml
for a specific client host.Works when run from
plays/xnbd.yml
playbook for all xnbd hosts together in same play.