diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-03-13 23:24:36 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-03-13 23:24:36 -0400 |
commit | db9cf8ef4f030f30391e021f360fe0c3db1dce74 (patch) | |
tree | 02eb2e2e32c060bf84fc022db9efc02d5e2a297d /bin/opssh | |
parent | baa950f64d4f1d76847f11cc6e136bff262c4de3 (diff) | |
parent | 35a8d1f73a54d468782547020975b79a77bffda2 (diff) | |
download | openshift-db9cf8ef4f030f30391e021f360fe0c3db1dce74.tar.gz openshift-db9cf8ef4f030f30391e021f360fe0c3db1dce74.tar.bz2 openshift-db9cf8ef4f030f30391e021f360fe0c3db1dce74.tar.xz openshift-db9cf8ef4f030f30391e021f360fe0c3db1dce74.zip |
Merge pull request #114 from twiest/pr
Renamed AnsibleUtil to AwsUtil. Fixed bug in AwsUtil for hosts without environment set.
Diffstat (limited to 'bin/opssh')
-rwxr-xr-x | bin/opssh | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2,7 +2,7 @@ # vim: expandtab:tabstop=4:shiftwidth=4 import argparse -import ansibleutil +import awsutil import traceback import sys import os @@ -17,12 +17,12 @@ PSSH = '/usr/bin/pssh' class Opssh(object): def __init__(self): self.file_path = os.path.join(os.path.dirname(os.path.realpath(__file__))) - self.ansible = ansibleutil.AnsibleUtil() + self.aws = awsutil.AwsUtil() self.parse_cli_args() if self.args.list_host_types: - self.ansible.print_host_types() + self.aws.print_host_types() return if self.args.env and \ @@ -30,7 +30,7 @@ class Opssh(object): self.args.command: retval = self.run_pssh() if retval != 0: - raise ValueError("ansible run failed") + raise ValueError("pssh run failed") return @@ -50,7 +50,7 @@ class Opssh(object): if self.args.errdir: pssh_args.append("--errdir='%s'" % self.args.errdir) - hosts = self.ansible.get_host_list(self.args.host_type, self.args.env) + hosts = self.aws.get_host_list(self.args.host_type, self.args.env) with tempfile.NamedTemporaryFile(prefix='opssh-', delete=True) as f: for h in hosts: f.write(h + os.linesep) |