(feat) add no_log options for 'opts' parameter

This commit is contained in:
dvillafana 2024-09-06 16:30:28 -05:00
parent 0df6c21af4
commit 4ee6d4b9cb
2 changed files with 11 additions and 1 deletions

View file

@ -1,7 +1,7 @@
---
namespace: ansible
name: posix
version: 1.5.4
version: 1.5.5
readme: README.md
authors:
- Ansible (github.com/ansible)

View file

@ -43,6 +43,11 @@ 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
dump:
description:
- Dump (see fstab(5)).
@ -209,6 +214,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 +774,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 +788,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: