Add no_log on password argument

Also do not use a wildcard import, for later refactoring
pull/18777/head
Michael Scherer 8 years ago committed by Matt Clay
parent 23eba8fd97
commit 6806965bda

@ -19,6 +19,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# #
import os import os
from ansible.module_utils.basic import AnsibleModule, is_executable
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
@ -101,7 +102,7 @@ def main():
config=dict(required=False, type='path'), config=dict(required=False, type='path'),
server_url=dict(required=False), server_url=dict(required=False),
username=dict(required=False), username=dict(required=False),
password=dict(required=False), password=dict(required=False, no_log=True),
supervisorctl_path=dict(required=False, type='path'), supervisorctl_path=dict(required=False, type='path'),
state=dict(required=True, choices=['present', 'started', 'restarted', 'stopped', 'absent']) state=dict(required=True, choices=['present', 'started', 'restarted', 'stopped', 'absent'])
) )
@ -239,8 +240,5 @@ def main():
module.fail_json(name=name, msg="ERROR (no such process)") module.fail_json(name=name, msg="ERROR (no such process)")
take_action_on_processes(processes, lambda s: s in ('RUNNING', 'STARTING'), 'stop', 'stopped') take_action_on_processes(processes, lambda s: s in ('RUNNING', 'STARTING'), 'stop', 'stopped')
# import module snippets
from ansible.module_utils.basic import *
# is_executable from basic
if __name__ == '__main__': if __name__ == '__main__':
main() main()

Loading…
Cancel
Save