diff options
| author | award <award@rentpath.com> | 2014-07-10 16:19:56 -0400 |
|---|---|---|
| committer | award <award@rentpath.com> | 2014-07-10 16:19:56 -0400 |
| commit | 2374853e226d43aa14d997e40a73853798634ccd (patch) | |
| tree | 2aec5068f5fa0cb13cdfdf62457e1f6fab2dd600 /theforeman.py | |
| parent | Add support for child hostgroups (diff) | |
| download | ansible-foreman-inventory-2374853e226d43aa14d997e40a73853798634ccd.tar.gz | |
Add hostgroup to the host description output
Diffstat (limited to 'theforeman.py')
| -rwxr-xr-x | theforeman.py | 2 |
1 files changed, 2 insertions, 0 deletions
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'), } |
