Browse Source

renamed AnsibleUtil to AwsUtil because that's what it really is.

Thomas Wiest 10 years ago
parent
commit
4754af459d
4 changed files with 14 additions and 14 deletions
  1. 1 1
      bin/ansibleutil.py
  2. 5 5
      bin/opssh
  3. 4 4
      bin/oscp
  4. 4 4
      bin/ossh

+ 1 - 1
bin/ansibleutil.py

@@ -5,7 +5,7 @@ import os
 import json
 import re
 
-class AnsibleUtil(object):
+class AwsUtil(object):
     def __init__(self):
         self.host_type_aliases = {
                 'legacy-openshift-broker': ['broker', 'ex-srv'],

+ 5 - 5
bin/opssh

@@ -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)

+ 4 - 4
bin/oscp

@@ -2,7 +2,7 @@
 # vim: expandtab:tabstop=4:shiftwidth=4
 
 import argparse
-import ansibleutil
+import awsutil
 import traceback
 import sys
 import os
@@ -16,7 +16,7 @@ class Oscp(object):
         # parse host and user
         self.process_host()
 
-        self.ansible = ansibleutil.AnsibleUtil()
+        self.aws = awsutil.AwsUtil()
 
         # get a dict of host inventory
         if self.args.list:
@@ -104,9 +104,9 @@ class Oscp(object):
            dict['environment'] = [{'servername' : {}}, ]
         '''
         if cache_only:
-            self.host_inventory = self.ansible.build_host_dict_by_env(['--cache-only'])
+            self.host_inventory = self.aws.build_host_dict_by_env(['--cache-only'])
         else:
-            self.host_inventory = self.ansible.build_host_dict_by_env()
+            self.host_inventory = self.aws.build_host_dict_by_env()
 
     def select_host(self):
         '''select host attempts to match the host specified

+ 4 - 4
bin/ossh

@@ -2,7 +2,7 @@
 # vim: expandtab:tabstop=4:shiftwidth=4
 
 import argparse
-import ansibleutil
+import awsutil
 import traceback
 import sys
 import os
@@ -13,7 +13,7 @@ class Ossh(object):
         self.file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)))
         self.parse_cli_args()
 
-        self.ansible = ansibleutil.AnsibleUtil()
+        self.aws = awsutil.AwsUtil()
 
         # get a dict of host inventory
         if self.args.list:
@@ -94,9 +94,9 @@ class Ossh(object):
            dict['servername'] = dns_name
         '''
         if cache_only:
-            self.host_inventory = self.ansible.build_host_dict_by_env(['--cache-only'])
+            self.host_inventory = self.aws.build_host_dict_by_env(['--cache-only'])
         else:
-            self.host_inventory = self.ansible.build_host_dict_by_env()
+            self.host_inventory = self.aws.build_host_dict_by_env()
 
     def select_host(self):
         '''select host attempts to match the host specified