mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #11663 from whereismyjetpack/fix_ansible_ssh_host
only set ansible_ssh_host if not already set
This commit is contained in:
commit
a1a8997e89
1 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,9 @@ class Host:
|
|||
results = combine_vars(results, self.vars)
|
||||
results['inventory_hostname'] = self.name
|
||||
results['inventory_hostname_short'] = self.name.split('.')[0]
|
||||
results['ansible_ssh_host'] = self.ipv4_address
|
||||
|
||||
if 'ansible_ssh_host' not in results:
|
||||
results['ansible_ssh_host'] = self.ipv4_address
|
||||
|
||||
if 'ansible_ssh_port' not in results:
|
||||
results['ansible_ssh_port'] = C.DEFAULT_REMOTE_PORT
|
||||
|
|
Loading…
Reference in a new issue