Bug 1226167 - Patch to ansible adds reference to undefined name.
Summary: Patch to ansible adds reference to undefined name.
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Other (show other bugs)
Version: Leap 15.5
Hardware: x86-64 openSUSE Leap 15.5
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Johannes Kastl
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-11 01:03 UTC by Manuel Jacob
Modified: 2024-07-01 14:51 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Jacob 2024-06-11 01:03:11 UTC
How to reproduce

Ensure ansible version 2.9.27-150000.1.17.2 is installed.

% echo "{{ 'foo' | from_yaml }}" > test.j2
% ansible all -i "localhost," -c local -m template -a "src=test.j2 dest=./test"


Expected result

Ansible creates file `test` with content “foo”.


Actual result

Ansible fails with:

localhost | FAILED! => {
    "changed": false,
    "msg": "NameError: name 'yaml_load' is not defined"
}


Analysis

File `/usr/lib/python3.6/site-packages/ansible/plugins/filter/core.py` at line 222 refers to name `yaml_load` which is not defined. The reference was added by the following patch: https://build.opensuse.org/projects/SUSE:SLE-15-SP5:Update/packages/ansible/files/0001-Ensure-that-unsafe-is-more-difficult-to-lose-stable-.patch?expand=1