diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2016-01-29 15:37:16 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2016-01-29 16:17:16 -0500 |
commit | 303305a3789d65e026db01f318647a036ddfa5ef (patch) | |
tree | 75bcbb033a873882dffc01a8d96d3bf8af65d84c /bin/openshift_ansible | |
parent | 7345fcf2a00e3011599b2b04a42b99ae707e7484 (diff) | |
download | openshift-303305a3789d65e026db01f318647a036ddfa5ef.tar.gz openshift-303305a3789d65e026db01f318647a036ddfa5ef.tar.bz2 openshift-303305a3789d65e026db01f318647a036ddfa5ef.tar.xz openshift-303305a3789d65e026db01f318647a036ddfa5ef.zip |
Adding ip address option
Diffstat (limited to 'bin/openshift_ansible')
-rw-r--r-- | bin/openshift_ansible/awsutil.py | 12 |
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 |