summaryrefslogtreecommitdiffstats
path: root/bin/openshift_ansible/awsutil.py
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-01-29 16:23:34 -0500
committerKenny Woodson <kwoodson@redhat.com>2016-01-29 16:23:34 -0500
commitc44eafff52cf5ac862f3f3f8eee115ee991bc599 (patch)
tree7c6b918bceeaadb4dcfe4061df7d3a7936a26148 /bin/openshift_ansible/awsutil.py
parent3d72d46b4e5447b80100464da4aa7ac0fa111a3c (diff)
parent303305a3789d65e026db01f318647a036ddfa5ef (diff)
downloadopenshift-c44eafff52cf5ac862f3f3f8eee115ee991bc599.tar.gz
openshift-c44eafff52cf5ac862f3f3f8eee115ee991bc599.tar.bz2
openshift-c44eafff52cf5ac862f3f3f8eee115ee991bc599.tar.xz
openshift-c44eafff52cf5ac862f3f3f8eee115ee991bc599.zip
Merge pull request #1313 from kwoodson/ohi_ips
ohi supports ip now.
Diffstat (limited to 'bin/openshift_ansible/awsutil.py')
-rw-r--r--bin/openshift_ansible/awsutil.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/openshift_ansible/awsutil.py b/bin/openshift_ansible/awsutil.py
index 3639ef733..945e6a20c 100644
--- a/bin/openshift_ansible/awsutil.py
+++ b/bin/openshift_ansible/awsutil.py
@@ -232,4 +232,14 @@ class AwsUtil(object):
if version != 'all':
retval.intersection_update(inv.get(AwsUtil.gen_version_tag(version), []))
- return retval
+ return list(retval)
+
+ def convert_to_ip(self, hosts, cached=False):
+ """convert a list of host names to ip addresses"""
+
+ inv = self.get_inventory(cached=cached)
+ ips = []
+ for host in hosts:
+ ips.append(inv['_meta']['hostvars'][host]['oo_public_ip'])
+
+ return ips