Fix integration test for mount module for Ansible Core 2.22 or later (#794)

- Fixes #793

Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
Hideki Saito
2026-09-14 17:16:26 +09:00
committed by GitHub
parent 20699d7184
commit 93f25f88b8
2 changed files with 10 additions and 1 deletions
@@ -0,0 +1,3 @@
---
trivial:
- Fix mount opts_no_log integration test for ansible-core 2.22 (https://github.com/ansible-collections/ansible.posix/issues/793).
@@ -1165,10 +1165,16 @@
opts: rw
opts_no_log: true
register: mount_info
- name: Assert opts_no_log option true
- name: Assert opts_no_log option true (ansible-core < 2.22)
ansible.builtin.assert:
that:
- mount_info.opts == 'VALUE_SPECIFIED_IN_NO_LOG_PARAMETER'
when: ansible_version.full is ansible.builtin.version('2.22', '<')
- name: Assert opts_no_log option true (ansible-core >= 2.22)
ansible.builtin.assert:
that:
- mount_info.opts == 'rw'
when: ansible_version.full is ansible.builtin.version('2.22', '>=')
- name: Remount the FS with opts_no_log option false
ansible.posix.mount:
path: /tmp/myfs