mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-12 07:35:31 +01:00
Compare commits
6 commits
ca1e2687cf
...
281bf45423
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
281bf45423 | ||
|
|
719f7dfebf | ||
|
|
5cae7aa946 | ||
|
|
c77c592fc6 | ||
|
|
02006a1e7f | ||
|
|
1512495dd7 |
5 changed files with 29 additions and 7 deletions
|
|
@ -51,8 +51,8 @@ stages:
|
||||||
parameters:
|
parameters:
|
||||||
testFormat: devel/linux/{0}/1
|
testFormat: devel/linux/{0}/1
|
||||||
targets:
|
targets:
|
||||||
- name: Fedora 38
|
- name: Fedora 39
|
||||||
test: fedora38
|
test: fedora39
|
||||||
- name: Ubuntu 20.04
|
- name: Ubuntu 20.04
|
||||||
test: ubuntu2004
|
test: ubuntu2004
|
||||||
- name: Ubuntu 22.04
|
- name: Ubuntu 22.04
|
||||||
|
|
|
||||||
3
changelogs/fragments/346-boot-linux.yml
Normal file
3
changelogs/fragments/346-boot-linux.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfix:
|
||||||
|
- mount - Handle ``boot`` option on Linux, NetBSD and OpenBSD correctly (https://github.com/ansible-collections/ansible.posix/issues/364).
|
||||||
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)."
|
||||||
|
|
@ -835,11 +835,8 @@ 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:
|
opts.append('noauto')
|
||||||
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'defaults'.")
|
args['opts'] = ','.join(opts)
|
||||||
else:
|
|
||||||
opts.append('noauto')
|
|
||||||
args['opts'] = ','.join(opts)
|
|
||||||
|
|
||||||
# If fstab file does not exist, we first need to create it. This mainly
|
# If fstab file does not exist, we first need to create it. This mainly
|
||||||
# happens when fstab option is passed to the module.
|
# happens when fstab option is passed to the module.
|
||||||
|
|
|
||||||
|
|
@ -367,6 +367,25 @@
|
||||||
path: /tmp/myfs
|
path: /tmp/myfs
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
|
- name: Mount the FS with noauto option and defaults
|
||||||
|
mount:
|
||||||
|
path: /tmp/myfs
|
||||||
|
src: /tmp/myfs.img
|
||||||
|
fstype: ext3
|
||||||
|
state: mounted
|
||||||
|
boot: no
|
||||||
|
register: mount_info
|
||||||
|
|
||||||
|
- name: assert the mount without noauto was successful
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- "'noauto' in mount_info['opts'].split(',')"
|
||||||
|
|
||||||
|
- name: Unmount FS
|
||||||
|
mount:
|
||||||
|
path: /tmp/myfs
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Remove the test FS
|
- name: Remove the test FS
|
||||||
file:
|
file:
|
||||||
path: '{{ item }}'
|
path: '{{ item }}'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue