Compare commits

..

1 commit

Author SHA1 Message Date
Axionize
fe8e76d568
Merge 6e7c537956 into f4baa4c6d8 2024-10-03 18:00:53 -04:00
5 changed files with 6 additions and 28 deletions

View file

@ -1,3 +0,0 @@
---
bugfixes:
- mount - Handle ``boot`` option on Linux, NetBSD and OpenBSD correctly (https://github.com/ansible-collections/ansible.posix/issues/364).

View file

@ -1,3 +0,0 @@
---
trivial:
- Bump ansible.posix version to 2.0.0.

View file

@ -1,7 +1,7 @@
---
namespace: ansible
name: posix
version: 2.0.0
version: 1.6.1
readme: README.md
authors:
- Ansible (github.com/ansible)

View file

@ -850,8 +850,11 @@ def main():
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.")
elif not module.params['boot']:
args['boot'] = 'no'
opts.append('noauto')
args['opts'] = ','.join(opts)
if 'defaults' in opts:
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'defaults'.")
else:
opts.append('noauto')
args['opts'] = ','.join(opts)
# If fstab file does not exist, we first need to create it. This mainly
# happens when fstab option is passed to the module.

View file

@ -472,25 +472,6 @@
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 }}'