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'
...
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'
...