mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-29 09:56:53 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac3e803a36 | ||
|
|
8168ddca4f | ||
|
|
cc264be644 | ||
|
|
9bd2d1ec90 | ||
|
|
01b2c48161 | ||
|
|
a26792418e |
@@ -297,10 +297,10 @@ stages:
|
||||
targets:
|
||||
- name: CentOS 7
|
||||
test: centos7
|
||||
- name: Fedora 33
|
||||
test: fedora33
|
||||
- name: Fedora 34
|
||||
test: fedora34
|
||||
- name: Fedora 35
|
||||
test: fedora35
|
||||
- name: openSUSE 15 py2
|
||||
test: opensuse15py2
|
||||
- name: openSUSE 15 py3
|
||||
|
||||
@@ -6,6 +6,20 @@ Community General Release Notes
|
||||
|
||||
This changelog describes changes after version 3.0.0.
|
||||
|
||||
v4.0.1
|
||||
======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfix release for today's Ansible 5.0.0 beta 1.
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- a_module test plugin - fix crash when testing a module name that was tombstoned (https://github.com/ansible-collections/community.general/pull/3660).
|
||||
- xattr - fix exception caused by ``_run_xattr()`` raising a ``ValueError`` due to a mishandling of base64-encoded value (https://github.com/ansible-collections/community.general/issues/3673).
|
||||
|
||||
v4.0.0
|
||||
======
|
||||
|
||||
|
||||
@@ -1027,3 +1027,16 @@ releases:
|
||||
name: a_module
|
||||
namespace: null
|
||||
release_date: '2021-11-02'
|
||||
4.0.1:
|
||||
changes:
|
||||
bugfixes:
|
||||
- a_module test plugin - fix crash when testing a module name that was tombstoned
|
||||
(https://github.com/ansible-collections/community.general/pull/3660).
|
||||
- xattr - fix exception caused by ``_run_xattr()`` raising a ``ValueError``
|
||||
due to a mishandling of base64-encoded value (https://github.com/ansible-collections/community.general/issues/3673).
|
||||
release_summary: Bugfix release for today's Ansible 5.0.0 beta 1.
|
||||
fragments:
|
||||
- 3660-a_module-tombstone.yml
|
||||
- 3675-xattr-handle-base64-values.yml
|
||||
- 4.0.1.yml
|
||||
release_date: '2021-11-09'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace: community
|
||||
name: general
|
||||
version: 4.0.0
|
||||
version: 4.0.1
|
||||
readme: README.md
|
||||
authors:
|
||||
- Ansible (https://github.com/ansible)
|
||||
|
||||
@@ -158,7 +158,7 @@ def _run_xattr(module, cmd, check_rc=True):
|
||||
if line.startswith('#') or line == '':
|
||||
pass
|
||||
elif '=' in line:
|
||||
(key, val) = line.split('=')
|
||||
(key, val) = line.split('=', 1)
|
||||
result[key] = val.strip('"')
|
||||
else:
|
||||
result[line] = ''
|
||||
|
||||
@@ -7,6 +7,11 @@ __metaclass__ = type
|
||||
|
||||
from ansible.plugins.loader import action_loader, module_loader
|
||||
|
||||
try:
|
||||
from ansible.errors import AnsiblePluginRemovedError
|
||||
except ImportError:
|
||||
AnsiblePluginRemovedError = Exception
|
||||
|
||||
|
||||
def a_module(term):
|
||||
"""
|
||||
@@ -14,14 +19,17 @@ def a_module(term):
|
||||
- 'community.general.ufw' is community.general.a_module
|
||||
- 'community.general.does_not_exist' is not community.general.a_module
|
||||
"""
|
||||
for loader in (action_loader, module_loader):
|
||||
data = loader.find_plugin(term)
|
||||
# Ansible 2.9 returns a tuple
|
||||
if isinstance(data, tuple):
|
||||
data = data[0]
|
||||
if data is not None:
|
||||
return True
|
||||
return False
|
||||
try:
|
||||
for loader in (action_loader, module_loader):
|
||||
data = loader.find_plugin(term)
|
||||
# Ansible 2.9 returns a tuple
|
||||
if isinstance(data, tuple):
|
||||
data = data[0]
|
||||
if data is not None:
|
||||
return True
|
||||
return False
|
||||
except AnsiblePluginRemovedError:
|
||||
return False
|
||||
|
||||
|
||||
class TestModule(object):
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
- 'not (ansible_distribution in ["CentOS", "RedHat"] and item.0.key in ["f2fs", "reiserfs"])'
|
||||
- 'not (ansible_os_family == "RedHat" and ansible_distribution_major_version is version("8", ">=") and
|
||||
item.0.key == "btrfs")'
|
||||
# reiserfs-utils package not available with Fedora 35 on CI
|
||||
- 'not (ansible_distribution == "Fedora" and (ansible_facts.distribution_major_version | int >= 35) and
|
||||
item.0.key == "reiserfs")'
|
||||
# ocfs2 only available on Debian based distributions
|
||||
- 'not (item.0.key == "ocfs2" and ansible_os_family != "Debian")'
|
||||
# Tests use losetup which can not be used inside unprivileged container
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
name: reiserfs-utils
|
||||
state: present
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_distribution == 'Fedora' and (ansible_facts.distribution_major_version | int < 35)
|
||||
|
||||
- name: "Install reiserfs (OpenSuse)"
|
||||
ansible.builtin.package:
|
||||
|
||||
@@ -23,3 +23,15 @@
|
||||
# Local collection module (that exist or not)
|
||||
- "'testns.testcoll.collection_module' is community.general.a_module"
|
||||
- "'testns.testcoll.foobar' is not community.general.a_module"
|
||||
|
||||
- name: Test a_module in case of routing
|
||||
assert:
|
||||
that:
|
||||
# Redirected module
|
||||
- "'ufw' is community.general.a_module"
|
||||
# Redirected module where target collection does not exist
|
||||
# (the target collection must not have been installed in CI!)
|
||||
- "'onyx_pfc_interface' is not community.general.a_module"
|
||||
# Tombstoned module
|
||||
- "'community.general.docker_image_facts' is not community.general.a_module"
|
||||
when: ansible_version.string is version('2.10.0', '>=')
|
||||
|
||||
Reference in New Issue
Block a user