Skip to content

repositories role fails with ansible-core 2.20 + allow_embedded_templates = False #1978

Description

@myllynen

With ansible-core 2.18 I see a playbook using the latest repositories module working ok:

...
TASK [redhat.satellite.repositories : Enable Red Hat Repositories]
changed: [127.0.0.1] => (item=[{'name': 'Red Hat Enterprise Linux for x86_64'}, {'name': 'Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)', 'releasever': 9}])
changed: [127.0.0.1] => (item=[{'name': 'Red Hat Enterprise Linux for x86_64'}, {'name': 'Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)', 'releasever': 9}])
...

With ansible-core 2.20 I get this error using the same ansible.cfg, same playbook, same variables, same module version:

...
TASK [redhat.satellite.repositories : Enable Red Hat Repositories]
[ERROR]: The lookup plugin 'subelements' failed: subelements lookup expects a list of two or three items, first a dict or a list, second a string pointing to the subkey
Origin:

invoke_lookup()

task path: /home/admin/.ansible/collections/ansible_collections/redhat/satellite/roles/repositories/tasks/main.yml:2
fatal: [127.0.0.1]: FAILED! =>
msg: 'The lookup plugin ''subelements'' failed: subelements lookup expects a list
of two or three items, first a dict or a list, second a string pointing to the subkey'
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Red Hat Jira

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions