diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-12-14 12:47:51 -0500 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-12-14 12:47:51 -0500 |
commit | 4dfe16e0e567a633cedd8ee56ffaed5110ca1629 (patch) | |
tree | aa67c9a14ae30cf02177e53ae3e8d1e9c878f1c8 /bin/openshift_ansible | |
parent | eeb164fae0e6721100c4fcc1717d92bb85b9652c (diff) | |
parent | 4322b19c0503a4f149ac5bca251beba14178948d (diff) | |
download | openshift-4dfe16e0e567a633cedd8ee56ffaed5110ca1629.tar.gz openshift-4dfe16e0e567a633cedd8ee56ffaed5110ca1629.tar.bz2 openshift-4dfe16e0e567a633cedd8ee56ffaed5110ca1629.tar.xz openshift-4dfe16e0e567a633cedd8ee56ffaed5110ca1629.zip |
Merge pull request #1059 from twiest/master
sync master -> prod branch
Diffstat (limited to 'bin/openshift_ansible')
-rw-r--r-- | bin/openshift_ansible/awsutil.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/openshift_ansible/awsutil.py b/bin/openshift_ansible/awsutil.py index 45345007c..ba32b4dbd 100644 --- a/bin/openshift_ansible/awsutil.py +++ b/bin/openshift_ansible/awsutil.py @@ -58,7 +58,7 @@ class AwsUtil(object): def get_environments(self): """Searches for env tags in the inventory and returns all of the envs found.""" - pattern = re.compile(r'^tag_environment_(.*)') + pattern = re.compile(r'^tag_env_(.*)') envs = [] inv = self.get_inventory() @@ -106,13 +106,13 @@ class AwsUtil(object): inst_by_env = {} for _, host in inv['_meta']['hostvars'].items(): # If you don't have an environment tag, we're going to ignore you - if 'ec2_tag_environment' not in host: + if 'ec2_tag_env' not in host: continue - if host['ec2_tag_environment'] not in inst_by_env: - inst_by_env[host['ec2_tag_environment']] = {} + if host['ec2_tag_env'] not in inst_by_env: + inst_by_env[host['ec2_tag_env']] = {} host_id = "%s:%s" % (host['ec2_tag_Name'], host['ec2_id']) - inst_by_env[host['ec2_tag_environment']][host_id] = host + inst_by_env[host['ec2_tag_env']][host_id] = host return inst_by_env @@ -154,7 +154,7 @@ class AwsUtil(object): def gen_env_tag(env): """Generate the environment tag """ - return "tag_environment_%s" % env + return "tag_env_%s" % env def gen_host_type_tag(self, host_type): """Generate the host type tag |