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 2057657 - network - consistently use ansible_managed in configuration files managed by role
Summary: network - consistently use ansible_managed in configuration files managed by ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhel-system-roles
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 9.0
Assignee: Rich Megginson
QA Contact: Jakub Haruda
Mayur Patil
URL:
Whiteboard: role:network
Depends On: 2044640 2057661 2057662
Blocks: 2047504 2047506 2054363 2054364 2054365 2054367 2054368 2054369 2057645 2057647 2057651 2057652 2057656 2064690 2065382
TreeView+ depends on / blocked
 
Reported: 2022-02-23 19:44 UTC by Noriko Hosoi
Modified: 2022-05-17 13:23 UTC (History)
8 users (show)

Fixed In Version: rhel-system-roles-1.16.1-1.el9_0
Doc Type: Enhancement
Doc Text:
.The Network System role now directly manages the configuration files of Ansible With this enhancement, the `network` role generates `ifcfg` files in `/etc/sysconfig/network-scripts`. Then, it inserts the comment “Ansible managed”, using the standard `ansible_managed` variable. This comment indicates that the `ifcfg` files are not directly editable as the `network` role may overwrite it. The important difference in handling the `ifcfg` file to add "Ansible managed" comment is that the `network` role uses the `initscripts` package while the NetworkManager uses the `nm` package.
Clone Of: 2044640
: 2065382 (view as bug list)
Environment:
Last Closed: 2022-05-17 13:03:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github linux-system-roles network pull 464 0 None open System Roles should consistently use ansible_managed in configuration files it manages 2022-02-23 19:46:50 UTC
Red Hat Issue Tracker RHELPLAN-113355 0 None None None 2022-02-23 22:24:54 UTC
Red Hat Product Errata RHBA-2022:2443 0 None None None 2022-05-17 13:04:53 UTC

Description Noriko Hosoi 2022-02-23 19:44:40 UTC
+++ This bug was initially created as a clone of Bug #2044640 +++

Description of problem:
RHEL System Roles should consistently use ansible_managed to allow customers to customize the comment shown at the top of configuration files managed by RHEL System Roles.  Some roles do not use ansible_managed, or have hard coded comments.  For example, the kernel_settings role creates /etc/tuned/kernel_settings/tuned.conf with a hard coded comment.  


Version-Release number of selected component (if applicable):
rhel-system-roles-1.7.3-2.el8.noarch


Additional info:
This is likely not limited to the kernel_settings role.  All roles should be evaluated and updated as needed to use ansible_managed.  Any roles updated to use ansible_managed should refer to https://bugzilla.redhat.com/show_bug.cgi?id=2006230 to ensure multi-line ansible_managed comments are supported.

--- Additional comment from Rich Megginson on 2022-01-25 02:46:04 UTC ---

kernel_settings https://github.com/linux-system-roles/kernel_settings/pull/72
postfix - uses the `postconf` command to set configuration - so no template used to generate /etc/postfix/main.cf - we could use the "trick" developed by https://github.com/linux-system-roles/kernel_settings/pull/72/files#diff-3d0ff1709ca48add100327bb2a468e6c508fb92a159c64c4f99ad1df89d9bddeR79 to generate the ansible_managed value, then use something like `lineinfile` to ensure that value is in main.cf
logging - looks good, but need to confirm
vpn - needs ansible_managed
timesync - good
kdump - good
cockpit - good
ssh - good
ha_cluster - need to see if file format supports commenting
tlog - needs comments
certificate - not sure - says it generates scripts but I cannot find how
crypto_policies - good
firewall - good
metrics - needs comments - but this will involve changes to ansible-pcp
mssql - needs comments
nbde_client, nbde_server - uses json format - not sure about comments
network - needs comments
selinux - good
storage - I think /etc/crypttab is not "owned" by the role

in addition - there may be some of the roles that generate config files in a non-standard way (e.g. like postfix with postfix-conf - not using the template module or lookup) that we will have to do some more investigation to find out

Comment 14 errata-xmlrpc 2022-05-17 13:03:41 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 (new packages: rhel-system-roles), 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/RHBA-2022:2443


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