From 12c302cee9eced7875d049c7b8e108ca0583b52b Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 14 Apr 2022 14:18:48 +0000 Subject: [PATCH] Update hostname_variable tag override example. (#618) (#1066) [PR #618/cb2b186f backport][stable-2] Update hostname_variable tag override example. This is a backport of PR #618 as merged into stable-3 (cb2b186). SUMMARY Between Ansible Tower 3.6 and 3.7, the tag formatting changed for overriding the hostname variable. Users doing the 3.7 upgrade may be surprised when their inventories update with the ip##-##-##-##.example.com hostname format when they were previously able to import from AWS using the Name tag as the inventory identifier. ISSUE TYPE Docs Pull Request COMPONENT NAME ec2\ Reviewed-by: Mark Chappell --- scripts/inventory/ec2.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/inventory/ec2.ini b/scripts/inventory/ec2.ini index d5e4742032e..675f6d74025 100644 --- a/scripts/inventory/ec2.ini +++ b/scripts/inventory/ec2.ini @@ -33,8 +33,8 @@ destination_variable = public_dns_name # This allows you to override the inventory_name with an ec2 variable, instead # of using the destination_variable above. Addressing (aka ansible_ssh_host) -# will still use destination_variable. Tags should be written as 'tag_TAGNAME'. -#hostname_variable = tag_Name +# will still use destination_variable. Tags should be written as 'tag:TAGNAME'. +#hostname_variable = tag:Name # For server inside a VPC, using DNS names may not make sense. When an instance # has 'subnet_id' set, this variable is used. If the subnet is public, setting