2 Commits

Author SHA1 Message Date
David Villafaña
662d32edab Merge 4ee6d4b9cb into 0ed72d0004 2024-09-09 08:38:35 -05:00
dvillafana
4ee6d4b9cb (feat) add no_log options for 'opts' parameter 2024-09-06 16:30:28 -05:00
3 changed files with 1 additions and 52 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

@@ -48,7 +48,6 @@ options:
- Do not log opts.
type: bool
default: false
version_added: 1.5.5
dump:
description:
- Dump (see fstab(5)).

View File

@@ -739,53 +739,3 @@
- /tmp/myfs_A.img
- /tmp/myfs_B.img
- /tmp/myfs
- name: Block to test opts_no_log option
when: ansible_system == 'Linux'
block:
- name: Create an empty file
community.general.filesize:
path: /tmp/myfs.img
size: 1M
- name: Format FS
community.general.filesystem:
fstype: ext3
dev: /tmp/myfs.img
- name: Mount the FS with opts_no_log option true
ansible.posix.mount:
path: /tmp/myfs
src: /tmp/myfs.img
fstype: ext3
state: mounted
opts: rw
opts_no_log: true
register: mount_info
- name: Assert opts_no_log option true
ansible.builtin.assert:
that:
- mount_info.opts == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
- name: Remount the FS with opts_no_log option false
ansible.posix.mount:
path: /tmp/myfs
src: /tmp/myfs.img
fstype: ext3
state: remounted
opts: rw,user
opts_no_log: false
register: mount_info
- name: Assert opts_no_log option false
ansible.builtin.assert:
that:
- mount_info.opts == 'rw,user'
always:
- name: Unmount FS
ansible.posix.mount:
path: /tmp/myfs
state: absent
- name: Remove the test FS
ansible.builtin.file:
path: '{{ item }}'
state: absent
loop:
- /tmp/myfs.img
- /tmp/myfs