Move default arguments to the end of the function call.

pull/1875/head
Rodney Quillo 12 years ago
parent 7ae100611c
commit 395093e0bf

@ -72,7 +72,7 @@ class CallbackModule(object):
def playbook_on_task_start(self, name, is_conditional):
pass
def playbook_on_vars_prompt(self, varname, default=None, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None):
def playbook_on_vars_prompt(self, varname, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None, default=None):
pass
def playbook_on_setup(self):

@ -435,7 +435,7 @@ class PlaybookCallbacks(object):
print banner(msg)
call_callback_module('playbook_on_task_start', name, is_conditional)
def on_vars_prompt(self, varname, default=None, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None):
def on_vars_prompt(self, varname, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None, default=None):
if prompt:
msg = "%s: " % prompt
@ -466,8 +466,8 @@ class PlaybookCallbacks(object):
if encrypt:
result = utils.do_encrypt(result,encrypt,salt_size,salt)
call_callback_module( 'playbook_on_vars_prompt', varname, default=default, private=private,
prompt=prompt, encrypt=encrypt, confirm=confirm, salt_size=salt_size, salt=None
call_callback_module( 'playbook_on_vars_prompt', varname, private=private, prompt=prompt,
encrypt=encrypt, confirm=confirm, salt_size=salt_size, salt=None, default=default
)
return result

@ -199,7 +199,7 @@ class Play(object):
if vname not in self.playbook.extra_vars:
vars[vname] = self.playbook.callbacks.on_vars_prompt (
vname, default, private, prompt, encrypt, confirm, salt_size, salt
vname, private, prompt, encrypt, confirm, salt_size, salt, default
)
elif type(self.vars_prompt) == dict:
@ -207,7 +207,7 @@ class Play(object):
prompt_msg = "%s: " % prompt
if vname not in self.playbook.extra_vars:
vars[vname] = self.playbook.callbacks.on_vars_prompt(
varname=vname, default=None, private=False, prompt=prompt_msg
varname=vname, private=False, prompt=prompt_msg, default=None
)
else:

@ -86,7 +86,7 @@ class CallbackModule(object):
def playbook_on_task_start(self, name, is_conditional):
pass
def playbook_on_vars_prompt(self, varname, default=None, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None):
def playbook_on_vars_prompt(self, varname, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None, default=None):
pass
def playbook_on_setup(self):

@ -73,7 +73,7 @@ class CallbackModule(object):
else:
say("Notifying task: %s" % name, REGULAR_VOICE)
def playbook_on_vars_prompt(self, varname, default=None, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None):
def playbook_on_vars_prompt(self, varname, private=True, prompt=None, encrypt=None, confirm=False, salt_size=None, salt=None, default=None):
pass
def playbook_on_setup(self):

Loading…
Cancel
Save