aboutsummaryrefslogtreecommitdiff
path: root/foreman_ansible_inventory.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-06-17 18:26:39 +0200
committerGitHub <noreply@github.com>2016-06-17 18:26:39 +0200
commit1cb9e9cec10de96f77880dbbf27259e4f23adbf3 (patch)
tree17e32ef7e215157f41926bad11af261df850a7f6 /foreman_ansible_inventory.py
parent8471ade8fd3dcb4d43eed91af45cfbe0b4deae4a (diff)
parent174840fdebaa1febfb07dfdaf5e0d405312d172f (diff)
Merge pull request #16 from mspaulding06/master
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()))