How do I register a variable and persist it between plays targeted on different nodes?
The problem you’re running into is that you’re trying to reference facts/variables of one host from those of another host. You need to keep in mind that in Ansible, the variable foo assigned to the host localhost is distinct from the variable foo assigned to the host main or any other host. If you want … Read more