RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2079008 - All roles should support running with gather_facts: false
Summary: All roles should support running with gather_facts: false
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-system-roles
Version: 8.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.7
Assignee: Rich Megginson
QA Contact: David Jež
Gabi Fialová
URL:
Whiteboard:
Depends On: 2078989
Blocks: 2078999 2079009 2100558 2100559 2162788
TreeView+ depends on / blocked
 
Reported: 2022-04-26 17:08 UTC by Rich Megginson
Modified: 2023-01-20 21:29 UTC (History)
6 users (show)

Fixed In Version: rhel-system-roles-1.19.1-1.el8
Doc Type: Enhancement
Doc Text:
.RHEL System Roles now available also in playbooks with fact gathering disabled Ansible fact gathering might be disabled in your environment for performance or other reasons. Previously, it was not possible to use RHEL System Roles in such configurations. With this update, the system detects the `ANSIBLE_GATHERING=explicit` parameter in your configuration and `gather_facts: false` parameter in your playbooks, and use the `setup:` module to gather only the facts required by the given role, if not available from the fact cache. NOTE: If you have disabled Ansible fact gathering due to performance, you can enable Ansible fact caching instead, which does not cause a performance hit of retrieving them from source.
Clone Of: 2078989
Environment:
Last Closed: 2022-11-08 09:41:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-120023 0 None None None 2022-04-26 17:11:27 UTC
Red Hat Product Errata RHEA-2022:7568 0 None None None 2022-11-08 09:41:55 UTC

Description Rich Megginson 2022-04-26 17:08:51 UTC
+++ This bug was initially created as a clone of Bug #2078989 +++

Description of problem:
Some users use `gather_facts: false` in their playbooks, due to performance issues with fact gathering, or other reasons.  However, this breaks system roles because almost all of them require some sort of facts like `os_family`, `distribution`, etc. to be defined.  The system roles should work if fact gathering is disabled in the playbook.

NOTE: This may require the user to enable fact caching, or simply not use the system roles if it is not possible to use fact gathering at all.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Rich Megginson on 2022-04-26 16:41:29 UTC ---

Ansible by default will always gather facts in playbooks.  In order to test, you can use https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-gathering to disable fact gathering by default.

e.g. 

ANSIBLE_GATHERING=explicit ansible-playbook .... tests/tests_name.yml

--- Additional comment from Rich Megginson on 2022-04-26 17:06:32 UTC ---

NOTE: All roles currently are fixed except for the metrics role - see https://bugzilla.redhat.com/show_bug.cgi?id=2078999

Comment 3 Fedora Update System 2022-05-11 01:19:05 UTC
FEDORA-2022-2da3a47337 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2022-05-11 01:25:15 UTC
FEDORA-2022-d6e6c7c37c has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2022-05-11 01:35:36 UTC
FEDORA-2022-671a5d63e6 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 errata-xmlrpc 2022-11-08 09:41:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rhel-system-roles bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:7568


Note You need to log in before you can comment on or make changes to this bug.