Use hostname in group_by_aws_account to prevent duplicates. (#34053)

Fix typo. The use of `dest` for group_by_aws_account causes the group to be produced using IP and to duplicate the hosts in the inventory.

Fixes #23772

Signed-off-by: bo <robert@jbanetwork.com>
pull/34069/head
Robert "Bo" Davis 7 years ago committed by Sloane Hertel
parent bf8d695ec3
commit b5c0141fb0

@ -1026,7 +1026,7 @@ class Ec2Inventory(object):
# Inventory: Group by AWS account ID
if self.group_by_aws_account:
self.push(self.inventory, self.aws_account_id, dest)
self.push(self.inventory, self.aws_account_id, hostname)
if self.nested_groups:
self.push_group(self.inventory, 'accounts', self.aws_account_id)

Loading…
Cancel
Save