now verbose mode shows config file used

This commit is contained in:
Brian Coca
2015-07-04 10:23:30 -04:00
parent 67671e328a
commit 5f791329ce
8 changed files with 22 additions and 6 deletions

View File

@@ -99,7 +99,9 @@ class CLI(object):
raise Exception("Need to implement!")
def run(self):
raise Exception("Need to implement!")
if self.options.verbosity > 0:
self.display.display("Using %s as config file" % C.CONFIG_FILE)
@staticmethod
def ask_vault_passwords(ask_vault_pass=False, ask_new_vault_pass=False, confirm_vault=False, confirm_new=False):

View File

@@ -76,6 +76,9 @@ class AdHocCLI(CLI):
def run(self):
''' use Runner lib to do SSH things '''
super(AdHocCLI, self).run()
# only thing left should be host pattern
pattern = self.args[0]

View File

@@ -61,6 +61,8 @@ class DocCLI(CLI):
def run(self):
super(DocCLI, self).run()
if self.options.module_path is not None:
for i in self.options.module_path.split(os.pathsep):
module_loader.add_directory(i)

View File

@@ -124,6 +124,8 @@ class GalaxyCLI(CLI):
def run(self):
super(GalaxyCLI, self).run()
# if not offline, get connect to galaxy api
if self.action in ("info","install") or (self.action == 'init' and not self.options.offline):
api_server = self.options.api_server

View File

@@ -81,6 +81,8 @@ class PlaybookCLI(CLI):
def run(self):
super(PlaybookCLI, self).run()
# Note: slightly wrong, this is written so that implicit localhost
# Manage passwords
sshpass = None

View File

@@ -98,6 +98,8 @@ class PullCLI(CLI):
def run(self):
''' use Runner lib to do SSH things '''
super(PullCLI, self).run()
# log command line
now = datetime.datetime.now()
self.display.display(now.strftime("Starting Ansible Pull at %F %T"))

View File

@@ -70,6 +70,8 @@ class VaultCLI(CLI):
def run(self):
super(VaultCLI, self).run()
if self.options.vault_password_file:
# read vault_pass from a file
self.vault_pass = read_vault_file(self.options.vault_password_file)