mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-26 08:26:28 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user