mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #48771 from gtmanfred/2018.3
only do reverse dns lookup on ips for salt-ssh
This commit is contained in:
commit
5ea43817ab
1 changed files with 3 additions and 1 deletions
|
@ -350,7 +350,9 @@ class SSH(object):
|
|||
return
|
||||
|
||||
hostname = self.opts['tgt'].split('@')[-1]
|
||||
needs_expansion = '*' not in hostname and salt.utils.network.is_reachable_host(hostname)
|
||||
needs_expansion = '*' not in hostname and \
|
||||
salt.utils.network.is_reachable_host(hostname) and \
|
||||
salt.utils.network.is_ip(hostname)
|
||||
if needs_expansion:
|
||||
hostname = salt.utils.network.ip_to_host(hostname)
|
||||
if hostname is None:
|
||||
|
|
Loading…
Add table
Reference in a new issue