diff options
author | Matt Woodson <mwoodson@redhat.com> | 2015-02-13 09:54:04 -0500 |
---|---|---|
committer | Matt Woodson <mwoodson@redhat.com> | 2015-02-13 09:54:04 -0500 |
commit | 2a8f7ab95107eb4ea353a8d42ecc19d1ebd32395 (patch) | |
tree | db26792e269281b89a81d0a1c7f51d437e8735ce /bin/ansibleutil.py | |
parent | 71c0c0c6d3dd2b3360604b118b496107b0f76d37 (diff) | |
parent | 698acd553375caf64cee821d8c1af3e468f9f4dd (diff) | |
download | openshift-2a8f7ab95107eb4ea353a8d42ecc19d1ebd32395.tar.gz openshift-2a8f7ab95107eb4ea353a8d42ecc19d1ebd32395.tar.bz2 openshift-2a8f7ab95107eb4ea353a8d42ecc19d1ebd32395.tar.xz openshift-2a8f7ab95107eb4ea353a8d42ecc19d1ebd32395.zip |
Merge branch 'master' into tower_install
Diffstat (limited to 'bin/ansibleutil.py')
-rw-r--r-- | bin/ansibleutil.py | 8 |
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 - - |