When using delegate_to with an IP address, ansible does use the corresponding host in the inventory, and so not respect the ansible_user variable of the delegate host. Here we revert to using the delegate host's inventory hostname, and force ansible to respect the ansible_host variable of that host by setting the variable in the task explicitly.
5.9 KiB
5.9 KiB