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",
This commit is contained in:
Jorge Nerín 2016-04-25 15:22:00 +01:00 committed by Brian Coca
parent 0f9eaedfa9
commit 3a3e69f830

View file

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