diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-12-14 09:08:56 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-12-14 09:08:56 -0500 |
commit | e4ecb0ea7415e0db3957926e5c6a571c36e2ffd1 (patch) | |
tree | a1b1bcc5970889d913193b324423bee1ee3c8dbb /bin/openshift_ansible | |
parent | 40ce28e760021571504efe3b89a4034b98c64f4b (diff) | |
parent | 7c945d07d2a61e7334a10388d37ac28f1bc58ce1 (diff) | |
download | openshift-e4ecb0ea7415e0db3957926e5c6a571c36e2ffd1.tar.gz openshift-e4ecb0ea7415e0db3957926e5c6a571c36e2ffd1.tar.bz2 openshift-e4ecb0ea7415e0db3957926e5c6a571c36e2ffd1.tar.xz openshift-e4ecb0ea7415e0db3957926e5c6a571c36e2ffd1.zip |
Merge pull request #1028 from kwoodson/remove_env_host_type
Removing env-host-type in preparation of env and environment changes.
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 |