From 5397e984a4ee17d21c6063a873ffa07a9a6fed9e Mon Sep 17 00:00:00 2001 From: Steve Clatterbuck Date: Mon, 11 Sep 2017 19:18:17 -0500 Subject: [PATCH] Added Mac Address title to txt_table --- src/ansiblecmdb/data/tpl/txt_table.tpl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ansiblecmdb/data/tpl/txt_table.tpl b/src/ansiblecmdb/data/tpl/txt_table.tpl index 34b9911..5736baa 100644 --- a/src/ansiblecmdb/data/tpl/txt_table.tpl +++ b/src/ansiblecmdb/data/tpl/txt_table.tpl @@ -10,6 +10,7 @@ cols = [ {"title": "Name", "id": "name", "visible": True, "field": lambda h: h.get('name', '')}, {"title": "OS", "id": "os", "visible": True, "field": lambda h: h['ansible_facts'].get('ansible_distribution', '') + ' ' + h['ansible_facts'].get('ansible_distribution_version', '')}, {"title": "IP", "id": "ip", "visible": True, "field": lambda h: host['ansible_facts'].get('ansible_default_ipv4', {}).get('address', '')}, + {"title": "Mac", "id": "mac", "visible": True, "field": lambda h: host['ansible_facts'].get('ansible_default_ipv4', {}).get('macaddress', '')}, {"title": "Arch", "id": "arch", "visible": True, "field": lambda h: host['ansible_facts'].get('ansible_architecture', 'Unk') + '/' + host['ansible_facts'].get('ansible_userspace_architecture', 'Unk')}, {"title": "Mem", "id": "mem", "visible": True, "field": lambda h: '%0.0fg' % (int(host['ansible_facts'].get('ansible_memtotal_mb', 0)) / 1000.0)}, {"title": "MemFree", "id": "memfree", "visible": True, "field": lambda h: '%0.0fg' % (int(host['ansible_facts'].get('ansible_memfree_mb', 0)) / 1000.0)},