mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add no_log on password argument
Also do not use a wildcard import, for later refactoring
This commit is contained in:
parent
23eba8fd97
commit
6806965bda
1 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue