aboutsummaryrefslogtreecommitdiff
path: root/foreman_ansible_inventory.py
diff options
context:
space:
mode:
authorMatt Spaulding <matt.spaulding@nwea.org>2016-06-17 16:15:07 +0000
committerMatt Spaulding <matt.spaulding@nwea.org>2016-06-17 16:15:07 +0000
commit174840fdebaa1febfb07dfdaf5e0d405312d172f (patch)
tree17e32ef7e215157f41926bad11af261df850a7f6 /foreman_ansible_inventory.py
parent8471ade8fd3dcb4d43eed91af45cfbe0b4deae4a (diff)
Add environment ansible group
Diffstat (limited to 'foreman_ansible_inventory.py')
-rwxr-xr-xforeman_ansible_inventory.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/foreman_ansible_inventory.py b/foreman_ansible_inventory.py
index 2b2e68a..05c8d42 100755
--- a/foreman_ansible_inventory.py
+++ b/foreman_ansible_inventory.py
@@ -216,8 +216,8 @@ class ForemanInventory(object):
for host in self._get_hosts():
dns_name = host['name']
- # Create ansible groups for hostgroup, location and organization
- for group in ['hostgroup', 'location', 'organization']:
+ # Create ansible groups for hostgroup, environment, location and organization
+ for group in ['hostgroup', 'environment', 'location', 'organization']:
val = host.get('%s_name' % group)
if val:
safe_key = self.to_safe('%s%s_%s' % (self.group_prefix, group, val.lower()))