command: make sure that all _handle_aliases() calls returns {}
module_common: also work if there are no aliases (shell, command, etc) modules
This commit is contained in:
parent
b54887b03c
commit
f02ea15f0c
2 changed files with 4 additions and 6 deletions
|
@ -592,11 +592,9 @@ class AnsibleModule(object):
|
||||||
passwd_keys = ['password', 'login_password']
|
passwd_keys = ['password', 'login_password']
|
||||||
|
|
||||||
for param in self.params:
|
for param in self.params:
|
||||||
no_log = False
|
canon = self.aliases.get(param, param)
|
||||||
if self.aliases:
|
arg_opts = self.argument_spec.get(canon, {})
|
||||||
canon = self.aliases.get(param, param)
|
no_log = arg_opts.get('no_log', False)
|
||||||
arg_opts = self.argument_spec[canon]
|
|
||||||
no_log = arg_opts.get('no_log', False)
|
|
||||||
|
|
||||||
if no_log:
|
if no_log:
|
||||||
log_args[param] = 'NOT_LOGGING_PARAMETER'
|
log_args[param] = 'NOT_LOGGING_PARAMETER'
|
||||||
|
|
|
@ -129,7 +129,7 @@ def main():
|
||||||
class CommandModule(AnsibleModule):
|
class CommandModule(AnsibleModule):
|
||||||
|
|
||||||
def _handle_aliases(self):
|
def _handle_aliases(self):
|
||||||
pass
|
return {}
|
||||||
|
|
||||||
def _check_invalid_arguments(self):
|
def _check_invalid_arguments(self):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue