From c28d4ec46ff9152ae5c91837cc29423805af6bf3 Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Wed, 6 May 2015 16:17:13 -0400 Subject: added '-e all' to ohi and fixed pylint errors. --- bin/ohi | 4 +- bin/openshift_ansible/awsutil.py | 138 +++++++++++++++++++++++++++------------ 2 files changed, 100 insertions(+), 42 deletions(-) (limited to 'bin') diff --git a/bin/ohi b/bin/ohi index bb52166df..24a027be2 100755 --- a/bin/ohi +++ b/bin/ohi @@ -47,12 +47,12 @@ class Ohi(object): self.args.env is not None: # Both env and host-type specified hosts = self.aws.get_host_list(host_type=self.args.host_type, \ - env=self.args.env) + envs=self.args.env) if self.args.host_type is None and \ self.args.env is not None: # Only env specified - hosts = self.aws.get_host_list(env=self.args.env) + hosts = self.aws.get_host_list(envs=self.args.env) if self.args.host_type is not None and \ self.args.env is None: diff --git a/bin/openshift_ansible/awsutil.py b/bin/openshift_ansible/awsutil.py index 65b269930..8b365faa9 100644 --- a/bin/openshift_ansible/awsutil.py +++ b/bin/openshift_ansible/awsutil.py @@ -1,16 +1,37 @@ # vim: expandtab:tabstop=4:shiftwidth=4 +"""This module comprises Aws specific utility functions.""" + import subprocess import os import json import re class ArgumentError(Exception): + """This class is raised when improper arguments are passed.""" + def __init__(self, message): + """Initialize an ArgumentError. + + Keyword arguments: + message -- the exact error message being raised + """ + super(ArgumentError, self).__init__() self.message = message class AwsUtil(object): - def __init__(self, inventory_path=None, host_type_aliases={}): + """This class contains the AWS utility functions.""" + + def __init__(self, inventory_path=None, host_type_aliases=None): + """Initialize the AWS utility class. + + Keyword arguments: + inventory_path -- the path to find the inventory script + host_type_aliases -- a list of aliases to common host-types (e.g. ex-node) + """ + + host_type_aliases = host_type_aliases or {} + self.host_type_aliases = host_type_aliases self.file_path = os.path.join(os.path.dirname(os.path.realpath(__file__))) @@ -26,6 +47,7 @@ class AwsUtil(object): self.setup_host_type_alias_lookup() def setup_host_type_alias_lookup(self): + """Sets up the alias to host-type lookup table.""" self.alias_lookup = {} for key, values in self.host_type_aliases.iteritems(): for value in values: @@ -33,7 +55,13 @@ class AwsUtil(object): - def get_inventory(self,args=[]): + def get_inventory(self, args=None): + """Calls the inventory script and returns a dictionary containing the inventory." + + Keyword arguments: + args -- optional arguments to pass to the inventory script + """ + args = args or [] cmd = [self.inventory_path] if args: @@ -41,73 +69,78 @@ class AwsUtil(object): env = os.environ - p = subprocess.Popen(cmd, stderr=subprocess.PIPE, - stdout=subprocess.PIPE, env=env) + proc = subprocess.Popen(cmd, stderr=subprocess.PIPE, + stdout=subprocess.PIPE, env=env) - out,err = p.communicate() + out, err = proc.communicate() - if p.returncode != 0: + if proc.returncode != 0: raise RuntimeError(err) return json.loads(out.strip()) def get_environments(self): + """Searches for env tags in the inventory and returns all of the envs found.""" pattern = re.compile(r'^tag_environment_(.*)') envs = [] inv = self.get_inventory() for key in inv.keys(): - m = pattern.match(key) - if m: - envs.append(m.group(1)) + matched = pattern.match(key) + if matched: + envs.append(matched.group(1)) envs.sort() return envs def get_host_types(self): + """Searches for host-type tags in the inventory and returns all host-types found.""" pattern = re.compile(r'^tag_host-type_(.*)') host_types = [] inv = self.get_inventory() for key in inv.keys(): - m = pattern.match(key) - if m: - host_types.append(m.group(1)) + matched = pattern.match(key) + if matched: + host_types.append(matched.group(1)) host_types.sort() return host_types def get_security_groups(self): + """Searches for security_groups in the inventory and returns all SGs found.""" pattern = re.compile(r'^security_group_(.*)') groups = [] inv = self.get_inventory() for key in inv.keys(): - m = pattern.match(key) - if m: - groups.append(m.group(1)) + matched = pattern.match(key) + if matched: + groups.append(matched.group(1)) groups.sort() return groups - def build_host_dict_by_env(self, args=[]): + def build_host_dict_by_env(self, args=None): + """Searches the inventory for hosts in an env and returns their hostvars.""" + args = args or [] inv = self.get_inventory(args) inst_by_env = {} - for dns, host in inv['_meta']['hostvars'].items(): + 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: continue if host['ec2_tag_environment'] not in inst_by_env: inst_by_env[host['ec2_tag_environment']] = {} - host_id = "%s:%s" % (host['ec2_tag_Name'],host['ec2_id']) + host_id = "%s:%s" % (host['ec2_tag_Name'], host['ec2_id']) inst_by_env[host['ec2_tag_environment']][host_id] = host return inst_by_env - # Display host_types def print_host_types(self): + """Gets the list of host types and aliases and outputs them in columns.""" host_types = self.get_host_types() ht_format_str = "%35s" alias_format_str = "%-20s" @@ -117,22 +150,31 @@ class AwsUtil(object): print combined_format_str % ('Host Types', 'Aliases') print combined_format_str % ('----------', '-------') - for ht in host_types: + for host_type in host_types: aliases = [] - if ht in self.host_type_aliases: - aliases = self.host_type_aliases[ht] - print combined_format_str % (ht, ", ".join(aliases)) + if host_type in self.host_type_aliases: + aliases = self.host_type_aliases[host_type] + print combined_format_str % (host_type, ", ".join(aliases)) else: - print ht_format_str % ht + print ht_format_str % host_type print - # Convert host-type aliases to real a host-type def resolve_host_type(self, host_type): + """Converts a host-type alias into a host-type. + + Keyword arguments: + host_type -- The alias or host_type to look up. + + Example (depends on aliases defined in config file): + host_type = ex-node + returns: openshift-node + """ if self.alias_lookup.has_key(host_type): return self.alias_lookup[host_type] return host_type - def gen_env_tag(self, env): + @staticmethod + def gen_env_tag(env): """Generate the environment tag """ return "tag_environment_%s" % env @@ -149,28 +191,44 @@ class AwsUtil(object): host_type = self.resolve_host_type(host_type) return "tag_env-host-type_%s-%s" % (env, host_type) - def get_host_list(self, host_type=None, env=None): + def get_host_list(self, host_type=None, envs=None): """Get the list of hosts from the inventory using host-type and environment """ + envs = envs or [] inv = self.get_inventory() - if host_type is not None and \ - env is not None: - # Both host type and environment were specified - env_host_type_tag = self.gen_env_host_type_tag(host_type, env) - return inv[env_host_type_tag] + # We prefer to deal with a list of environments + if issubclass(type(envs), basestring): + if envs == 'all': + envs = self.get_environments() + else: + envs = [envs] - if host_type is None and \ - env is not None: + if host_type and envs: + # Both host type and environment were specified + retval = [] + for env in envs: + env_host_type_tag = self.gen_env_host_type_tag(host_type, env) + if env_host_type_tag in inv.keys(): + retval += inv[env_host_type_tag] + return set(retval) + + if envs and not host_type: # Just environment was specified - host_type_tag = self.gen_env_tag(env) - return inv[host_type_tag] - - if host_type is not None and \ - env is None: + retval = [] + for env in envs: + env_tag = AwsUtil.gen_env_tag(env) + if env_tag in inv.keys(): + retval += inv[env_tag] + return set(retval) + + if host_type and not envs: # Just host-type was specified + retval = [] host_type_tag = self.gen_host_type_tag(host_type) - return inv[host_type_tag] + if host_type_tag in inv.keys(): + retval = inv[host_type_tag] + return set(retval) # We should never reach here! raise ArgumentError("Invalid combination of parameters") -- cgit v1.2.3 From 060dffb973687776a22b5ff34e4843744ca82b05 Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Thu, 7 May 2015 14:22:16 -0400 Subject: Automatic commit of package [openshift-ansible-bin] release [0.0.13-1]. --- bin/openshift-ansible-bin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/openshift-ansible-bin.spec b/bin/openshift-ansible-bin.spec index 29aaff9ae..9fc79fe6c 100644 --- a/bin/openshift-ansible-bin.spec +++ b/bin/openshift-ansible-bin.spec @@ -1,6 +1,6 @@ Summary: OpenShift Ansible Scripts for working with metadata hosts Name: openshift-ansible-bin -Version: 0.0.12 +Version: 0.0.13 Release: 1%{?dist} License: ASL 2.0 URL: https://github.com/openshift/openshift-ansible @@ -36,6 +36,9 @@ cp -p openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshif %config(noreplace) /etc/openshift_ansible/ %changelog +* Thu May 07 2015 Thomas Wiest 0.0.13-1 +- added '-e all' to ohi and fixed pylint errors. (twiest@redhat.com) + * Tue May 05 2015 Thomas Wiest 0.0.12-1 - fixed opssh and opscp to allow just environment or just host-type. (twiest@redhat.com) -- cgit v1.2.3 From d9b276629476dc2d6de3ef32717bf2035f4338c2 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Fri, 8 May 2015 15:00:31 -0400 Subject: Adding cache location for multi ec2 --- bin/oscp | 14 ++++++++------ bin/ossh | 15 ++++++++------- 2 files changed, 16 insertions(+), 13 deletions(-) (limited to 'bin') diff --git a/bin/oscp b/bin/oscp index 461ad0a0f..68691ec22 100755 --- a/bin/oscp +++ b/bin/oscp @@ -32,10 +32,10 @@ class Oscp(object): self.aws = awsutil.AwsUtil(self.inventory) # get a dict of host inventory - if self.args.list: - self.get_hosts() - else: + if self.args.refresh_cache: self.get_hosts(True) + else: + self.get_hosts() if (self.args.src == '' or self.args.dest == '') and not self.args.list: self.parser.print_help() @@ -68,6 +68,8 @@ class Oscp(object): action="store_true", help="debug mode") parser.add_argument('-v', '--verbose', default=False, action="store_true", help="Verbose?") + parser.add_argument('--refresh-cache', default=False, + action="store_true", help="Force a refresh on the host cache.") parser.add_argument('--list', default=False, action="store_true", help="list out hosts") parser.add_argument('-r', '--recurse', action='store_true', default=False, @@ -119,14 +121,14 @@ class Oscp(object): else: self.env = None - def get_hosts(self, cache_only=False): + def get_hosts(self, refresh_cache=False): '''Query our host inventory and return a dict where the format equals: dict['environment'] = [{'servername' : {}}, ] ''' - if cache_only: - self.host_inventory = self.aws.build_host_dict_by_env(['--cache-only']) + if refresh_cache: + self.host_inventory = self.aws.build_host_dict_by_env(['--refresh-cache']) else: self.host_inventory = self.aws.build_host_dict_by_env() diff --git a/bin/ossh b/bin/ossh index c16ea6eda..196430e13 100755 --- a/bin/ossh +++ b/bin/ossh @@ -28,11 +28,10 @@ class Ossh(object): self.aws = awsutil.AwsUtil(self.inventory) - # get a dict of host inventory - if self.args.list: - self.get_hosts() - else: + if self.args.refresh_cache: self.get_hosts(True) + else: + self.get_hosts() # parse host and user self.process_host() @@ -67,6 +66,8 @@ class Ossh(object): action="store_true", help="debug mode") parser.add_argument('-v', '--verbose', default=False, action="store_true", help="Verbose?") + parser.add_argument('--refresh-cache', default=False, + action="store_true", help="Force a refresh on the host cache.") parser.add_argument('--list', default=False, action="store_true", help="list out hosts") parser.add_argument('-c', '--command', action='store', @@ -109,14 +110,14 @@ class Ossh(object): if self.args.login_name: self.user = self.args.login_name - def get_hosts(self, cache_only=False): + def get_hosts(self, refresh_cache=False): '''Query our host inventory and return a dict where the format equals: dict['servername'] = dns_name ''' - if cache_only: - self.host_inventory = self.aws.build_host_dict_by_env(['--cache-only']) + if refresh_cache: + self.host_inventory = self.aws.build_host_dict_by_env(['--refresh-cache']) else: self.host_inventory = self.aws.build_host_dict_by_env() -- cgit v1.2.3 From 88c7ed4ad437f6705d91e4c1ffb2e88c71fb7db4 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Thu, 14 May 2015 16:41:10 -0400 Subject: Command line tools import multi_ec2 as lib --- bin/ohi | 9 +-------- bin/openshift_ansible/awsutil.py | 40 +++++++------------------------------- bin/openshift_ansible/multi_ec2.py | 1 + bin/oscp | 8 +------- bin/ossh | 8 +------- 5 files changed, 11 insertions(+), 55 deletions(-) create mode 120000 bin/openshift_ansible/multi_ec2.py (limited to 'bin') diff --git a/bin/ohi b/bin/ohi index 24a027be2..6f162ac13 100755 --- a/bin/ohi +++ b/bin/ohi @@ -17,13 +17,10 @@ from openshift_ansible.awsutil import ArgumentError CONFIG_MAIN_SECTION = 'main' CONFIG_HOST_TYPE_ALIAS_SECTION = 'host_type_aliases' -CONFIG_INVENTORY_OPTION = 'inventory' - class Ohi(object): def __init__(self): - self.inventory = None self.host_type_aliases = {} self.file_path = os.path.join(os.path.dirname(os.path.realpath(__file__))) @@ -35,7 +32,7 @@ class Ohi(object): self.parse_cli_args() self.parse_config_file() - self.aws = awsutil.AwsUtil(self.inventory, self.host_type_aliases) + self.aws = awsutil.AwsUtil(self.host_type_aliases) def run(self): if self.args.list_host_types: @@ -76,10 +73,6 @@ class Ohi(object): config = ConfigParser.ConfigParser() config.read(self.config_path) - if config.has_section(CONFIG_MAIN_SECTION) and \ - config.has_option(CONFIG_MAIN_SECTION, CONFIG_INVENTORY_OPTION): - self.inventory = config.get(CONFIG_MAIN_SECTION, CONFIG_INVENTORY_OPTION) - self.host_type_aliases = {} if config.has_section(CONFIG_HOST_TYPE_ALIAS_SECTION): for alias in config.options(CONFIG_HOST_TYPE_ALIAS_SECTION): diff --git a/bin/openshift_ansible/awsutil.py b/bin/openshift_ansible/awsutil.py index 8b365faa9..9df034f57 100644 --- a/bin/openshift_ansible/awsutil.py +++ b/bin/openshift_ansible/awsutil.py @@ -2,10 +2,9 @@ """This module comprises Aws specific utility functions.""" -import subprocess import os -import json import re +from openshift_ansible import multi_ec2 class ArgumentError(Exception): """This class is raised when improper arguments are passed.""" @@ -22,11 +21,10 @@ class ArgumentError(Exception): class AwsUtil(object): """This class contains the AWS utility functions.""" - def __init__(self, inventory_path=None, host_type_aliases=None): + def __init__(self, host_type_aliases=None): """Initialize the AWS utility class. Keyword arguments: - inventory_path -- the path to find the inventory script host_type_aliases -- a list of aliases to common host-types (e.g. ex-node) """ @@ -35,15 +33,6 @@ class AwsUtil(object): self.host_type_aliases = host_type_aliases self.file_path = os.path.join(os.path.dirname(os.path.realpath(__file__))) - if inventory_path is None: - inventory_path = os.path.realpath(os.path.join(self.file_path, \ - '..', '..', 'inventory', \ - 'multi_ec2.py')) - - if not os.path.isfile(inventory_path): - raise Exception("Inventory file not found [%s]" % inventory_path) - - self.inventory_path = inventory_path self.setup_host_type_alias_lookup() def setup_host_type_alias_lookup(self): @@ -53,31 +42,16 @@ class AwsUtil(object): for value in values: self.alias_lookup[value] = key - - - def get_inventory(self, args=None): + @staticmethod + def get_inventory(args=None): """Calls the inventory script and returns a dictionary containing the inventory." Keyword arguments: args -- optional arguments to pass to the inventory script """ - args = args or [] - cmd = [self.inventory_path] - - if args: - cmd.extend(args) - - env = os.environ - - proc = subprocess.Popen(cmd, stderr=subprocess.PIPE, - stdout=subprocess.PIPE, env=env) - - out, err = proc.communicate() - - if proc.returncode != 0: - raise RuntimeError(err) - - return json.loads(out.strip()) + mec2 = multi_ec2.MultiEc2(args) + mec2.run() + return mec2.result def get_environments(self): """Searches for env tags in the inventory and returns all of the envs found.""" diff --git a/bin/openshift_ansible/multi_ec2.py b/bin/openshift_ansible/multi_ec2.py new file mode 120000 index 000000000..660a0418e --- /dev/null +++ b/bin/openshift_ansible/multi_ec2.py @@ -0,0 +1 @@ +../../inventory/multi_ec2.py \ No newline at end of file diff --git a/bin/oscp b/bin/oscp index 68691ec22..f6dd2ad88 100755 --- a/bin/oscp +++ b/bin/oscp @@ -11,11 +11,9 @@ import ConfigParser from openshift_ansible import awsutil CONFIG_MAIN_SECTION = 'main' -CONFIG_INVENTORY_OPTION = 'inventory' class Oscp(object): def __init__(self): - self.inventory = None self.file_path = os.path.join(os.path.dirname(os.path.realpath(__file__))) # Default the config path to /etc @@ -29,7 +27,7 @@ class Oscp(object): # parse host and user self.process_host() - self.aws = awsutil.AwsUtil(self.inventory) + self.aws = awsutil.AwsUtil() # get a dict of host inventory if self.args.refresh_cache: @@ -56,10 +54,6 @@ class Oscp(object): config = ConfigParser.ConfigParser() config.read(self.config_path) - if config.has_section(CONFIG_MAIN_SECTION) and \ - config.has_option(CONFIG_MAIN_SECTION, CONFIG_INVENTORY_OPTION): - self.inventory = config.get(CONFIG_MAIN_SECTION, CONFIG_INVENTORY_OPTION) - def parse_cli_args(self): parser = argparse.ArgumentParser(description='Openshift Online SSH Tool.') parser.add_argument('-e', '--env', diff --git a/bin/ossh b/bin/ossh index 196430e13..855c5d8b4 100755 --- a/bin/ossh +++ b/bin/ossh @@ -11,11 +11,9 @@ import ConfigParser from openshift_ansible import awsutil CONFIG_MAIN_SECTION = 'main' -CONFIG_INVENTORY_OPTION = 'inventory' class Ossh(object): def __init__(self): - self.inventory = None self.file_path = os.path.join(os.path.dirname(os.path.realpath(__file__))) # Default the config path to /etc @@ -26,7 +24,7 @@ class Ossh(object): self.parse_cli_args() self.parse_config_file() - self.aws = awsutil.AwsUtil(self.inventory) + self.aws = awsutil.AwsUtil() if self.args.refresh_cache: self.get_hosts(True) @@ -54,10 +52,6 @@ class Ossh(object): config = ConfigParser.ConfigParser() config.read(self.config_path) - if config.has_section(CONFIG_MAIN_SECTION) and \ - config.has_option(CONFIG_MAIN_SECTION, CONFIG_INVENTORY_OPTION): - self.inventory = config.get(CONFIG_MAIN_SECTION, CONFIG_INVENTORY_OPTION) - def parse_cli_args(self): parser = argparse.ArgumentParser(description='Openshift Online SSH Tool.') parser.add_argument('-e', '--env', action="store", -- cgit v1.2.3 From 701edcaeff9dc1a211a243c792eca3773618be33 Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Fri, 15 May 2015 12:36:49 -0400 Subject: Fixed openshift-ansible-bin rpm build --- bin/openshift-ansible-bin.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/openshift-ansible-bin.spec b/bin/openshift-ansible-bin.spec index 9fc79fe6c..c7db74187 100644 --- a/bin/openshift-ansible-bin.spec +++ b/bin/openshift-ansible-bin.spec @@ -24,7 +24,7 @@ mkdir -p %{buildroot}/etc/bash_completion.d mkdir -p %{buildroot}/etc/openshift_ansible cp -p ossh oscp opssh opscp ohi %{buildroot}%{_bindir} -cp -p openshift_ansible/* %{buildroot}%{python_sitelib}/openshift_ansible +cp -pP openshift_ansible/* %{buildroot}%{python_sitelib}/openshift_ansible cp -p ossh_bash_completion %{buildroot}/etc/bash_completion.d cp -p openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshift_ansible.conf -- cgit v1.2.3 From b1eab51d5fbc9e8183d89464dfc2e64db160e0c1 Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Fri, 15 May 2015 13:10:48 -0400 Subject: Automatic commit of package [openshift-ansible-bin] release [0.0.14-1]. --- bin/openshift-ansible-bin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/openshift-ansible-bin.spec b/bin/openshift-ansible-bin.spec index c7db74187..d6691ea32 100644 --- a/bin/openshift-ansible-bin.spec +++ b/bin/openshift-ansible-bin.spec @@ -1,6 +1,6 @@ Summary: OpenShift Ansible Scripts for working with metadata hosts Name: openshift-ansible-bin -Version: 0.0.13 +Version: 0.0.14 Release: 1%{?dist} License: ASL 2.0 URL: https://github.com/openshift/openshift-ansible @@ -36,6 +36,9 @@ cp -p openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshif %config(noreplace) /etc/openshift_ansible/ %changelog +* Fri May 15 2015 Thomas Wiest 0.0.14-1 +- Command line tools import multi_ec2 as lib (kwoodson@redhat.com) +- Adding cache location for multi ec2 (kwoodson@redhat.com) * Thu May 07 2015 Thomas Wiest 0.0.13-1 - added '-e all' to ohi and fixed pylint errors. (twiest@redhat.com) -- cgit v1.2.3 From 0ed9652cf6bfc62e36eb63265fc67a7cb79f457a Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Fri, 15 May 2015 13:55:25 -0400 Subject: Automatic commit of package [openshift-ansible-bin] release [0.0.15-1]. --- bin/openshift-ansible-bin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/openshift-ansible-bin.spec b/bin/openshift-ansible-bin.spec index d6691ea32..f2a191ab0 100644 --- a/bin/openshift-ansible-bin.spec +++ b/bin/openshift-ansible-bin.spec @@ -1,6 +1,6 @@ Summary: OpenShift Ansible Scripts for working with metadata hosts Name: openshift-ansible-bin -Version: 0.0.14 +Version: 0.0.15 Release: 1%{?dist} License: ASL 2.0 URL: https://github.com/openshift/openshift-ansible @@ -36,6 +36,9 @@ cp -p openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshif %config(noreplace) /etc/openshift_ansible/ %changelog +* Fri May 15 2015 Kenny Woodson 0.0.15-1 +- + * Fri May 15 2015 Thomas Wiest 0.0.14-1 - Command line tools import multi_ec2 as lib (kwoodson@redhat.com) - Adding cache location for multi ec2 (kwoodson@redhat.com) -- cgit v1.2.3 From 0860590391712510d69b26c5d711c962674525e0 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Fri, 15 May 2015 14:14:35 -0400 Subject: Automatic commit of package [openshift-ansible-bin] release [0.0.16-1]. --- bin/openshift-ansible-bin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/openshift-ansible-bin.spec b/bin/openshift-ansible-bin.spec index f2a191ab0..87c0079f2 100644 --- a/bin/openshift-ansible-bin.spec +++ b/bin/openshift-ansible-bin.spec @@ -1,6 +1,6 @@ Summary: OpenShift Ansible Scripts for working with metadata hosts Name: openshift-ansible-bin -Version: 0.0.15 +Version: 0.0.16 Release: 1%{?dist} License: ASL 2.0 URL: https://github.com/openshift/openshift-ansible @@ -36,6 +36,9 @@ cp -p openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshif %config(noreplace) /etc/openshift_ansible/ %changelog +* Fri May 15 2015 Kenny Woodson 0.0.16-1 +- + * Fri May 15 2015 Kenny Woodson 0.0.15-1 - -- cgit v1.2.3 From 890f2c5d039a501966eedbf8c7bb7b7e9b50464a Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Fri, 15 May 2015 14:48:55 -0400 Subject: fixed the openshift-ansible-bin build --- bin/openshift-ansible-bin.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/openshift-ansible-bin.spec b/bin/openshift-ansible-bin.spec index 87c0079f2..9336681d1 100644 --- a/bin/openshift-ansible-bin.spec +++ b/bin/openshift-ansible-bin.spec @@ -25,6 +25,12 @@ mkdir -p %{buildroot}/etc/openshift_ansible cp -p ossh oscp opssh opscp ohi %{buildroot}%{_bindir} cp -pP openshift_ansible/* %{buildroot}%{python_sitelib}/openshift_ansible + +# Make it so we can load multi_ec2.py as a library. +rm %{buildroot}%{python_sitelib}/openshift_ansible/multi_ec2.py* +ln -sf /usr/share/ansible/inventory/multi_ec2.py %{buildroot}%{python_sitelib}/openshift_ansible/multi_ec2.py +ln -sf /usr/share/ansible/inventory/multi_ec2.pyc %{buildroot}%{python_sitelib}/openshift_ansible/multi_ec2.pyc + cp -p ossh_bash_completion %{buildroot}/etc/bash_completion.d cp -p openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshift_ansible.conf @@ -36,12 +42,6 @@ cp -p openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshif %config(noreplace) /etc/openshift_ansible/ %changelog -* Fri May 15 2015 Kenny Woodson 0.0.16-1 -- - -* Fri May 15 2015 Kenny Woodson 0.0.15-1 -- - * Fri May 15 2015 Thomas Wiest 0.0.14-1 - Command line tools import multi_ec2 as lib (kwoodson@redhat.com) - Adding cache location for multi ec2 (kwoodson@redhat.com) -- cgit v1.2.3 From 09b5c45e90fbb321b7cf92c7a431b7aa4d4a803c Mon Sep 17 00:00:00 2001 From: Thomas Wiest Date: Fri, 15 May 2015 15:20:01 -0400 Subject: Automatic commit of package [openshift-ansible-bin] release [0.0.17-1]. --- bin/openshift-ansible-bin.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/openshift-ansible-bin.spec b/bin/openshift-ansible-bin.spec index 9336681d1..884d4eb0a 100644 --- a/bin/openshift-ansible-bin.spec +++ b/bin/openshift-ansible-bin.spec @@ -1,6 +1,6 @@ Summary: OpenShift Ansible Scripts for working with metadata hosts Name: openshift-ansible-bin -Version: 0.0.16 +Version: 0.0.17 Release: 1%{?dist} License: ASL 2.0 URL: https://github.com/openshift/openshift-ansible @@ -42,6 +42,9 @@ cp -p openshift_ansible.conf.example %{buildroot}/etc/openshift_ansible/openshif %config(noreplace) /etc/openshift_ansible/ %changelog +* Fri May 15 2015 Thomas Wiest 0.0.17-1 +- fixed the openshift-ansible-bin build (twiest@redhat.com) + * Fri May 15 2015 Thomas Wiest 0.0.14-1 - Command line tools import multi_ec2 as lib (kwoodson@redhat.com) - Adding cache location for multi ec2 (kwoodson@redhat.com) -- cgit v1.2.3