Merge pull request #48771 from gtmanfred/2018.3

only do reverse dns lookup on ips for salt-ssh
This commit is contained in:
Nicole Thomas 2018-07-26 11:41:40 -04:00 committed by GitHub
commit 5ea43817ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: