Fix substituting dots for underscores when using ips (#15578)

ec2.py was substituting the dots on ip addresses when not using hostnames like:
  "ec2": [
    "10_10_1_1", 

now it's:
  "ec2": [
    "10.10.1.1",
pull/9454/merge
Jorge Nerín 8 years ago committed by Brian Coca
parent 0f9eaedfa9
commit 3a3e69f830

@ -668,8 +668,8 @@ class Ec2Inventory(object):
# If we can't get a nice hostname, use the destination address
if not hostname:
hostname = dest
hostname = self.to_safe(hostname).lower()
else:
hostname = self.to_safe(hostname).lower()
# if we only want to include hosts that match a pattern, skip those that don't
if self.pattern_include and not self.pattern_include.match(hostname):

Loading…
Cancel
Save