Summary: SSH-based configuration management, deployment, and task execution system
Name: ansible-core
-Version: 2.16.14
+Version: 2.18.8
Release: 1
License: GPL v3+
Group: Development/Libraries
Source0: https://github.com/ansible/ansible/archive/refs/tags/v%{version}.tar.gz
-# Source0-md5: 7cfb41ca07fab48235fc366dc9f8bc98
+# Source0-md5: 7a6da96f1a36cbb6639059d785e6ab71
Source2: poldek.py
Patch0: poldek.patch
URL: https://ansible.com
-BuildRequires: python3-PyYAML
-BuildRequires: python3-jinja2
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-jinja2 >= 3.0.0
BuildRequires: python3-modules
+BuildRequires: python3-packaging
+BuildRequires: python3-PyYAML >= 5.1
+BuildRequires: python3-wheel
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: rpmbuild(macros) >= 2.044
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q -n ansible-%{version}
-%patch0 -p1
+%patch -P0 -p1
%{__sed} -i '1s,/usr/bin/env python,%{__python3},' \
bin/ansible-test \
test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py
%build
-%py3_build
+%py3_build_pyproject
mkdir -p docs/man/man1
LC_ALL=en_US.UTF-8 %{__python3} packaging/cli-doc/build.py man --output-dir docs/man/man1
%install
rm -rf $RPM_BUILD_ROOT
-%py3_install
+%py3_install_pyproject
install -p %{SOURCE2} $RPM_BUILD_ROOT%{py3_sitescriptdir}/ansible/modules/
%defattr(644,root,root,755)
%doc README.md
%attr(755,root,root) %{_bindir}/ansible
-%attr(755,root,root) %{_bindir}/ansible-connection
%attr(755,root,root) %{_bindir}/ansible-test
%attr(755,root,root) %{_bindir}/ansible-config
%attr(755,root,root) %{_bindir}/ansible-console
%{_mandir}/man1/ansible-playbook.1*
%{_mandir}/man1/ansible-pull.1*
%{py3_sitescriptdir}/ansible
-%{py3_sitescriptdir}/ansible_core-%{version}-*.egg-info
+%{py3_sitescriptdir}/ansible_core-%{version}.dist-info
%{py3_sitescriptdir}/ansible_test
--diff -ur ansible-2.16.2.orig/lib/ansible/module_utils/facts/system/pkg_mgr.py ansible-2.16.2/lib/ansible/module_utils/facts/system/pkg_mgr.py
---- ansible-2.16.2.orig/lib/ansible/module_utils/facts/system/pkg_mgr.py 2023-12-11 21:48:58.000000000 +0100
-+++ ansible-2.16.2/lib/ansible/module_utils/facts/system/pkg_mgr.py 2024-01-07 20:19:31.342969058 +0100
-@@ -15,7 +15,8 @@
+--- ansible-2.18.8/lib/ansible/module_utils/facts/system/pkg_mgr.py 2025-08-15 19:47:47.644415071 +0200
++++ ansible-2.18.8/lib/ansible/module_utils/facts/system/pkg_mgr.py 2025-08-11 20:59:54.000000000 +0200
+@@ -14,7 +14,8 @@
# A list of dicts. If there is a platform with more than one
# package manager, put the preferred one last. If there is an
# ansible module, use that as the value for the 'name' key.
-PKG_MGRS = [{'path': '/usr/bin/rpm-ostree', 'name': 'atomic_container'},
+PKG_MGRS = [{'path': '/usr/bin/poldek', 'name': 'poldek'},
+ {'path': '/usr/bin/rpm-ostree', 'name': 'atomic_container'},
- {'path': '/usr/bin/yum', 'name': 'yum'},
# NOTE the `path` key for dnf/dnf5 is effectively discarded when matched for Red Hat OS family,
+ # special logic to infer the default `pkg_mgr` is used in `PkgMgrFactCollector._check_rh_versions()`