mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 07:35:31 +01:00
parent
68e7ddb7a7
commit
6e74dae76e
2 changed files with 7 additions and 3 deletions
3
changelogs/fragments/316_ansible_ssh_host_handling.yml
Normal file
3
changelogs/fragments/316_ansible_ssh_host_handling.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
bugfixes:
|
||||
- synchronize - handle ansible_ssh_host the same as ansible_host (https://github.com/ansible-collections/ansible.posix/issues/298).
|
||||
|
|
@ -235,10 +235,11 @@ class ActionModule(ActionBase):
|
|||
src_host = '127.0.0.1'
|
||||
inventory_hostname = task_vars.get('inventory_hostname')
|
||||
dest_host_inventory_vars = task_vars['hostvars'].get(inventory_hostname)
|
||||
dest_host = dest_host_inventory_vars.get('ansible_host', inventory_hostname)
|
||||
|
||||
dest_host = dest_host_inventory_vars.get('ansible_host') or \
|
||||
dest_host_inventory_vars.get('ansible_ssh_host', inventory_hostname)
|
||||
dest_host_ids = [hostid for hostid in (dest_host_inventory_vars.get('inventory_hostname'),
|
||||
dest_host_inventory_vars.get('ansible_host'))
|
||||
dest_host_inventory_vars.get('ansible_host'),
|
||||
dest_host_inventory_vars.get('ansible_ssh_host'))
|
||||
if hostid is not None]
|
||||
|
||||
localhost_ports = set()
|
||||
|
|
|
|||
Loading…
Reference in a new issue