Bug 2004474 - Missing backport to work with inject_fact_as_var=false ansible option
Summary: Missing backport to work with inject_fact_as_var=false ansible option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: ansible-role-redhat-subscription
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z8
: 16.1 (Train on RHEL 8.2)
Assignee: Brendan Shephard
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-15 12:10 UTC by Brendan Shephard
Modified: 2024-12-20 21:03 UTC (History)
1 user (show)

Fixed In Version: ansible-role-redhat-subscription-1.1.1-1.20210915133322.6d26afa.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-24 11:01:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-9626 0 None None None 2021-11-15 12:49:32 UTC
Red Hat Product Errata RHBA-2022:0986 0 None None None 2022-03-24 11:01:58 UTC

Description Brendan Shephard 2021-09-15 12:10:13 UTC
Description of problem:
During a minor update of 16.1, the update fails with:
2021-09-15 11:53:45,820 p=1794 u=mistral n=ansible | fatal: [Controller00]: FAILED! => {"msg": "The conditional check 'ansible_pkg_mgr == 'yum'' failed. The error was: error while evaluating conditional (ansible_pkg_mgr == 'yum'): 'ansible_pkg_mgr' is undefined\n\nThe error appears to be in '/usr/share/ansible/roles/redhat-subscription/tasks/main.yml': line 34, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  block:\n    - name: Set rhsm_package_manager_config_file for yum\n      ^ here\n"}
2021-09-15 11:53:45,820 p=1794 u=mistral n=ansible | NO MORE HOSTS LEFT *************************************************************
2021-09-15 11:53:45,822 p=1794 u=mistral n=ansible | PLAY RECAP *********************************************************************
2021-09-15 11:53:45,822 p=1794 u=mistral n=ansible | Controller00             : ok=180  changed=82   unreachable=0    failed=1    skipped=397  rescued=0    ignored=0
2021-09-15 11:53:45,822 p=1794 u=mistral n=ansible | Controller01             : ok=5    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
2021-09-15 11:53:45,822 p=1794 u=mistral n=ansible | Controller02             : ok=5    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
2021-09-15 11:53:45,823 p=1794 u=mistral n=ansible | Wednesday 15 September 2021  11:53:45 +0200 (0:00:00.061)       0:11:11.060 ***
2021-09-15 11:53:45,823 p=1794 u=mistral n=ansible | ===============================================================================

Version-Release number of selected component (if applicable):
https://access.redhat.com/downloads/content/rhel---8/x86_64/9895/ansible-role-redhat-subscription/1.1.1-1.20201114001023.el8ost/noarch/fd431d51/package

How reproducible:
100%

Steps to Reproduce:
1. Use subscription manager during the initial deployment
2. Try to perform a minor update
3. Observe the above mentioned failure

Actual results:
Deployment fails while trying to reference ansible_* facts

Expected results:
Should use ansible_facts['fact-name'] instead

Additional info:
16.1 is missing this patch:
https://github.com/openstack/ansible-role-redhat-subscription/commit/7400e5a9d972a6e2854113cdadc66836547718ee

Comment 11 errata-xmlrpc 2022-03-24 11:01:35 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 (Red Hat OpenStack Platform 16.1.8 bug fix and enhancement advisory), 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:0986


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