mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-11-24 09:53:40 +00:00
ACA-4558: synchronize: use ansible_host from play vars when absent from hostvars (#779)
* synchronize: use ansible_host from play vars when absent from hostvars The synchronize action plugin built the rsync/ssh destination exclusively from task_vars['hostvars'][inventory_hostname]. When ansible_host was set via play-level vars: rather than inventory/ group_vars/host_vars, it was absent from that snapshot and the plugin silently fell back to bare inventory_hostname, producing 'Host not found' errors when ansible_host differed from the inventory name. Fixes #469
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
bugfixes:
|
||||
- synchronize - fall back to ``ansible_host`` and ``ansible_password``/``ansible_ssh_pass``
|
||||
from the current host's task vars when absent from the cached ``hostvars``
|
||||
snapshot (for example when set via play-level ``vars:``), and correctly
|
||||
template ``ansible_host`` before building the rsync destination, fixing
|
||||
"Host not found" errors when ``ansible_host`` differs from
|
||||
``inventory_hostname`` (https://github.com/ansible-collections/ansible.posix/issues/469).
|
||||
Reference in New Issue
Block a user