From 2374853e226d43aa14d997e40a73853798634ccd Mon Sep 17 00:00:00 2001 From: award Date: Thu, 10 Jul 2014 16:19:56 -0400 Subject: Add hostgroup to the host description output --- theforeman.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/theforeman.py b/theforeman.py index 809bf3f..8bbd816 100755 --- a/theforeman.py +++ b/theforeman.py @@ -43,6 +43,7 @@ based on the data obtained from Foreman: - created - updated - status + - hostgroup - ansible_ssh_host When run in --list mode, instances are grouped by the following categories: @@ -146,6 +147,7 @@ They must be specified via ini file.''' 'created': meta.get('created_at'), 'updated': meta.get('updated_at'), 'status': meta.get('status'), + 'hostgroup': self._get_hostgroup_from_id(meta.get('hostgroup_id')), # to ssh from ansible 'ansible_ssh_host': meta.get('ip'), } -- cgit 1.4.1