Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 2208557

Summary: While creating modulemd filter for content view via ansible playbook getting error traceback.
Product: Red Hat Satellite Reporter: vivek singh <vivsingh>
Component: Ansible CollectionAssignee: Evgeni Golov <egolov>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.13.0CC: egolov, ehelms, jpathan, lpramuk
Target Milestone: 6.15.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ansible-collection-redhat-satellite-3.11.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-23 17:11:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description vivek singh 2023-05-19 14:09:56 UTC
Description :- While creating modulemd filter for content view via ansible playbook getting error traceback. 

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

How reproducible: always 

Steps to Reproduce: 
1- Install ansible-collection on satellite -->  ansible-galaxy collection install redhat.satellite:3.10.0 

2- create playbook with following content as per document --> https://console.redhat.com/ansible/automation-hub/repo/published/redhat/satellite/content/module/content_view_filter/?version=3.10.0 

3- Run playbook from CLI or satellite. 

4- Run traceback will give you error but modulemd filter is created on satellite with no rules.  

Actual results: Playbook giving error and also creating filter  .


Expected results: Playbook should run without any error. 

Additional info: Note- In the release notes of this version:

https://github.com/RedHatSatellite/satellite-ansible-collection/blob/develop/CHANGELOG.rst#v3-10-0

It is written:

* content_view_filter - add support for creating modulemd filters

Comment 3 Lukas Pramuk 2023-12-15 16:26:40 UTC
VERIFIED.

@Satellite 6.15.0 Snap 2.1
ansible-collection-redhat-satellite-3.14.0-1.el8sat.noarch

using the folowing reproducer:

1) Create CV cv_test_rhel8 and add there RHEL8 repos

2) Prepare testing playbook test.yaml
# cat test.yaml 
---
- name: Test playbook
  hosts: localhost
  tasks:
    - name: Create content view filters
      redhat.satellite.content_view_filter:
         username: admin
         password: changeme
         server_url: "https://{{ ansible_fqdn }}"
         content_view: cv_test_rhel8
         filter_state: present
         filter_type: modulemd
         inclusion: true
         name: module_streams_without_errata
         organization: Default Organization
         original_module_streams: true

3) Run the playbook

# ansible-playbook -ilocalhoast, -c local test.yaml 

PLAY [Test playbook] *********************************************************************************************************************************************************************************************************************************************************************

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

TASK [Create content view filters] *******************************************************************************************************************************************************************************************************************************************************
changed: [localhost]

PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

>>> content-view filter of type modulemd is being created successfully

Comment 6 errata-xmlrpc 2024-04-23 17:11:17 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 (Important: Satellite 6.15.0 release), 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/RHSA-2024:2010