I have the following inventory:
test1 ansible_host=127.0.22.1
test2 ansible_host=127.0.22.2
and the following playbook:
I have the following inventory:
test1 ansible_host=127.0.22.1
test2 ansible_host=127.0.22.2
and the following playbook:
Is it a bug, that set_fact ignores delegate_facts?
I can speculate since the documentation is a little iffy.
In the documentation is says
"delegate_facts
Boolean that allows you to apply facts to delegated host instead of inventory_hostname."
"Delegated facts
By default, any fact gathered by a delegated task are assigned to the inventory_hostname (the current host) instead of the host which actually produced the facts (the delegated to host). In 2.0, the directive delegate_facts may be set to True to assign the task’s gathered facts to the delegated host instead of the current one"
So it seams that delegate_facts only work on gather facts, aka the setup module and not the set_facts that set a fact on host.