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 2214287 - rhc system role does not apply Insights tags [rhel-8.8.0.z]
Summary: rhc system role does not apply Insights tags [rhel-8.8.0.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-system-roles
Version: 8.9
Hardware: All
OS: All
high
low
Target Milestone: rc
: 8.8
Assignee: Rich Megginson
QA Contact: Archana Pandey
URL:
Whiteboard: role:rhc
Depends On: 2209441
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-12 13:29 UTC by RHEL Program Management Team
Modified: 2023-06-27 15:00 UTC (History)
13 users (show)

Fixed In Version: rhel-system-roles-1.21.2-1.el8_8
Doc Type: Bug Fix
Doc Text:
Clone Of: 2209441
Environment:
Last Closed: 2023-06-27 14:58:30 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-159511 0 None None None 2023-06-12 13:34:36 UTC
Red Hat Product Errata RHBA-2023:3833 0 None None None 2023-06-27 14:58:34 UTC

Comment 5 Archana Pandey 2023-06-16 14:23:04 UTC
verifying bug on rhel-system-roles-1.21.2-1.el8_8.noarch

Beaker Test information:
                         HOSTNAME=kvm-08-guest10.hv2.lab.eng.bos.redhat.com
                            JOBID=7979848
                         RECIPEID=14101488
                    RESULT_SERVER=
                           DISTRO=RHEL-8.8.0-updates-20230616.8
                     ARCHITECTURE=x86_64

[root@kvm-08-guest10 ~]# rpm -qa | grep rhel-system-role
rhel-system-roles-1.21.2-1.el8_8.noarch
[root@kvm-08-guest10 ~]# 
[root@kvm-08-guest10 ~]# ll /etc/insights-client/tags.yaml
ls: cannot access '/etc/insights-client/tags.yaml': No such file or directory
[root@kvm-08-guest10 ~]#

>> running playbook 
[root@kvm-08-guest10 ~]# ansible-playbook test_tags_rhc.yaml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Register with activation key] **********************************************************************************************************************************************************

TASK [Gathering Facts] ***********************************************************************************************************************************************************************
ok: [localhost]

TASK [Register (using activation keys)] ******************************************************************************************************************************************************

TASK [rhel-system-roles.rhc : Set ansible_facts required by role] ****************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/set_vars.yml for localhost

TASK [rhel-system-roles.rhc : Ensure ansible_facts used by role] *****************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Check if insights-packages are installed] **********************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Handle insights unregistration] ********************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Handle system subscription] ************************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/subscription-manager.yml for localhost

TASK [rhel-system-roles.rhc : Ensure required packages are installed] ************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Get subscription status] ***************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Change rhsm.baseurl] *******************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Call subscription-manager] *************************************************************************************************************************************
changed: [localhost]

TASK [rhel-system-roles.rhc : Set the release] ***********************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Unset the release] *********************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Configure repositories] ****************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Handle insights registration] **********************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/insights-client.yml for localhost

TASK [rhel-system-roles.rhc : Ensure required packages are installed] ************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Call insights status] ******************************************************************************************************************************************
included: /usr/share/ansible/roles/rhel-system-roles.rhc/tasks/check-insights-status.yml for localhost

TASK [rhel-system-roles.rhc : Call insights status] ******************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Add insights tags] *********************************************************************************************************************************************
changed: [localhost]

TASK [rhel-system-roles.rhc : Delete insights tags] ******************************************************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Configure autoupdate] ******************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Register insights-client] **************************************************************************************************************************************

changed: [localhost]

TASK [rhel-system-roles.rhc : Do the collection if insights-client was registered] ***********************************************************************************************************
skipping: [localhost]

TASK [rhel-system-roles.rhc : Ensure worker and ansible packages are installed] **************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Enable remediation] ********************************************************************************************************************************************
ok: [localhost]

TASK [rhel-system-roles.rhc : Disable remediation] *******************************************************************************************************************************************
skipping: [localhost]

PLAY RECAP ***********************************************************************************************************************************************************************************
localhost                  : ok=15   changed=3    unreachable=0    failed=0    skipped=10   rescued=0    ignored=0   

[root@kvm-08-guest10 ~]# cat /etc/insights-client/tags.yaml
environment: test
location:
- India
- Karnataka
- Bangalore
[root@kvm-08-guest10 ~]#

>> verifying if tags got applied in crc by accessing link https://console.redhat.com/insights/inventory/?page=1&per_page=50#SIDs=&tags=insights-client%2Flocation%3DIndia

attaching screenshot of result - attachment 1971171 [details]

Verification Result : Passed

Additional Info:

playbook content
---
- name: Register with activation key
  hosts: localhost
  vars_files:
    test_vars.yaml
  tasks:
    - name: Register (using activation keys)
      include_role:
        name: rhel-system-roles.rhc
      vars:
        rhc_auth:
          activation_keys:
            keys: "{{ keys_var }}"
        rhc_insights:
          state: present
          autoupdate: true
          remediation: present
          tags:
            environment: test
            location:
              - India
              - Karnataka
              - Bangalore
        rhc_organization: "{{ rhc_organization_var }}"

Comment 10 errata-xmlrpc 2023-06-27 14:58:30 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 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/RHBA-2023:3833


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