Skip to content

Commit 47e0bbe

Browse files
author
mstanescu_adobe
committed
Inventory does not require changes in display
1 parent 64ee357 commit 47e0bbe

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/ops/cli/inventory.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def run(self, args, extra_args):
5555
group_string = ", ".join(group_names)
5656
host_id = host.vars.get('ec2_InstanceId', '')
5757
if host_id != '':
58-
name_and_id = "%s -- %s" % (stringc(self.get_ec2_hostname(host), 'blue'),
59-
stringc(host.name, 'blue'))
58+
name_and_id = "%s -- %s" % (stringc(host.name,
59+
'blue'), stringc(host_id, 'blue'))
6060
else:
6161
name_and_id = "%s" % stringc(host.name, 'blue')
6262
display("%s (%s)" % (name_and_id, stringc(group_string, 'green')))
@@ -68,9 +68,6 @@ def get_inventory_hosts(self, args):
6868

6969
return self.ansible_inventory.get_hosts(limit)
7070

71-
def get_ec2_hostname(self, host):
72-
return host.vars.get('ec2_tag_hostname') or host.vars.get('ec2_tag_Adobe_FQDN') or host.vars.get('ec2_tag_CMDB_hostname') or ''
73-
7471
def get_host_facts(self, host, indent="\t"):
7572
vars = host.get_vars()
7673
ret = yaml.dump(

0 commit comments

Comments
 (0)