From a2c67e8b1d5b7d66113e8de0448d9fee376a1c14 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Tue, 10 Feb 2026 11:28:51 -0500 Subject: [PATCH] Fix selinux AVC denial when telemetry is enabled Resolves: RHEL-148292 Signed-off-by: Dimitri Savineau --- ansible-core.spec | 5 ++++- telemetry.py | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ansible-core.spec b/ansible-core.spec index 5f9bfb4..8ebdd09 100644 --- a/ansible-core.spec +++ b/ansible-core.spec @@ -19,7 +19,7 @@ Name: ansible-core Summary: A radically simple IT automation system Epoch: 1 Version: 2.16.16 -Release: 1%{?dist} +Release: 2%{?dist} 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 @@ -197,6 +197,9 @@ install -Dpm 0644 licenses/* -t %{buildroot}%{_pkglicensedir} %{python3_sitelib}/ansible_test %changelog +* Tue Feb 10 2026 Dimitri Savineau - 1:2.16.16-2 +- Fix selinux AVC denial when telemetry is enabled (RHEL-148292) + * Tue Feb 03 2026 Dimitri Savineau - 1:2.16.16-1 - ansible-core 2.16.16 release (RHEL-145990) diff --git a/telemetry.py b/telemetry.py index a12b7cc..8412b05 100644 --- a/telemetry.py +++ b/telemetry.py @@ -34,17 +34,17 @@ import sys import uuid from collections import defaultdict -try: +if __name__ == '__main__': + # When run as a script via insights-client, these are not needed + CallbackBase = object + Display = None +else: from ansible.executor.task_result import TaskResult from ansible.module_utils.common.yaml import yaml_load from ansible.plugins.callback import CallbackBase from ansible.plugins.loader import connection_loader from ansible.release import __version__ as ansible_version from ansible.utils.display import Display -except ImportError: - # When run as a script via insights-client, these are not needed - CallbackBase = object - Display = None journal_sendv = None try: