Closed charlyhue closed 4 years ago
Which version/source of foreman ansible modules are you using?
and just making sure, your example playbook has latest
weirdly indented
I use the latest version of the master branch. I fixed the example (copy / paste mistake)
The error come from cvc['content_view_version']['id']
in current_cvcs_record = [{"id": cvc['id'], "content_view_id": cvc['content_view']['id'], "content_view_version_id": cvc['content_view_version']['id'], "latest": cvc['latest']} for cvc in current_cvcs]
. When composite content view is not published 'content_view_version' is empty.
Oooh, I see.
Thanks a ton for hunting that down! I'll see that I fix that quickly.
@charlyhue please have a look at https://github.com/theforeman/foreman-ansible-modules/pull/679, it should fix your issue
SUMMARY
Module katello_content_view raise TypeError: 'NoneType' object is not subscriptable error when composite content view is not publised
ISSUE TYPE
ANSIBLE VERSION
KATELLO/FOREMAN VERSION
APYPIE VERSION
STEPS TO REPRODUCE
EXPECTED RESULTS
Content view should be updated (or task should be OK when running many times).
ACTUAL RESULTS