Compare commits

...

11 commits

Author SHA1 Message Date
copyrights
3cc70c4bb3
Merge f392e407f9 into 795d8e34e7 2024-03-29 23:13:44 +00:00
softwarefactory-project-zuul[bot]
795d8e34e7
Merge pull request #538 from csmart/ci_freebsd_133
ci: replace freebsd 13.2 with 13.3

The devel version of ansible-test has been updated to include support for FreeBSD 13.3, so this change swaps out 13.2 accordingly.
See ansible-collections/news-for-maintainers#67

Reviewed-by: Hideki Saito <saito@fgrep.org>
2024-03-26 06:50:36 +00:00
Chris Smart
b615d61fae ci: replace freebsd 13.2 with 13.3
The devel version of ansible-test has been updated to include support
for FreeBSD 13.3, so this change swaps out 13.2 accordingly.
2024-03-26 14:59:32 +09:00
softwarefactory-project-zuul[bot]
bda85b7453
Merge pull request #541 from saito-hideki/pr/replace_yield
[CI] Replaced yield with yield from for sanity test

SUMMARY
Replaced yield with yield from to address latest sanity test.
ISSUE TYPE

CI Tests Pull Request

COMPONENT NAME

ansible.posix

ADDITIONAL INFORMATION
None
2024-03-26 05:51:09 +00:00
Hideki Saito
ac82f575c6 Replaced yield with yield from to address latest sanity test
Signed-off-by: Hideki Saito <saito@fgrep.org>
2024-03-26 13:54:40 +09:00
softwarefactory-project-zuul[bot]
a356bdd3c4
Merge pull request #540 from saito-hideki/pr/relace_old_fqcn_selogin
[CI] Replaced old selogin FQCN for integration tests

SUMMARY
Some integration test tasks used the old FQCNs of commuinity.general.
This PR will replace old FQCN(community.general.system.selogin)with new cummonity.general.selogin
ISSUE TYPE

CI Tests Pull Request

COMPONENT NAME

ansible.posix.selinux

ADDITIONAL INFORMATION
None
2024-03-26 02:59:55 +00:00
Hideki Saito
4f93234a8b Replaced old selogin FQCN
- FCQN has been changed since comunity.general stable-6

Signed-off-by: Hideki Saito <saito@fgrep.org>
2024-03-26 10:39:34 +09:00
Adam Miller
f392e407f9
Merge branch 'main' into last_wins 2024-01-10 08:41:00 -06:00
copyrights
c77c592fc6 add changelog fragment 2022-05-24 07:10:54 +02:00
copyrights
02006a1e7f add mount boot test 2022-05-23 22:52:38 +02:00
copyrights
1512495dd7 mount: remove boot exception if defaults in opts 2022-05-23 22:21:11 +02:00
6 changed files with 32 additions and 15 deletions

View file

@ -178,8 +178,8 @@ stages:
targets:
- name: RHEL 9.3
test: rhel/9.3
- name: FreeBSD 13.2
test: freebsd/13.2
- name: FreeBSD 13.3
test: freebsd/13.3
- stage: Remote_2_16
displayName: Remote 2.16
dependsOn: []

View 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).

View file

@ -840,11 +840,8 @@ def main():
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'noauto'.")
elif not module.params['boot']:
args['boot'] = 'no'
if 'defaults' in opts:
args['warnings'].append("Ignore the 'boot' due to 'opts' contains 'defaults'.")
else:
opts.append('noauto')
args['opts'] = ','.join(opts)
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

@ -467,6 +467,25 @@
that:
- mount_info['opts'] == 'rw,user,async,noauto'
- name: Unmount FS
ansible.posix.mount:
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: no
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

View file

@ -5,7 +5,7 @@
- name: Attempt to add mapping without 'seuser'
register: selogin_error
ignore_errors: true
community.general.system.selogin:
community.general.selogin:
login: seuser
- name: Verify failure
ansible.builtin.assert:
@ -19,7 +19,7 @@
- false
- true
- false
community.general.system.selogin:
community.general.selogin:
login: seuser
seuser: staff_u
- name: New mapping- verify functionality and check_mode
@ -37,7 +37,7 @@
- false
- true
- false
community.general.system.selogin:
community.general.selogin:
login: seuser
seuser: user_u
- name: Changed mapping- verify functionality and check_mode
@ -55,7 +55,7 @@
- false
- true
- false
community.general.system.selogin:
community.general.selogin:
login: seuser
state: absent
- name: Delete mapping- verify functionality and check_mode

View file

@ -64,8 +64,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
# newline that our naive format() added
data_as_list[-1] = data_as_list[-1][:-1]
for line in data_as_list:
yield line
yield from data_as_list
def mock_open(mock=None, read_data=''):
"""
@ -93,8 +92,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
if handle.readline.return_value is not None:
while True:
yield handle.readline.return_value
for line in _data:
yield line
yield from _data
global file_spec
if file_spec is None: