summaryrefslogtreecommitdiffstats
path: root/bin/ansibleutil.py
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-02-12 11:26:17 -0500
committerKenny Woodson <kwoodson@redhat.com>2015-02-12 11:26:17 -0500
commit698acd553375caf64cee821d8c1af3e468f9f4dd (patch)
tree3a4d5f3b4d53770ee3313fcd1beb6f946f935751 /bin/ansibleutil.py
parentaafbcce3605b7f992ba4b73d67286dbb40461baa (diff)
parentd751d4d53a73a7cf7096e55777b1a7c321bb4732 (diff)
downloadopenshift-698acd553375caf64cee821d8c1af3e468f9f4dd.tar.gz
openshift-698acd553375caf64cee821d8c1af3e468f9f4dd.tar.bz2
openshift-698acd553375caf64cee821d8c1af3e468f9f4dd.tar.xz
openshift-698acd553375caf64cee821d8c1af3e468f9f4dd.zip
Merge pull request #55 from kwoodson/oscp
oscp tooling
Diffstat (limited to 'bin/ansibleutil.py')
-rw-r--r--bin/ansibleutil.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/ansibleutil.py b/bin/ansibleutil.py
index b12b7b447..b9f37726e 100644
--- a/bin/ansibleutil.py
+++ b/bin/ansibleutil.py
@@ -17,7 +17,8 @@ class AnsibleUtil(object):
if args:
cmd.extend(args)
- env = {}
+ env = os.environ
+
p = subprocess.Popen(cmd, stderr=subprocess.PIPE,
stdout=subprocess.PIPE, env=env)
@@ -52,7 +53,7 @@ class AnsibleUtil(object):
return groups
- def build_host_dict(self, args=[]):
+ def build_host_dict_by_env(self, args=[]):
inv = self.get_inventory(args)
inst_by_env = {}
@@ -62,8 +63,5 @@ class AnsibleUtil(object):
host_id = "%s:%s" % (host['ec2_tag_Name'],host['ec2_id'])
inst_by_env[host['ec2_tag_environment']][host_id] = host
-
return inst_by_env
-
-