1
0
Fork 0
mirror of https://github.com/ansible-collections/ansible.posix.git synced 2026-02-04 08:01:49 +00:00

(feat) add no_log options for 'opts' parameter

* Fixed #497
This commit is contained in:
dvillafana 2024-09-06 16:30:28 -05:00 committed by Hideki Saito
parent 0df6c21af4
commit e00a4299c1
No known key found for this signature in database
GPG key ID: 3E1D43AA010AC50A
3 changed files with 64 additions and 0 deletions

View file

@ -43,6 +43,12 @@ options:
description:
- Mount options (see fstab(5), or vfstab(4) on Solaris).
type: str
opts_no_log:
description:
- Do not log opts.
type: bool
default: false
version_added: 1.6.0
dump:
description:
- Dump (see fstab(5)).
@ -209,6 +215,7 @@ EXAMPLES = r'''
src: //192.168.1.200/share
path: /mnt/smb_share
opts: "rw,vers=3,file_mode=0600,dir_mode=0700,dom={{ ad_domain }},username={{ ad_username }},password={{ ad_password }}"
opts_no_log: true
fstype: cifs
state: ephemeral
'''
@ -768,6 +775,7 @@ def main():
fstype=dict(type='str'),
path=dict(type='path', required=True, aliases=['name']),
opts=dict(type='str'),
opts_no_log=dict(type='bool', default=False),
passno=dict(type='str', no_log=False, default='0'),
src=dict(type='path'),
backup=dict(type='bool', default=False),
@ -781,6 +789,9 @@ def main():
),
)
if module.params['opts_no_log']:
module.no_log_values.add(module.params['opts'])
# solaris args:
# name, src, fstype, opts, boot, passno, state, fstab=/etc/vfstab
# linux args: