1
0
Fork 0
mirror of https://github.com/ansible-collections/ansible.posix.git synced 2026-02-03 23:51:48 +00:00

mount: remove boot exception if defaults in opts

This commit is contained in:
copyrights 2022-05-23 22:21:11 +02:00 committed by Hideki Saito
parent afa724ba8a
commit 2041e7f918
No known key found for this signature in database
GPG key ID: 3E1D43AA010AC50A
3 changed files with 24 additions and 5 deletions

View file

@ -472,6 +472,25 @@
path: /tmp/myfs
state: absent
- name: Mount the FS with noauto option and defaults
ansible.posix.mount:
path: /tmp/myfs
src: /tmp/myfs.img
fstype: ext3
state: mounted
boot: false
register: mount_info
- name: Assert the mount without noauto was successful
ansible.builtin.assert:
that:
- "'noauto' in mount_info['opts'].split(',')"
- name: Unmount FS
ansible.posix.mount:
path: /tmp/myfs
state: absent
- name: Remove the test FS
ansible.builtin.file:
path: '{{ item }}'