Ansible Dynamic Inventory - generate inventory with ip addresses under specific tag with underscore instead of dot
It works if I comment out the hostname_variable, because it allow to override the inventory_name with an ec2 variable, instead of using the destination_variable

#hostname_variable = private_ip_address
#hostname_variable = ip_address
destination_variable = public_dns_name
vpc_destination_variable = private_ip_address


For Private IPs:

destination_variable = private_ip_address