summaryrefslogtreecommitdiffstats
path: root/bin/openshift_ansible/awsutil.py
diff options
context:
space:
mode:
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