mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-05-12 20:42:02 +00:00
Compare commits
2 Commits
1.6.0
...
2c67385b57
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c67385b57 | ||
|
|
bd72a5865a |
@@ -5,48 +5,6 @@ ansible.posix Release Notes
|
|||||||
.. contents:: Topics
|
.. contents:: Topics
|
||||||
|
|
||||||
|
|
||||||
v1.6.0
|
|
||||||
======
|
|
||||||
|
|
||||||
Release Summary
|
|
||||||
---------------
|
|
||||||
|
|
||||||
This is the minor release of the ``ansible.posix`` collection.
|
|
||||||
This changelog contains all changes to the modules and plugins
|
|
||||||
in this collection that have been added after the release of
|
|
||||||
``ansible.posix`` 1.5.4.
|
|
||||||
|
|
||||||
Major Changes
|
|
||||||
-------------
|
|
||||||
|
|
||||||
- Dropping support for Ansible 2.9, ansible-core 2.15 will be minimum required version for this release
|
|
||||||
|
|
||||||
Minor Changes
|
|
||||||
-------------
|
|
||||||
|
|
||||||
- Add summary_only parameter to profile_roles and profile_tasks callbacks.
|
|
||||||
- firewalld - add functionality to set forwarding (https://github.com/ansible-collections/ansible.posix/pull/548).
|
|
||||||
- firewalld - added offline flag implementation (https://github.com/ansible-collections/ansible.posix/pull/484)
|
|
||||||
- firewalld - respawn module to use the system python interpreter when the ``firewall`` python module is not available for ``ansible_python_interpreter`` (https://github.com/ansible-collections/ansible.posix/pull/460).
|
|
||||||
- firewalld_info - Only warn about ignored zones, when there are zones ignored.
|
|
||||||
- firewalld_info - respawn module to use the system python interpreter when the ``firewall`` python module is not available for ``ansible_python_interpreter`` (https://github.com/ansible-collections/ansible.posix/pull/460).
|
|
||||||
- mount - add no_log option for opts parameter (https://github.com/ansible-collections/ansible.posix/pull/563).
|
|
||||||
- seboolean - respawn module to use the system python interpreter when the ``selinux`` python module is not available for ``ansible_python_interpreter`` (https://github.com/ansible-collections/ansible.posix/pull/460).
|
|
||||||
- selinux - respawn module to use the system python interpreter when the ``selinux`` python module is not available for ``ansible_python_interpreter`` (https://github.com/ansible-collections/ansible.posix/pull/460).
|
|
||||||
|
|
||||||
Removed Features (previously deprecated)
|
|
||||||
----------------------------------------
|
|
||||||
|
|
||||||
- skippy - Remove skippy pluglin as it is no longer supported(https://github.com/ansible-collections/ansible.posix/issues/350).
|
|
||||||
|
|
||||||
Bugfixes
|
|
||||||
--------
|
|
||||||
|
|
||||||
- Bugfix in the documentation regarding the path option for authorised_key(https://github.com/ansible-collections/ansible.posix/issues/483).
|
|
||||||
- seboolean - make it work with disabled SELinux
|
|
||||||
- synchronize - maintain proper formatting of the remote paths (https://github.com/ansible-collections/ansible.posix/pull/361).
|
|
||||||
- sysctl - fix sysctl to work properly on symlinks (https://github.com/ansible-collections/ansible.posix/issues/111).
|
|
||||||
|
|
||||||
v1.5.4
|
v1.5.4
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ For more information about communication, see the [Ansible communication guide](
|
|||||||
<!--start requires_ansible-->
|
<!--start requires_ansible-->
|
||||||
## Ansible version compatibility
|
## Ansible version compatibility
|
||||||
|
|
||||||
This collection has been tested against following Ansible versions: **>=2.15**.
|
This collection has been tested against following Ansible versions: **>=2.14**.
|
||||||
<!--end requires_ansible-->
|
<!--end requires_ansible-->
|
||||||
|
|
||||||
## Included content
|
## Included content
|
||||||
@@ -74,10 +74,10 @@ None
|
|||||||
|
|
||||||
<!-- List the versions of Ansible the collection has been tested with. Must match what is in galaxy.yml. -->
|
<!-- List the versions of Ansible the collection has been tested with. Must match what is in galaxy.yml. -->
|
||||||
|
|
||||||
- ansible-core 2.18 (devel)
|
- ansible-core 2.17 (devel)
|
||||||
- ansible-core 2.17 (stable)
|
|
||||||
- ansible-core 2.16 (stable)
|
- ansible-core 2.16 (stable)
|
||||||
- ansible-core 2.15 (stable)
|
- ansible-core 2.15 (stable)
|
||||||
|
- ansible-core 2.14 (stable)
|
||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
|
|||||||
@@ -347,61 +347,3 @@ releases:
|
|||||||
- 451_firewall_fix_protocol_parameter.yml
|
- 451_firewall_fix_protocol_parameter.yml
|
||||||
- 456_sysctl_fix_nonetype.yml
|
- 456_sysctl_fix_nonetype.yml
|
||||||
release_date: '2023-05-10'
|
release_date: '2023-05-10'
|
||||||
1.6.0:
|
|
||||||
changes:
|
|
||||||
bugfixes:
|
|
||||||
- Bugfix in the documentation regarding the path option for authorised_key(https://github.com/ansible-collections/ansible.posix/issues/483).
|
|
||||||
- seboolean - make it work with disabled SELinux
|
|
||||||
- synchronize - maintain proper formatting of the remote paths (https://github.com/ansible-collections/ansible.posix/pull/361).
|
|
||||||
- sysctl - fix sysctl to work properly on symlinks (https://github.com/ansible-collections/ansible.posix/issues/111).
|
|
||||||
major_changes:
|
|
||||||
- Dropping support for Ansible 2.9, ansible-core 2.15 will be minimum required
|
|
||||||
version for this release
|
|
||||||
minor_changes:
|
|
||||||
- Add summary_only parameter to profile_roles and profile_tasks callbacks.
|
|
||||||
- firewalld - add functionality to set forwarding (https://github.com/ansible-collections/ansible.posix/pull/548).
|
|
||||||
- firewalld - added offline flag implementation (https://github.com/ansible-collections/ansible.posix/pull/484)
|
|
||||||
- firewalld - respawn module to use the system python interpreter when the ``firewall``
|
|
||||||
python module is not available for ``ansible_python_interpreter`` (https://github.com/ansible-collections/ansible.posix/pull/460).
|
|
||||||
- firewalld_info - Only warn about ignored zones, when there are zones ignored.
|
|
||||||
- firewalld_info - respawn module to use the system python interpreter when
|
|
||||||
the ``firewall`` python module is not available for ``ansible_python_interpreter``
|
|
||||||
(https://github.com/ansible-collections/ansible.posix/pull/460).
|
|
||||||
- mount - add no_log option for opts parameter (https://github.com/ansible-collections/ansible.posix/pull/563).
|
|
||||||
- seboolean - respawn module to use the system python interpreter when the ``selinux``
|
|
||||||
python module is not available for ``ansible_python_interpreter`` (https://github.com/ansible-collections/ansible.posix/pull/460).
|
|
||||||
- selinux - respawn module to use the system python interpreter when the ``selinux``
|
|
||||||
python module is not available for ``ansible_python_interpreter`` (https://github.com/ansible-collections/ansible.posix/pull/460).
|
|
||||||
release_summary: 'This is the minor release of the ``ansible.posix`` collection.
|
|
||||||
|
|
||||||
This changelog contains all changes to the modules and plugins
|
|
||||||
|
|
||||||
in this collection that have been added after the release of
|
|
||||||
|
|
||||||
``ansible.posix`` 1.5.4.'
|
|
||||||
removed_features:
|
|
||||||
- skippy - Remove skippy pluglin as it is no longer supported(https://github.com/ansible-collections/ansible.posix/issues/350).
|
|
||||||
fragments:
|
|
||||||
- 1.6.0.yml
|
|
||||||
- 206_fix_sysctl_to_work_on_symlinks.yml
|
|
||||||
- 333_doc_absent_precision.yml
|
|
||||||
- 361_maintain_proper_formating_remote_paths.yml
|
|
||||||
- 421-remove-deprecation-warning.yml
|
|
||||||
- 460-respawn.yaml
|
|
||||||
- 466-tests.yml
|
|
||||||
- 477_ci_update.yml
|
|
||||||
- 484-firewalld-offline.yml
|
|
||||||
- 487_ci_update.yml
|
|
||||||
- 490_doc_authorized_key_path.yml
|
|
||||||
- 496_seboolean-make-it-wrk-with-SELinux-disabled.yaml
|
|
||||||
- 504-firewalld_info-warning.yaml
|
|
||||||
- 508_ci_update.yml
|
|
||||||
- 510_ci_update.yml
|
|
||||||
- 511_profile-callbacks-add-summary-only-parameter.yml
|
|
||||||
- 548_add_foward.yml
|
|
||||||
- 556_remove_skippy_callback.yml
|
|
||||||
- 562_update_core_version.yml
|
|
||||||
- 563_add_no_log_option.yml
|
|
||||||
- dropping-ansible29.yml
|
|
||||||
- test-reqs.yml
|
|
||||||
release_date: '2024-09-11'
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- sysctl - fix sysctl to work properly on symlinks (https://github.com/ansible-collections/ansible.posix/issues/111).
|
||||||
4
changelogs/fragments/333_doc_absent_precision.yml
Normal file
4
changelogs/fragments/333_doc_absent_precision.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- mount - fix description in the documentation of the state ``absent`` to match its actual behavior
|
||||||
|
and point out that ``src`` is ignored with state ``absent`` and ``unmounted`` (https://github.com/ansible-collections/ansible.posix/issues/322)
|
||||||
2
changelogs/fragments/421-remove-deprecation-warning.yml
Normal file
2
changelogs/fragments/421-remove-deprecation-warning.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
trivial:
|
||||||
|
- synchronize - instantiate the connection plugin without the ``new_stdin`` argument, which is deprecated in ansible-core 2.15 (https://github.com/ansible-collections/ansible.posix/pull/421).
|
||||||
10
changelogs/fragments/460-respawn.yaml
Normal file
10
changelogs/fragments/460-respawn.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
minor_changes:
|
||||||
|
- "seboolean - respawn module to use the system python interpreter when the ``selinux`` python module is not available for ``ansible_python_interpreter``
|
||||||
|
(https://github.com/ansible-collections/ansible.posix/pull/460)."
|
||||||
|
- "selinux - respawn module to use the system python interpreter when the ``selinux`` python module is not available for ``ansible_python_interpreter``
|
||||||
|
(https://github.com/ansible-collections/ansible.posix/pull/460)."
|
||||||
|
- "firewalld - respawn module to use the system python interpreter when the ``firewall`` python module is not available for ``ansible_python_interpreter``
|
||||||
|
(https://github.com/ansible-collections/ansible.posix/pull/460)."
|
||||||
|
- "firewalld_info - respawn module to use the system python interpreter when the ``firewall`` python module is not available for ``ansible_python_interpreter``
|
||||||
|
(https://github.com/ansible-collections/ansible.posix/pull/460)."
|
||||||
2
changelogs/fragments/466-tests.yml
Normal file
2
changelogs/fragments/466-tests.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
trivial:
|
||||||
|
- "Fix integration tests so they work with ansible-core devel / 2.16 (https://github.com/ansible-collections/ansible.posix/pull/466)."
|
||||||
3
changelogs/fragments/477_ci_update.yml
Normal file
3
changelogs/fragments/477_ci_update.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- "Drop Python3.9 and update versions of RHEL,Fedora and FreeBSD for ansible-core:devel test(https://github.com/ansible-collections/ansible.posix/issues/476)."
|
||||||
2
changelogs/fragments/484-firewalld-offline.yml
Normal file
2
changelogs/fragments/484-firewalld-offline.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
minor_changes:
|
||||||
|
- firewalld - added offline flag implementation (https://github.com/ansible-collections/ansible.posix/pull/484)
|
||||||
3
changelogs/fragments/487_ci_update.yml
Normal file
3
changelogs/fragments/487_ci_update.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- "Drop FreeBSD12.4 from CI for ansible-core:devel(https://github.com/ansible-collections/ansible.posix/issues/486)."
|
||||||
3
changelogs/fragments/490_doc_authorized_key_path.yml
Normal file
3
changelogs/fragments/490_doc_authorized_key_path.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- "Bugfix in the documentation regarding the path option for authorised_key(https://github.com/ansible-collections/ansible.posix/issues/483)."
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- seboolean - make it work with disabled SELinux
|
||||||
2
changelogs/fragments/504-firewalld_info-warning.yaml
Normal file
2
changelogs/fragments/504-firewalld_info-warning.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
minor_changes:
|
||||||
|
- firewalld_info - Only warn about ignored zones, when there are zones ignored.
|
||||||
3
changelogs/fragments/508_ci_update.yml
Normal file
3
changelogs/fragments/508_ci_update.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- "Refactoring remote CI targets."
|
||||||
3
changelogs/fragments/510_ci_update.yml
Normal file
3
changelogs/fragments/510_ci_update.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- "Replace Fedora 38 with 39 for container test(https://github.com/ansible-collections/ansible.posix/issues/509)."
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
minor_changes:
|
||||||
|
- "Add summary_only parameter to profile_roles and profile_tasks callbacks."
|
||||||
2
changelogs/fragments/556_remove_skippy_callback.yml
Normal file
2
changelogs/fragments/556_remove_skippy_callback.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
removed_features:
|
||||||
|
- skippy - Remove skippy pluglin as it is no longer supported(https://github.com/ansible-collections/ansible.posix/issues/350).
|
||||||
2
changelogs/fragments/dropping-ansible29.yml
Normal file
2
changelogs/fragments/dropping-ansible29.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
major_changes:
|
||||||
|
- "Dropping support for Ansible 2.9, ansible-core 2.14 will be minimum required version for this release"
|
||||||
2
changelogs/fragments/test-reqs.yml
Normal file
2
changelogs/fragments/test-reqs.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
trivial:
|
||||||
|
- "Move Galaxy test requirements from old transitional format in tests/requirements.yml to standard Ansible Galaxy requirements files in tests/integration/requirements.yml and tests/unit/requirements.yml."
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
namespace: ansible
|
namespace: ansible
|
||||||
name: posix
|
name: posix
|
||||||
version: 1.6.0
|
version: 1.5.4
|
||||||
readme: README.md
|
readme: README.md
|
||||||
authors:
|
authors:
|
||||||
- Ansible (github.com/ansible)
|
- Ansible (github.com/ansible)
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
---
|
---
|
||||||
requires_ansible: ">=2.15.0"
|
requires_ansible: ">=2.14.0"
|
||||||
|
|||||||
@@ -77,14 +77,7 @@ class ActionModule(ActionBase):
|
|||||||
|
|
||||||
if self._host_is_ipv6_address(host):
|
if self._host_is_ipv6_address(host):
|
||||||
return '[%s%s]:%s' % (user_prefix, host, path)
|
return '[%s%s]:%s' % (user_prefix, host, path)
|
||||||
|
return '%s%s:%s' % (user_prefix, host, path)
|
||||||
# preserve formatting of remote paths if host or user@host is explicitly defined in the path
|
|
||||||
if ':' not in path:
|
|
||||||
return '%s%s:%s' % (user_prefix, host, path)
|
|
||||||
elif '@' not in path:
|
|
||||||
return '%s%s' % (user_prefix, path)
|
|
||||||
else:
|
|
||||||
return path
|
|
||||||
|
|
||||||
def _process_origin(self, host, path, user):
|
def _process_origin(self, host, path, user):
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ options:
|
|||||||
forward:
|
forward:
|
||||||
description:
|
description:
|
||||||
- The forward setting you would like to enable/disable to/from zones within firewalld.
|
- The forward setting you would like to enable/disable to/from zones within firewalld.
|
||||||
- This option only is supported by firewalld v0.9.0 or later.
|
|
||||||
type: str
|
type: str
|
||||||
masquerade:
|
masquerade:
|
||||||
description:
|
description:
|
||||||
@@ -143,8 +142,8 @@ notes:
|
|||||||
- This module needs C(python-firewall) or C(python3-firewall) on managed nodes.
|
- This module needs C(python-firewall) or C(python3-firewall) on managed nodes.
|
||||||
It is usually provided as a subset with C(firewalld) from the OS distributor for the OS default Python interpreter.
|
It is usually provided as a subset with C(firewalld) from the OS distributor for the OS default Python interpreter.
|
||||||
requirements:
|
requirements:
|
||||||
- firewalld >= 0.9.0
|
- firewalld >= 0.2.11
|
||||||
- python-firewall >= 0.9.0
|
- python-firewall >= 0.2.11
|
||||||
author:
|
author:
|
||||||
- Adam Miller (@maxamillion)
|
- Adam Miller (@maxamillion)
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -43,12 +43,6 @@ options:
|
|||||||
description:
|
description:
|
||||||
- Mount options (see fstab(5), or vfstab(4) on Solaris).
|
- Mount options (see fstab(5), or vfstab(4) on Solaris).
|
||||||
type: str
|
type: str
|
||||||
opts_no_log:
|
|
||||||
description:
|
|
||||||
- Do not log opts.
|
|
||||||
type: bool
|
|
||||||
default: false
|
|
||||||
version_added: 1.6.0
|
|
||||||
dump:
|
dump:
|
||||||
description:
|
description:
|
||||||
- Dump (see fstab(5)).
|
- Dump (see fstab(5)).
|
||||||
@@ -215,7 +209,6 @@ EXAMPLES = r'''
|
|||||||
src: //192.168.1.200/share
|
src: //192.168.1.200/share
|
||||||
path: /mnt/smb_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: "rw,vers=3,file_mode=0600,dir_mode=0700,dom={{ ad_domain }},username={{ ad_username }},password={{ ad_password }}"
|
||||||
opts_no_log: true
|
|
||||||
fstype: cifs
|
fstype: cifs
|
||||||
state: ephemeral
|
state: ephemeral
|
||||||
'''
|
'''
|
||||||
@@ -775,7 +768,6 @@ def main():
|
|||||||
fstype=dict(type='str'),
|
fstype=dict(type='str'),
|
||||||
path=dict(type='path', required=True, aliases=['name']),
|
path=dict(type='path', required=True, aliases=['name']),
|
||||||
opts=dict(type='str'),
|
opts=dict(type='str'),
|
||||||
opts_no_log=dict(type='bool', default=False),
|
|
||||||
passno=dict(type='str', no_log=False, default='0'),
|
passno=dict(type='str', no_log=False, default='0'),
|
||||||
src=dict(type='path'),
|
src=dict(type='path'),
|
||||||
backup=dict(type='bool', default=False),
|
backup=dict(type='bool', default=False),
|
||||||
@@ -789,9 +781,6 @@ def main():
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if module.params['opts_no_log']:
|
|
||||||
module.no_log_values.add(module.params['opts'])
|
|
||||||
|
|
||||||
# solaris args:
|
# solaris args:
|
||||||
# name, src, fstype, opts, boot, passno, state, fstab=/etc/vfstab
|
# name, src, fstype, opts, boot, passno, state, fstab=/etc/vfstab
|
||||||
# linux args:
|
# linux args:
|
||||||
|
|||||||
@@ -23,55 +23,6 @@
|
|||||||
that:
|
that:
|
||||||
- result is not changed
|
- result is not changed
|
||||||
|
|
||||||
- name: Zone forwarding test
|
|
||||||
when: (ansible_distribution == 'RedHat' and ansible_distribution_major_version is version('8', '>='))
|
|
||||||
block:
|
|
||||||
- name: Enable zone forwarding
|
|
||||||
ansible.posix.firewalld:
|
|
||||||
zone: custom
|
|
||||||
forward: true
|
|
||||||
permanent: true
|
|
||||||
state: enabled
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- name: Assert zone forwarding is enabled
|
|
||||||
ansible.builtin.debug:
|
|
||||||
var: result is changed
|
|
||||||
|
|
||||||
- name: Enable zone forwarding (verify not changed)
|
|
||||||
ansible.posix.firewalld:
|
|
||||||
zone: custom
|
|
||||||
forward: true
|
|
||||||
permanent: true
|
|
||||||
state: enabled
|
|
||||||
register: result
|
|
||||||
|
|
||||||
- name: Assert zone forwarding is enabled (verify not changed)
|
|
||||||
ansible.builtin.debug:
|
|
||||||
var: result is not changed
|
|
||||||
|
|
||||||
- name: Disable zone forwarding
|
|
||||||
ansible.posix.firewalld:
|
|
||||||
zone: custom
|
|
||||||
forward: false
|
|
||||||
permanent: true
|
|
||||||
state: enabled
|
|
||||||
|
|
||||||
- name: Assert zone forwarding is disabled
|
|
||||||
ansible.builtin.debug:
|
|
||||||
var: result is changed
|
|
||||||
|
|
||||||
- name: Disable zone forwarding (verify not changed)
|
|
||||||
ansible.posix.firewalld:
|
|
||||||
zone: custom
|
|
||||||
forward: false
|
|
||||||
permanent: true
|
|
||||||
state: enabled
|
|
||||||
|
|
||||||
- name: Assert zone forwarding is disabled (verify not changed)
|
|
||||||
ansible.builtin.debug:
|
|
||||||
var: result is not changed
|
|
||||||
|
|
||||||
- name: Firewalld remove zone custom
|
- name: Firewalld remove zone custom
|
||||||
ansible.posix.firewalld:
|
ansible.posix.firewalld:
|
||||||
zone: custom
|
zone: custom
|
||||||
|
|||||||
@@ -739,53 +739,3 @@
|
|||||||
- /tmp/myfs_A.img
|
- /tmp/myfs_A.img
|
||||||
- /tmp/myfs_B.img
|
- /tmp/myfs_B.img
|
||||||
- /tmp/myfs
|
- /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: ext4
|
|
||||||
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: ext4
|
|
||||||
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: ext4
|
|
||||||
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user