-
Bug
-
Resolution: Done
-
Undefined
-
None
-
rhel-9.2.0
-
None
-
Moderate
-
rhel-sst-system-roles
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
None
-
None
-
None
-
-
x86_64
-
None
What were you trying to do that didn't work?
I attempted to run the rhc role from rhel-system-roles from an AAP 2.4 system a 2nd time.
Also ran it in an execution environment: registry.redhat.io/ansible-automation-platform-24/ee-minimal-rhel9:latest w/ same result.
Ansible roles are meant to be ran repeatedly, and for subsequent runs to skip tasks that were already completed.
The 2nd time the role is ran after registration - it fails.
Please provide the package NVR for which bug is seen:
rhel-system-roles-1.21.2-1.el9_2.noarch
How reproducible:
Steps to reproduce
- create RHEL 9.2 server to act as controller
- register
- install AAP v2.4
- install rhel-system-roles
- create RHEL 9.2 server to act as target
- do not register target
- create a test playbook (in or outside tower) for rhc role
- run playbook on controller for target
- run playbook a 2nd time after target is registered
Expected results
target registers and 2nd run completes with minimal changes
Actual results
1st run target registers successfully.
2nd run playbook fails.
It fails in rhc role tasks/subscription-manager.yml
on task
[Set the release]
argument 'release' is of type <class 'NoneType'> and we were unable to convert to str:
Suspected root cause - python version differences 3.9 vs 3.11:
- rhel-system-roles-1.21.2-1.el9_2.noarch is designed to run with
ansible-core v2.14 - which is based on Python 3.11 - AAP v2.4 uses ansible-core v2.15 - which is based on Python 3.9
- The default execution environments for AAP v2.4 are based on ansible-core v2.15 and Python 3.9
- rhc system role installed from rpm - produce errors when ran under Python 3.9
- rhc system role installed from rpm - runs fine under Python 3.11
- Automation Hub based rhc system roles in the redhat.rhel_system_roles do not produce errors under either Python 3.9 nor 3.11
- AAP v2.4 execution environment are also based on ansible-core v2.15 and Python 3.9 - and will error on rhc system role
- When crafting a custom EE w/ the Automation Hub based RHEL System Roles (non-rpm based) - the role and task succeed.
Suggested resolution:
rpm based rhel-system-roles should be updated to 1.22 which resolved the issue (or determined a better way to run set release task)
- links to