mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 23:55:19 +01:00
Compare commits
1 commit
04a6242c74
...
991dc9c2ed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
991dc9c2ed |
3 changed files with 5 additions and 24 deletions
|
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
bugfixes:
|
|
||||||
- mount - Handle ``boot`` option on Linux, NetBSD and OpenBSD correctly (https://github.com/ansible-collections/ansible.posix/issues/364).
|
|
||||||
|
|
@ -850,6 +850,9 @@ def main():
|
||||||
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.")
|
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.")
|
||||||
elif not module.params['boot']:
|
elif not module.params['boot']:
|
||||||
args['boot'] = 'no'
|
args['boot'] = 'no'
|
||||||
|
if 'defaults' in opts:
|
||||||
|
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'defaults'.")
|
||||||
|
else:
|
||||||
opts.append('noauto')
|
opts.append('noauto')
|
||||||
args['opts'] = ','.join(opts)
|
args['opts'] = ','.join(opts)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -472,25 +472,6 @@
|
||||||
path: /tmp/myfs
|
path: /tmp/myfs
|
||||||
state: absent
|
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
|
- name: Remove the test FS
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: '{{ item }}'
|
path: '{{ item }}'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue