Compare commits

..

No commits in common. "c10" and "c8s" have entirely different histories.
c10 ... c8s

10 changed files with 332 additions and 453 deletions

30
.gitignore vendored
View File

@ -1,2 +1,28 @@
ansible-documentation-2.16.15.tar.gz SOURCES/Jinja2-3.1.2.tar.gz
ansible_core-2.16.16.tar.gz SOURCES/MarkupSafe-2.1.0.tar.gz
SOURCES/ansible-core-2.14.2.tar.gz
SOURCES/packaging-20.4.tar.gz
SOURCES/pyparsing-2.4.7.tar.gz
SOURCES/resolvelib-0.5.4.tar.gz
/Jinja2-3.1.2.tar.gz
/MarkupSafe-2.1.0.tar.gz
/ansible-core-2.14.2.tar.gz
/packaging-20.4.tar.gz
/pyparsing-2.4.7.tar.gz
/resolvelib-0.5.4.tar.gz
/MarkupSafe-2.1.2.tar.gz
/ansible-core-2.15.0.tar.gz
/packaging-21.3.tar.gz
/pyparsing-3.0.7.tar.gz
/resolvelib-1.0.1.tar.gz
/ansible-core-2.15.1.tar.gz
/ansible-core-2.15.2.tar.gz
/ansible-core-2.15.3.tar.gz
/ansible-documentation-2.15.3.tar.gz
/docutils-0.20.1.tar.gz
/ansible-core-2.16.1.tar.gz
/ansible-documentation-2.16.1.tar.gz
/ansible-core-2.16.2.tar.gz
/ansible-documentation-2.16.2.tar.gz
/ansible-core-2.16.3.tar.gz
/ansible-documentation-2.16.3.tar.gz

View File

@ -1,118 +0,0 @@
From 384b439b9bd32ea5d9f2e8c9c3ee4aacb46e7794 Mon Sep 17 00:00:00 2001
From: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Date: Tue, 9 Jun 2026 11:59:00 -0400
Subject: [PATCH] [stable-2.16] Fix CVE-2026-11332 - prevent role requirements
from configuring git (#87074)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Fix CVE-2026-11332 - prevent role requirements from configuring git (#87070)
* Pass malformed role requirements as positional arguments to prevent arbitrary git configuration
* Add test coverage, checking for specific errors and that git clone is always followed by --
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
(cherry picked from commit edee59aa15abcc74d920bb3e9c3835ab8db05a2f)
* Fix ansible-galaxy-role test isolating stderr (#87085)
Follow up to #87070 to fix the test
Fix ansible-galaxy-role test isolating stder
Remove new feature to backport as-is
(cherry picked from commit bebae770d339b4961c1d940c95db0ec15d3f9b91)
---------
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
---
lib/ansible/utils/galaxy.py | 2 +-
.../tasks/git-config-injection.yml | 52 +++++++++++++++++++
.../ansible-galaxy-role/tasks/main.yml | 1 +
3 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 test/integration/targets/ansible-galaxy-role/tasks/git-config-injection.yml
diff --git a/lib/ansible/utils/galaxy.py b/lib/ansible/utils/galaxy.py
index bbb26fb111..b463ab0f08 100644
--- a/lib/ansible/utils/galaxy.py
+++ b/lib/ansible/utils/galaxy.py
@@ -74,7 +74,7 @@ def scm_archive_resource(src, scm='git', name=None, version='HEAD', keep_scm_met
elif scm == 'hg':
clone_cmd.append('--insecure')
- clone_cmd.extend([src, name])
+ clone_cmd.extend(['--', src, name])
run_scm_cmd(clone_cmd, tempdir)
diff --git a/test/integration/targets/ansible-galaxy-role/tasks/git-config-injection.yml b/test/integration/targets/ansible-galaxy-role/tasks/git-config-injection.yml
new file mode 100644
index 0000000000..2bb43fc151
--- /dev/null
+++ b/test/integration/targets/ansible-galaxy-role/tasks/git-config-injection.yml
@@ -0,0 +1,52 @@
+- vars:
+ invalid_git_opts: '-ccore.sshCommand=sh -c "id > {{ remote_tmp_dir }}/role_exe"'
+ # use SSH protocol to test core.sshCommand is not configured
+ dummy_repo: git@github.com:ansible/nosuchrepo.git
+ block:
+ - name: Ensure git is installed
+ package:
+ name: git
+ when: ansible_distribution not in ["MacOSX", "Alpine"]
+ register: git_install
+
+ - name: Create invalid requirements file
+ copy:
+ dest: "{{ remote_tmp_dir }}/invalid-requirements.yml"
+ content: |
+ - src: {{ invalid_git_opts }}
+ scm: git
+ name: {{ dummy_repo }}
+ - src: {{ dummy_repo }}
+ scm: git
+ name: {{ invalid_git_opts }}
+
+ - name: Attempt to install invalid role requirements
+ command: ansible-galaxy install -r {{ remote_tmp_dir }}/invalid-requirements.yml --ignore-errors
+ register: result
+ environment:
+ ANSIBLE_NOCOLOR: True
+ ANSIBLE_FORCE_COLOR: False
+
+ - name: Validate git core.sshCommand did not run
+ stat:
+ path: "{{ remote_tmp_dir }}/role_exe"
+ register: stat_result
+ failed_when: stat_result.stat.exists
+
+ - name: Verify the invalid field is treated as a single positional argument (repo or dest)
+ assert:
+ that:
+ - stderr is search(error1)
+ - stderr is search(error2)
+ - (stderr | regex_findall("git clone") | length) == (stderr | regex_findall("git clone --") | length) == 2
+ vars:
+ stderr: "{{ result.stderr | regex_replace('\\n', ' ') }}"
+ error1: "repository '{{ invalid_git_opts }}' does not exist"
+ error2: "Cloning into '{{ invalid_git_opts }}'"
+
+ always:
+ - name: Uninstall git if it was installed
+ package:
+ name: git
+ state: absent
+ when: git_install is changed | default(false)
diff --git a/test/integration/targets/ansible-galaxy-role/tasks/main.yml b/test/integration/targets/ansible-galaxy-role/tasks/main.yml
index 5f88a55765..f41273b488 100644
--- a/test/integration/targets/ansible-galaxy-role/tasks/main.yml
+++ b/test/integration/targets/ansible-galaxy-role/tasks/main.yml
@@ -70,3 +70,4 @@
- import_tasks: dir-traversal.yml
- import_tasks: valid-role-symlinks.yml
+- import_tasks: git-config-injection.yml

View File

@ -1,134 +1,154 @@
# SPDX-License-Identifier: MIT %global __python3 /usr/bin/python3.12
# Copyright (C) Fedora Project Authors %global python3_pkgversion 3.12
# License Text: https://spdx.org/licenses/MIT.html
# We need this because we are no longer noarch, since our bundled deps might
# conceivably need to compile arch-specific things. But we currently have no
# useful debuginfo stuff.
%global debug_package %{nil}
# Disable shebang munging for specific paths. These files are data files. # Disable shebang munging for specific paths. These files are data files.
# ansible-test munges the shebangs itself. # ansible-test munges the shebangs itself.
%global __brp_mangle_shebangs_exclude_from_file %{SOURCE2} %global __brp_mangle_shebangs_exclude_from_file %{SOURCE2}
# NOTE(pabelanger): Don't auto add pwsh as Requires for ansible-test. We do
# not wish to package it.
%global __requires_exclude ^/usr/bin/pwsh$
# RHEL and Fedora add -s to the shebang line. We do *not* use -s -E -S or -I # RHEL and Fedora add -s to the shebang line. We do *not* use -s -E -S or -I
# with ansible because it has many optional features which users need to # with ansible because it has many optional features which users need to
# install libraries on their own to use. For instance, paramiko for the # install libraries on their own to use. For instance, paramiko for the
# network connection plugins or winrm to talk to windows hosts. # network connection plugins or winrm to talk to windows hosts.
# Set this to nil to remove -s # Set this to nil to remove -s
%define py_shbang_opts %{nil}
%define py2_shbang_opts %{nil}
%define py3_shbang_opts %{nil} %define py3_shbang_opts %{nil}
%global doc_version 2.16.15 %define vendor_path %{buildroot}%{python3_sitelib}/ansible/_vendor/
%define vendor_pip %{__python3} -m pip install --no-deps -v --no-build-isolation --no-binary :all: -t %{vendor_path}
# These control which bundled dep versions we pin against
%global docutils_version 0.20.1
%global jinja2_version 3.1.2
%global markupsafe_version 2.1.2
%global packaging_version 21.3
%global pyparsing_version 3.0.7
%global resolvelib_version 1.0.1
Name: ansible-core Name: ansible-core
Summary: A radically simple IT automation system Summary: SSH-based configuration management, deployment, and task execution system
Epoch: 1 Version: 2.16.3
Version: 2.16.16 Release: 3%{?dist}
Release: 2%{?dist}.1 ExcludeArch: i686
Group: Development/Libraries
# The main license is GPLv3+. Many of the files in lib/ansible/module_utils
# are BSD licensed. There are various files scattered throughout the codebase
# containing code under different licenses.
License: GPL-3.0-or-later AND BSD-2-Clause AND PSF-2.0 AND MIT AND Apache-2.0
Source0: https://files.pythonhosted.org/packages/source/a/ansible-core/ansible_core-%{version}.tar.gz Group: Development/Libraries
Source1: https://github.com/ansible/ansible-documentation/archive/v%{doc_version}/ansible-documentation-%{doc_version}.tar.gz License: GPLv3+
Source0: https://files.pythonhosted.org/packages/source/a/ansible-core/ansible-core-%{version}.tar.gz
Source1: https://github.com/ansible/ansible-documentation/archive/v%{version}/ansible-documentation-%{version}.tar.gz
Source2: ansible-test-data-files.txt Source2: ansible-test-data-files.txt
# And bundled deps
Source3: https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-%{jinja2_version}.tar.gz
Source4: https://files.pythonhosted.org/packages/source/M/MarkupSafe/MarkupSafe-%{markupsafe_version}.tar.gz
Source5: https://files.pythonhosted.org/packages/source/p/packaging/packaging-%{packaging_version}.tar.gz
Source6: https://files.pythonhosted.org/packages/source/p/pyparsing/pyparsing-%{pyparsing_version}.tar.gz
Source7: https://files.pythonhosted.org/packages/source/r/resolvelib/resolvelib-%{resolvelib_version}.tar.gz
# Deps to build manpages
Source8: https://sourceforge.net/projects/docutils/files/docutils/%{docutils_version}/docutils-%{docutils_version}.tar.gz
Patch0: remove-bundled-deps-from-requirements.patch
%if 0%{!?centos:1} && 0%{?rhel} %if 0%{!?centos:1} && 0%{?rhel}
Source99: telemetry.py Source99: telemetry.py
Patch99: telemetry.patch Patch99: telemetry.patch
%endif %endif
# https://github.com/ansible/ansible/commit/8ffdf8a635386ceb83900d16ee1b2b0d50170f01 URL: http://ansible.com
Patch100: ansible-core-2.16.16-CVE-2026-11332.patch
Url: https://ansible.com # We conflict old ansible, and any version of ansible-base.
BuildArch: noarch Conflicts: ansible < 2.10.0
Conflicts: ansible-base
# Virtual provides for bundled libraries # ... and provide 'ansible' so that old packages still work without updated
# Search for `_BUNDLED_METADATA` to find them # spec files.
# Provides: ansible
# lib/ansible/module_utils/urls.py # Bundled provides that are sprinkled throughout the codebase.
# SPDX-License-Identifier: BSD-2-Clause AND PSF-2.0 Provides: bundled(python-backports-ssl_match_hostname) = 3.7.0.1
Provides: bundled(python3dist(backports-ssl-match-hostname)) = 3.7.0.1 Provides: bundled(python-distro) = 1.6.0
Provides: bundled(python-selectors2) = 1.1.1
Provides: bundled(python-six) = 1.16.0
# lib/ansible/module_utils/distro/* # Things we explicitly bundle via src rpm, and put in ansible._vendor
# SPDX-License-Identifier: Apache-2.0 Provides: bundled(python-jinja2) = %{jinja2_version}
Provides: bundled(python3dist(distro)) = 1.6.0 Provides: bundled(python-markupsafe) = %{markupsafe_version}
Provides: bundled(python-packaging) = %{packaging_version}
Provides: bundled(python-pyparsing) = %{pyparsing_version}
Provides: bundled(python-resolvelib) = %{resolvelib_version}
# lib/ansible/module_utils/six/*
# SPDX-License-Identifier: MIT
Provides: bundled(python3dist(six)) = 1.16.0
# lib/ansible/module_utils/compat/selectors.py
# SPDX-License-Identifier: GPL-3.0-or-later
Provides: bundled(python3dist(selectors2)) = 1.1.1
# We obsolete old ansible, and any version of ansible-base.
Obsoletes: ansible < 2.10.0
Obsoletes: ansible-base < 2.11.0
BuildRequires: git-core
BuildRequires: make
BuildRequires: pyproject-rpm-macros
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-docutils
BuildRequires: python%{python3_pkgversion}-jinja2
BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-pyyaml BuildRequires: python%{python3_pkgversion}-pyyaml
BuildRequires: python%{python3_pkgversion}-rpm-macros BuildRequires: python%{python3_pkgversion}-rpm-macros
BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-wheel BuildRequires: python%{python3_pkgversion}-wheel
BuildRequires: make git-core gcc
Requires: git-core Requires: git-core
Requires: python%{python3_pkgversion}-PyYAML >= 5.1
Requires: python%{python3_pkgversion}-cryptography Requires: python%{python3_pkgversion}-cryptography
Requires: python%{python3_pkgversion}-jinja2 >= 3.0.0 Requires: sshpass
Requires: python%{python3_pkgversion}-packaging
Requires: python%{python3_pkgversion}-pyyaml >= 5.1
Requires: python%{python3_pkgversion}-resolvelib >= 0.5.3
Requires: python%{python3_pkgversion}-resolvelib < 1.1.0
%global _description %{expand: %description
Ansible is a radically simple model-driven configuration management, Ansible is a radically simple model-driven configuration management,
multi-node deployment, and remote task execution system. Ansible works multi-node deployment, and remote task execution system. Ansible works
over SSH and does not require any software or daemons to be installed over SSH and does not require any software or daemons to be installed
on remote nodes. Extension modules can be written in any language and on remote nodes. Extension modules can be written in any language and
are transferred to managed machines automatically.} are transferred to managed machines automatically.
%description %_description
%package -n ansible-test %package -n ansible-test
Summary: Tool for testing ansible plugin and module code Summary: Tool for testing ansible plugin and module code
Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{name} = %{version}-%{release}
%description -n ansible-test %_description %description -n ansible-test
Ansible is a radically simple model-driven configuration management,
multi-node deployment, and remote task execution system. Ansible works
over SSH and does not require any software or daemons to be installed
on remote nodes. Extension modules can be written in any language and
are transferred to managed machines automatically.
This package installs the ansible-test command for testing modules and plugins This package installs the ansible-test command for testing modules and plugins
developed for ansible. developed for ansible.
%prep %prep
%autosetup -N -n ansible_core-%{version} -a1 %setup -q -b1 -b3 -b4 -b5 -b6 -b7 -b8 -n ansible-core-%{version}
%patch0 -p1
# Fix all Python shebangs recursively in ansible-test # Fix all Python shebangs recursively in ansible-test
%{py3_shebang_fix} test/lib/ansible_test %{py3_shebang_fix} test/lib/ansible_test
%if 0%{!?centos:1} && 0%{?rhel} %if 0%{!?centos:1} && 0%{?rhel}
%patch -P99 -p1 %patch -P99 -p1
%{py3_shebang_fix} %{SOURCE99}
%endif %endif
%patch -P100 -p1
%build %build
%{pyproject_wheel} %{py3_build}
# Build manpages
mkdir -p docs/man/man1
%{python3} packaging/cli-doc/build.py man --output-dir docs/man/man1
%install %install
%{pyproject_install} %{py3_install}
# Handle bundled deps:
%{vendor_pip} \
../Jinja2-%{jinja2_version}/ \
../MarkupSafe-%{markupsafe_version}/ \
../packaging-%{packaging_version}/ \
../pyparsing-%{pyparsing_version}/ \
../resolvelib-%{resolvelib_version}
# Create system directories that Ansible defines as default locations in # Create system directories that Ansible defines as default locations in
# ansible/config/base.yml # ansible/config/base.yml
DATADIR_LOCATIONS='%{_datadir}/ansible/collections DATADIR_LOCATIONS='%{_datadir}/ansible/collections
%{_datadir}/ansible/collections/ansible_collections
%{_datadir}/ansible/plugins/doc_fragments %{_datadir}/ansible/plugins/doc_fragments
%{_datadir}/ansible/plugins/action %{_datadir}/ansible/plugins/action
%{_datadir}/ansible/plugins/become %{_datadir}/ansible/plugins/become
@ -152,19 +172,19 @@ DATADIR_LOCATIONS='%{_datadir}/ansible/collections
UPSTREAM_DATADIR_LOCATIONS=$(grep -ri default lib/ansible/config/base.yml | tr ':' '\n' | grep '/usr/share/ansible') UPSTREAM_DATADIR_LOCATIONS=$(grep -ri default lib/ansible/config/base.yml | tr ':' '\n' | grep '/usr/share/ansible')
if [ "$SYSTEM_LOCATIONS" != "$UPSTREAM_SYSTEM_LOCATIONS" ] ; then if [ "$SYSTEM_LOCATIONS" != "$UPSTREAM_SYSTEM_LOCATIONS" ] ; then
echo "The upstream Ansible datadir locations have changed. Spec file needs to be updated" echo "The upstream Ansible datadir locations have changed. Spec file needs to be updated"
exit 1 exit 1
fi fi
mkdir -p %{buildroot}%{_datadir}/ansible/plugins/ mkdir -p %{buildroot}%{_datadir}/ansible/plugins/
for location in $DATADIR_LOCATIONS ; do for location in $DATADIR_LOCATIONS ; do
mkdir %{buildroot}"$location" mkdir %{buildroot}"$location"
done done
mkdir -p %{buildroot}%{_sysconfdir}/ansible/ mkdir -p %{buildroot}%{_sysconfdir}/ansible/
mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/ mkdir -p %{buildroot}%{_sysconfdir}/ansible/roles/
cp ansible-documentation-%{doc_version}/examples/hosts %{buildroot}%{_sysconfdir}/ansible/ cp ../ansible-documentation-%{version}/examples/hosts %{buildroot}%{_sysconfdir}/ansible/
cp ansible-documentation-%{doc_version}/examples/ansible.cfg %{buildroot}%{_sysconfdir}/ansible/ cp ../ansible-documentation-%{version}/examples/ansible.cfg %{buildroot}%{_sysconfdir}/ansible/
%if 0%{!?centos:1} && 0%{?rhel} %if 0%{!?centos:1} && 0%{?rhel}
mkdir -p %{buildroot}%{_datadir}/ansible/telemetry mkdir -p %{buildroot}%{_datadir}/ansible/telemetry
@ -172,313 +192,185 @@ cp %{SOURCE99} %{buildroot}%{_datadir}/ansible/telemetry/
%py_byte_compile %{__python3} %{buildroot}%{_datadir}/ansible/telemetry/telemetry.py %py_byte_compile %{__python3} %{buildroot}%{_datadir}/ansible/telemetry/telemetry.py
%endif %endif
mkdir -p %{buildroot}/%{_mandir}/man1 mkdir -p %{buildroot}/%{_mandir}/man1/
mkdir -p docs/man/man1
mkdir -p /tmp/_docutils
%{__python3} -m pip install ../docutils-%{docutils_version} -t /tmp/_docutils --no-build-isolation
PYTHONPATH=%{vendor_path}:/tmp/_docutils %{__python3} packaging/cli-doc/build.py man --output-dir docs/man/man1
rm -rf /tmp/_docutils
cp -v docs/man/man1/*.1 %{buildroot}/%{_mandir}/man1/ cp -v docs/man/man1/*.1 %{buildroot}/%{_mandir}/man1/
# We install licenses in this manner so we don't miss new licenses: cp -pr ../ansible-documentation-%{version}/docs/docsite/rst .
# 1. Copy all files in licenses to %%{_pkglicensedir}. cp -p lib/ansible_core.egg-info/PKG-INFO .
# 2. List the files explicitly in %%files.
# 3. The build will fail with unpackaged file errors if license strip --strip-unneeded %{vendor_path}/markupsafe/_speedups%{python3_ext_suffix}
# files aren't accounted for.
%global _pkglicensedir %{_licensedir}/ansible-core
install -Dpm 0644 licenses/* -t %{buildroot}%{_pkglicensedir}
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%license COPYING
%license %{_pkglicensedir}/{Apache-License,MIT-license,PSF-license,simplified_bsd}.txt
%doc README.md changelogs/CHANGELOG-v2.1?.rst
%dir %{_sysconfdir}/ansible/
%config(noreplace) %{_sysconfdir}/ansible/*
%{_bindir}/ansible* %{_bindir}/ansible*
%{_datadir}/ansible/
%{_mandir}/man1/ansible*
%{python3_sitelib}/ansible*
%exclude %{_bindir}/ansible-test %exclude %{_bindir}/ansible-test
%config(noreplace) %{_sysconfdir}/ansible/
%doc README.md PKG-INFO COPYING
%doc changelogs/CHANGELOG-v2.*.rst
%doc %{_mandir}/man1/ansible*
%{_datadir}/ansible/
%{python3_sitelib}/ansible*
%exclude %{python3_sitelib}/ansible_test %exclude %{python3_sitelib}/ansible_test
%exclude %{python3_sitelib}/ansible/_vendor/markupsafe/_speedups.c
%files -n ansible-test %files -n ansible-test
%{_bindir}/ansible-test %{_bindir}/ansible-test
%{python3_sitelib}/ansible_test %{python3_sitelib}/ansible_test
%changelog %changelog
* Sat Jul 11 2026 RHEL Packaging Agent <redhat-ymir-agent@redhat.com> - 1:2.16.16-2.1 * Wed Jul 29 2026 Dimitri Savineau <dsavinea@redhat.com> - 2.16.3-3
- Fix CVE-2026-11332 (ansible-galaxy role installs could allow - Add telemetry for RHEL (RHEL-219532)
arbitrary git configuration injection via malformed role
requirements) (RHEL-194128)
* Tue Feb 10 2026 Dimitri Savineau <dsavinea@redhat.com> - 1:2.16.16-2 * Mon Feb 05 2024 Dimitri Savineau <dsavinea@redhat.com> - 2.16.3-2
- Fix selinux AVC denial when telemetry is enabled (RHEL-148292) - rebuild with python 3.12 (RHEL-24141)
* Tue Feb 03 2026 Dimitri Savineau <dsavinea@redhat.com> - 1:2.16.16-1 * Fri Feb 02 2024 Dimitri Savineau <dsavinea@redhat.com> - 2.16.3-1
- ansible-core 2.16.16 release (RHEL-145990) - ansible-core 2.16.3 release (RHEL-23782)
- Fix CVE-2024-0690 (possible information leak in tasks that ignore
ANSIBLE_NO_LOG configuration) (RHEL-22123)
* Tue Dec 16 2025 Dimitri Savineau <dsavinea@redhat.com> - 1:2.16.15-1 * Tue Dec 12 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.16.2-1
- ansible-core 2.16.15 release (RHEL-136245) - ansible-core 2.16.2 release (RHEL-19297)
* Mon Oct 27 2025 Dimitri Savineau <dsavinea@redhat.com> - 1:2.16.14-2 * Thu Dec 07 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.16.1-1
- Add telemetry for RHEL (RHEL-123004) - ansible-core 2.16.1 release (RHEL-18965)
* Mon Dec 02 2024 Dimitri Savineau <dsavinea@redhat.com> - 1:2.16.14-1 * Wed Aug 16 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.15.3-1
- ansible-core 2.16.14 release (RHEL-69763) - ansible-core 2.15.3 release (rhbz#2232431)
- Fix CVE-2024-11079 (Unsafe Tagging Bypass via hostvars Object in - Use docs and examples from ansible-documentation project.
Ansible-Core) (RHEL-66996) - Build the manpages.
* Tue Nov 26 2024 Dimitri Savineau <dsavinea@redhat.com> - 1:2.16.13-1 * Mon Aug 14 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.15.2-1
- ansible-core 2.16.13 release (RHEL-69036) - ansible-core 2.15.2 release (rhbz#2231891)
- Add back ansible-test subpackage and drop doc subpackage
- Fix CVE-2024-8775 (Exposure of Sensitive Information in Ansible
Vault Files Due to Improper Logging) (RHEL-59076)
- Fix CVE-2024-9902 (Ansible-core user may read/write unauthorized
content) (RHEL-69034)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:2.16.3-4 * Tue Jul 04 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.15.1-1
- Bump release for October 2024 mass rebuild: - ansible-core 2.15.1 release (rhbz#2219620)
Resolves: RHEL-64018
* Thu Jul 25 2024 Brian Stinson <bstinson@redhat.com> - 1:2.16.3-3 * Mon May 15 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.15.0-1
- Bump the Epoch to preserve upgrade path with previous versions of RHEL - ansible-core 2.15.0 release (rhbz#2204511)
- update bundled markupsafe to 2.1.2.
- update bundled packaging to 21.3.
- update bundled pyparsing to 3.0.7.
- update bundled resolvelib to 1.0.1.
- remove six runtime dependency.
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.16.3-2 * Tue Feb 14 2023 Dimitri Savineau <dsavinea@redhat.com> - 2.14.2-3
- Bump release for June 2024 mass rebuild - rebuild with python 3.11 (rhbz#2169524)
- remove bundled dependencies from requirements file (rhbz#2143974)
- use PyPi sources (rhbz#2160277)
- remove straightplugin
* Thu Feb 01 2024 Maxwell G <maxwell@gtmx.me> - 2.16.3-1 * Thu Feb 02 2023 Christian Adams <chadams@redhat.com> - 2.14.2-2
- Update to 2.16.3. Fixes rhbz#2261507. - fix debuginfo symbols from markupsafe dependency (rhbz#2166414)
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.16.2-4 * Wed Feb 01 2023 Christian Adams <chadams@redhat.com> - 2.14.2-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - ansible-core 2.14.2 release (rhbz#2166414)
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.16.2-3 * Wed Dec 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.14.1-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - ansible-core 2.14.1 release (rhbz#2151594)
* Thu Jan 18 2024 Maxwell G <maxwell@gtmx.me> - 2.16.2-2 * Tue Nov 08 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.14.0-1
- Mitigate CVE-2024-0690. - ansible-core 2.14.0 release (rhbz#2141386)
* Mon Dec 11 2023 Maxwell G <maxwell@gtmx.me> - 2.16.2-1 * Mon Nov 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.6-1
- Update to 2.16.2. Fixes rhbz#2254093. - ansible-core 2.13.6 release (rhbz#2141109)
- fix service_facts module parsing (rhbz#2141111)
* Wed Dec 06 2023 Maxwell G <maxwell@gtmx.me> - 2.16.1-1 * Wed Oct 12 2022 James Marshall <jamarsha@redhat.com> - 2.13.5-1
- Update to 2.16.1. Fixes rhbz#2252860. - ansible-core 2.13.5 release (rhbz#2134116)
* Fri Nov 10 2023 Maxwell G <maxwell@gtmx.me> - 2.16.0-1 * Fri Oct 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.4-1
- Update to 2.16.0. Fixes rhbz#2248187. - ansible-core 2.13.4 release (rhbz#2133024)
* Thu Oct 19 2023 Maxwell G <maxwell@gtmx.me> - 2.16.0~rc1-1 * Mon Aug 15 2022 James Marshall <jamarsha@redhat.com> - 2.13.3-1
- Update to 2.16.0~rc1. - ansible-core 2.13.3 release (rhbz#2118475)
* Tue Oct 03 2023 Maxwell G <maxwell@gtmx.me> - 2.16.0~b2-1 * Wed Jul 20 2022 James Marshall <jamarsha@redhat.com> - 2.13.2-1
- Update to 2.16.0~b2. - ansible-core 2.13.2 release (rhbz#2109192)
* Mon Oct 02 2023 Miro Hrončok <mhroncok@redhat.com> - 2.16.0~b1-2 * Mon Jul 04 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.13.1-1
- Do not use tomcli in Fedora ELN, avoid pulling unwanted dependencies - ansible-core 2.13.1 release (rhbz#2103699)
- add bundled version of jinja2, markupsafe and resolvelib
- rebuild with python 3.9
* Wed Sep 27 2023 Maxwell G <maxwell@gtmx.me> - 2.16.0~b1-1 * Mon Jun 20 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.7-1
- Update to 2.16.0~b1. - ansible-core 2.12.7 release (rhbz#2099323)
* Tue Sep 26 2023 Kevin Fenzi <kevin@scrye.com> - 2.15.4-2 * Thu Jun 09 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.6-3
- Add patch to fix readfp with python-3.12. Fixes rhbz#2239728 - Build manpages (rhbz#2032809)
- Remove legacy files
* Mon Sep 11 2023 Maxwell G <maxwell@gtmx.me> - 2.15.4-1 * Tue Jun 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.6-2
- Update to 2.15.4. Fixes rhbz#2238445. - switch from git to git-core dependency (rhbz#2094549)
* Thu Aug 17 2023 Maxwell G <maxwell@gtmx.me> - 2.15.3-1 * Tue May 24 2022 James Marshall <jamarsha@redhat.com> - 2.12.6-1
- Update to 2.15.3. Fixes rhbz#2231963. - ansible-core 2.12.6 release
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.15.2-2 * Mon May 09 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.5-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - ansible-core 2.12.5 release
* Tue Jul 18 2023 Maxwell G <maxwell@gtmx.me> - 2.15.2-1 * Mon Apr 11 2022 James Marshall <jamarsha@redhat.com> - 2.12.4-1
- Update to 2.15.2. Fixes rhbz#2223469. - ansible-core 2.12.4 release
- Use the docs sources from https://github.com/ansible/ansible-documentation.
* Mon Jul 03 2023 Maxwell G <maxwell@gtmx.me> - 2.15.1-2 * Mon Mar 14 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.3-1
- Rebuilt for Python 3.12 - ansible-core 2.12.3 release
- re-enable changelog and manpages
* Thu Jun 22 2023 Maxwell G <maxwell@gtmx.me> - 2.15.1-1 * Mon Mar 07 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.2-3
- Update to 2.15.1. Fixes rhbz#2204492. - replace Obsolete to Conflicts
- Add Recommends on python3-libdnf5 for Fedora 39
* Sat Jun 17 2023 Maxwell G <maxwell@gtmx.me> - 2.15.0-5 * Wed Feb 02 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.2-2
- Add patch to avoid importlib.abc.TraversableResources DeprecationWarning - fix ansible tarball setup
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 2.15.0-4 * Wed Feb 02 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.2-1
- Rebuilt for Python 3.12 - ansible-core 2.12.2 release
- add gating and test files
* Tue Jun 13 2023 Maxwell G <maxwell@gtmx.me> - 2.15.0-3 * Wed Jan 19 2022 Dimitri Savineau <dsavinea@redhat.com> - 2.12.1-2
- Add support for Python 3.12. Fixes rhbz#2196539. - Remove Provides on ansible
- Remove conditional Requires on ansible-packaging.
* Tue May 23 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 2.15.0-2 * Thu Dec 16 2021 Yanis Guenane <yguenane@redhat.com> - 2.12.1-1
- Disable tests in RHEL builds - ansible-core 2.12.1-1
* Tue May 16 2023 Maxwell G <maxwell@gtmx.me> - 2.15.0-1 * Wed Jul 21 2021 Paul Belanger <pabelanger@redhat.com> - 2.11.3-2
- Update to 2.15.0. - Add git dependency for ansible-galaxy CLI command.
- Don't remove dotfiles and empty files. ansible-core actually needs these.
* Wed May 03 2023 Maxwell G <maxwell@gtmx.me> - 2.15.0~rc2-1 * Tue Jul 20 2021 Yanis Guenane <yguenane@redhat.com> - 2.11.3-1
- Update to 2.15.0~rc2. - ansible-core 2.11.3-1
* Thu Apr 27 2023 Maxwell G <maxwell@gtmx.me> - 2.15.0~rc1-1 * Fri Jul 02 2021 Satoe Imaishi <simaishi@redhat.com> - 2.11.2-2
- Update to 2.15.0~rc1. - Add man pages
* Mon Apr 24 2023 Maxwell G <maxwell@gtmx.me> - 2.15.0~b3-1 * Tue Jun 29 2021 Paul Belanger <pabelanger@redhat.com> - 2.11.2-1
- Update to 2.15.0~b3. - ansible-core 2.11.2 released.
- Account for the removed Makefile - Drop bundled version of resolvelib in favor of
python38-resolvelib.
* Mon Apr 24 2023 Maxwell G <maxwell@gtmx.me> - 2.14.4-2 * Wed Mar 31 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b4-1
- Add gating - ansible-core 2.11.0 beta 4
* Wed Mar 29 2023 Maxwell G <maxwell@gtmx.me> - 2.14.4-1 * Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-3
- Update to 2.14.4. Fixes rhbz#2173765. - Try adding a Provides for old ansible.
* Wed Mar 01 2023 Maxwell G <maxwell@gtmx.me> - 2.14.3-1 * Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-2
- Update to 2.14.3. - Try Obsoletes instead of Conflicts.
* Tue Jan 31 2023 David Moreau-Simard <moi@dmsimard.com> - 2.14.2-1 * Thu Mar 18 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b2-1
- Update to 2.14.2. Fixes rhbz#2165629. - ansible-core 2.11.0 beta 2
- Conflict with old ansible and ansible-base.
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.1-2 * Thu Mar 11 2021 Rick Elrod <relrod@redhat.com> - 2.11.0b1-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - ansible-core 2.11.0 beta 1
* Fri Dec 09 2022 Maxwell G <gotmax@e.email> - 2.14.1-1 * Mon Nov 30 2020 Rick Elrod <relrod@redhat.com> - 2.11.0-1
- Update to 2.14.1. - ansible-core, beta
* Mon Nov 07 2022 Maxwell G <gotmax@e.email> - 2.14.0-1
- Update to 2.14.0.
* Wed Nov 02 2022 Maxwell G <gotmax@e.email> - 2.14.0~rc2-1
- Update to 2.14.0~rc2.
* Fri Oct 28 2022 Maxwell G <gotmax@e.email> - 2.14.0~rc1-1
- Update to 2.14.0~rc1.
* Wed Oct 12 2022 Maxwell G <gotmax@e.email> - 2.13.5-1
- Update to 2.13.5.
* Tue Sep 13 2022 Maxwell G <gotmax@e.email> - 2.13.4-1
- Update to 2.13.4.
* Wed Aug 31 2022 Maxwell G <gotmax@e.email> - 2.13.3-2
- Remove weak deps on paramiko and winrm
* Mon Aug 15 2022 Maxwell G <gotmax@e.email> - 2.13.3-1
- Update to 2.13.3.
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jul 19 2022 Maxwell G <gotmax@e.email> - 2.13.2-1
- Update to 2.13.2. Fixes rhbz#2108195.
* Thu Jul 07 2022 Miro Hrončok <mhroncok@redhat.com> - 2.13.1-2
- Don't put -- into Python shebangs
* Wed Jun 22 2022 Maxwell G <gotmax@e.email> - 2.13.1-1
- Update to 2.13.1 (rhbz#2096312).
* Thu Jun 16 2022 Maxwell G <gotmax@e.email> - 2.13.0-1
- Update to 2.13.0.
- Re-enable tests that work with newer pytest
- Patch out python3-mock
- Manually build manpages to workaround upstream issue.
- Remove unneeded BRs and switch to pyproject-rpm-macros.
- Make ansible-base* Obsoletes/Provides compliant with Packaging Guidelines
- Remove python3-jmespath dependency. json_query is part of community.general.
- Correct licensing
- Generate shell completions
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 2.12.6-2
- Rebuilt for Python 3.11
* Tue May 24 2022 Maxwell G <gotmax@e.email> - 2.12.6-1
- Update to 2.12.6.
* Wed Apr 27 2022 Maxwell G <gotmax@e.email> - 2.12.5-1
- Update to 2.12.5. Fixes rhbz#2078558.
* Sat Apr 02 2022 Maxwell G <gotmax@e.email> - 2.12.4-1
- Update to 2.12.4. Fixes rhbz#2069384.
* Thu Mar 10 2022 Maxwell G <gotmax@e.email> - 2.12.3-2
- Add patch to fix failing tests and FTBFS with Pytest 7.
- Resolves: rhbz#2059937
* Tue Mar 01 2022 Kevin Fenzi <kevin@scrye.com> - 2.12.3-1
- Update to 2.12.3. Fixes rhbz#2059284
* Mon Jan 31 2022 Kevin Fenzi <kevin@scrye.com> - 2.12.2-1
- Update to 2.12.2. Fixes rhbz#2048795
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jan 13 2022 Neal Gompa <ngompa@fedoraproject.org> - 2.12.1-3
- Split out packaging macros and generators to ansible-packaging
* Wed Dec 08 2021 Kevin Fenzi <kevin@scrye.com> - 2.12.1-2
- Re-enable tests
* Tue Dec 07 2021 Kevin Fenzi <kevin@scrye.com> - 2.12.1-1
- Update to 2.12.1. Fixes rhbz#2029598
* Mon Nov 08 2021 Kevin Fenzi <kevin@scrye.com> - 2.12.0-1
- Update to 2.12.0. Fixes rhbz#2022533
* Thu Oct 14 2021 Maxwell G <gotmax@e.email> - 2.11.6-1
- Update to 2.11.6.
* Tue Sep 14 2021 Kevin Fenzi <kevin@scrye.com> - 2.11.5-1
- Update to 2.11.5. Fixes rhbz#2002393
* Thu Aug 19 2021 Kevin Fenzi <kevin@scrye.com> - 2.11.4-1
- Update to 2.11.4. Fixes rhbz#1994107
* Sun Jul 25 2021 Kevin Fenzi <kevin@scrye.com> - 2.11.3-1
- Update to 2.11.3. Fixes rhbz#1983836
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jun 22 2021 Kevin Fenzi <kevin@scrye.com> - 2.11.2-1
- Update to 2.11.2. Fixed rhbz#1974593
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.11.1-2
- Rebuilt for Python 3.10
* Mon May 24 2021 Kevin Fenzi <kevin@scrye.com> - 2.11.1-1
- Update to 2.11.1. Fixes rhbz#1964172
* Tue Apr 27 2021 Kevin Fenzi <kevin@scrye.com> - 2.11.0-1
- Update to 2.11.0 final.
* Sat Apr 24 2021 Kevin Fenzi <kevin@scrye.com> - 2.11.0-0.3.rc2
- Update to 2.11.0rc2.
* Sat Apr 03 2021 Kevin Fenzi <kevin@scrye.com> - 2.11.0-0.1.b4
- Rename to ansible-base, update to b4 beta version.
* Sat Feb 20 2021 Kevin Fenzi <kevin@scrye.com> - 2.10.6-1
- Update to 2.10.6.
- Fixes CVE-2021-20228
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Jan 24 2021 Kevin Fenzi <kevin@scrye.com> - 2.10.5-1
- Update to 2.10.5.
* Sat Dec 19 2020 Kevin Fenzi <kevin@scrye.com> - 2.10.4-1
- Update to 2.10.4
* Sat Nov 07 2020 Kevin Fenzi <kevin@scrye.com> - 2.10.3-2
- Various review fixes
* Tue Nov 03 2020 Kevin Fenzi <kevin@scrye.com> - 2.10.3-1
- Update to 2.10.3
* Sat Oct 10 2020 Kevin Fenzi <kevin@scrye.com> - 2.10.2-1
- Update to 2.10.2
* Sat Sep 26 2020 Kevin Fenzi <kevin@scrye.com> - 2.10.1-1
- Initial version for review.
* Wed Jun 10 2020 Rick Elrod <relrod@redhat.com> - 2.10.0-1
- ansible-base, beta

View File

@ -1,2 +1 @@
/usr/lib/python[0-9]+\.[0-9]+/site-packages/ansible_test/_data/.* /usr/lib/python[0-9]+\.[0-9]+/site-packages/ansible_test/_data/.*
/usr/lib/python[0-9]+\.[0-9]+/site-packages/ansible_test/_util/.*

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -0,0 +1,18 @@
diff --git a/requirements.txt b/requirements.txt
index 5eaf9f2cbc..792daa209a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,13 +3,5 @@
# packages. Thus, this should be the loosest set possible (only required
# packages, not optional ones, and with the widest range of versions that could
# be suitable)
-jinja2 >= 3.0.0
PyYAML >= 5.1 # PyYAML 5.1 is required for Python 3.8+ support
cryptography
-packaging
-# NOTE: resolvelib 0.x version bumps should be considered major/breaking
-# NOTE: and we should update the upper cap with care, at least until 1.0
-# NOTE: Ref: https://github.com/sarugaku/resolvelib/issues/69
-# NOTE: When updating the upper bound, also update the latest version used
-# NOTE: in the ansible-galaxy-collection test suite.
-resolvelib >= 0.5.3, < 1.1.0 # dependency resolver used by ansible-galaxy

10
sources
View File

@ -1,2 +1,8 @@
SHA512 (ansible-documentation-2.16.15.tar.gz) = eb9562937b29c9713da11b8e0544f00c3ab3d48a38024a4ba2d4a25811774360a0e6cd27211c0cc293c7f87c515e81b727cca71f95e454985511cd8ad9e49c6d SHA512 (ansible-core-2.16.3.tar.gz) = 62b7d23d3d639f118a4b87dccc02ec5f373fd56ae6c5fb56c8adf0818d0f5bbf3b6de47a29da9ef2d8c3f4b7e3a99978677bc9bfda1eb4cb9640b79abb763f77
SHA512 (ansible_core-2.16.16.tar.gz) = d879db968ec2faa29d2dfebcb1a0f35c1536e9abfb5bfc008ba1b003907abcc2fac755026ff81010536c6ec954ca992bbdca0bce61609d4c55a3bc0c2a791bc2 SHA512 (ansible-documentation-2.16.3.tar.gz) = c073b0b961e38bee560be78e2c12534facec891f6e375df14fdcaf99241f711cf6955ee58b936f7f23ab62a732d2dbde5fd279976989be06e747c2bf3db41661
SHA512 (docutils-0.20.1.tar.gz) = a0ddca315d03677003036d6a8052ac96fbd3fcc4508564938ea684d79bedb4d322d83449c7b26e55b19b0aadd6e46ca9ac409bb16279a20f06c70e9c15ef5eb0
SHA512 (Jinja2-3.1.2.tar.gz) = 5dfe122c1beef5305b34d25f22f96607bd3a6cba098b03091850ea36fefe62b645a7218d7584b35bea252393ac922c9bb3654a9e90f23bcfb273e811fcf2f2c1
SHA512 (MarkupSafe-2.1.2.tar.gz) = 84dbeddaf2df713b3cce94eb64876fea8f80c608e25130c18e4691be2b1dea56df8b772d26c0caca88231ef795125eb9678210c33bf20518c18e3047912ddb4b
SHA512 (packaging-21.3.tar.gz) = 2e3aa276a4229ac7dc0654d586799473ced9761a83aa4159660d37ae1a2a8f30e987248dd0e260e2834106b589f259a57ce9936eef0dcc3c430a99ac6b663e05
SHA512 (pyparsing-3.0.7.tar.gz) = 1e692f4cdaa6b6e8ca2729d0a3e2ba16d978f1957c538b6de3a4220ec7d996bdbe87c41c43abab851fffa3b0498a05841373e435602917b8c095042e273badb5
SHA512 (resolvelib-1.0.1.tar.gz) = 52c872fb2a22c47de022a661dc4d8de8c6af450f1cff6f2b99cd91bf7eccae5b6ee223793f50b9679c1c6caedbd8bb63330915ee6f10533b1a0ed239d068b36f

View File

@ -1,8 +1,8 @@
diff --git a/lib/ansible/plugins/loader.py b/lib/ansible/plugins/loader.py diff --git a/lib/ansible/plugins/loader.py b/lib/ansible/plugins/loader.py
index 9ff19bbb23..d145a41629 100644 index f3252d7142..1e4d3bca38 100644
--- a/lib/ansible/plugins/loader.py --- a/lib/ansible/plugins/loader.py
+++ b/lib/ansible/plugins/loader.py +++ b/lib/ansible/plugins/loader.py
@@ -1551,7 +1551,7 @@ cache_loader = PluginLoader( @@ -1532,7 +1532,7 @@ cache_loader = PluginLoader(
callback_loader = PluginLoader( callback_loader = PluginLoader(
'CallbackModule', 'CallbackModule',
'ansible.plugins.callback', 'ansible.plugins.callback',

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3 #! /usr/libexec/platform-python
# Copyright: Contributors to the Ansible project # Copyright: Contributors to the Ansible project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@ -32,7 +32,7 @@ import pathlib
import subprocess import subprocess
import sys import sys
import uuid import uuid
from collections import defaultdict from collections import Counter, defaultdict
if __name__ == '__main__': if __name__ == '__main__':
# When run as a script via insights-client, these are not needed # When run as a script via insights-client, these are not needed
@ -84,6 +84,15 @@ _CORE_SYN_COLLECTIONS = frozenset((
'ansible.legacy', 'ansible.legacy',
)) ))
_CORE_FACT_MODULES = frozenset((
'setup',
'ansible.builtin.setup',
'ansible.legacy.setup',
'gather_facts',
'ansible.builtin.gather_facts',
'ansible.legacy.gather_facts',
))
_ANSIBLE_TELEMETRY_MESSAGE_ID = uuid.UUID('73df9e03d8c6473eb811065c4ebc370a') _ANSIBLE_TELEMETRY_MESSAGE_ID = uuid.UUID('73df9e03d8c6473eb811065c4ebc370a')
@ -125,6 +134,7 @@ class CallbackModule(CallbackBase):
), ),
} }
self._hosts = set() self._hosts = set()
self._os = {}
self._conn_cache = {} self._conn_cache = {}
def _is_insights_client_active(self): def _is_insights_client_active(self):
@ -157,6 +167,25 @@ class CallbackModule(CallbackBase):
super().set_options(task_keys=task_keys, var_options=var_options, direct=direct) super().set_options(task_keys=task_keys, var_options=var_options, direct=direct)
self.disabled = self._set_disabled() self.disabled = self._set_disabled()
def _track_os(self, host_name, result):
if host_name in self._os:
return
try:
af = result.get('ansible_facts')
except AttributeError:
return
if not af:
return
try:
os_name = '%(ansible_distribution)s-%(ansible_distribution_version)s' % af
except KeyError:
return
else:
self._os[host_name] = os_name
def _handle_result(self, *args, **kwargs): def _handle_result(self, *args, **kwargs):
if not args: if not args:
return return
@ -166,16 +195,20 @@ class CallbackModule(CallbackBase):
return return
host = result._host host = result._host
host_name = host.get_name()
task = result._task task = result._task
role = task._role role = task._role
self._hosts.add(host.get_name()) self._hosts.add(host_name)
action = task.resolved_action action = task.resolved_action
action_collection = None action_collection = None
if action and '.' in action: if action and '.' in action:
action_collection = '.'.join(action.split('.', 2)[:2]) action_collection = '.'.join(action.split('.', 2)[:2])
if action in _CORE_FACT_MODULES:
self._track_os(host_name, result._result)
role_collection = None role_collection = None
role_name = None if not role else role.get_name() role_name = None if not role else role.get_name()
if role and '.' in role_name: if role and '.' in role_name:
@ -214,6 +247,7 @@ class CallbackModule(CallbackBase):
} }
self._telemetry['hosts'] = { self._telemetry['hosts'] = {
'count': len(self._hosts), 'count': len(self._hosts),
'os': Counter(self._os.values()),
} }
for collection in self._telemetry['collections']: for collection in self._telemetry['collections']:

16
tests/tests.yml Normal file
View File

@ -0,0 +1,16 @@
---
- hosts: localhost
gather_facts: yes
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: .
run: /usr/bin/ansible localhost -m dnf -a "list=installed"
# tasks:
# This is only used as part of rpm-ostree which has extensive tests
# and there is no point to testing it separately.
# - name: true
# shell: true