-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #1712: Fix content_view_version_cleanup slice error #1713
Fixes #1712: Fix content_view_version_cleanup slice error #1713
Conversation
@evgeni Could you try and prioritize this fix in one of the next releases please? |
How are you setting it so it doesn't end up being an int? |
Very good question, and I don't have an answer there. I have had this error for a long while now and actually never considered that it was due to that variable being an issue. |
This feels like papering over an actual issue. In our CI this works just fine: foreman-ansible-modules/tests/test_playbooks/content_view_version_cleanup_role.yml Line 58 in 28ea226
And so does my prod environment where I use this role regularly. Do your variables come from some external source, not a vars file? |
I always set it from command line with But even with the example playbook in the issue, I have the same error. |
out of curiousity, can you try with |
I don't have the error if I use the JSON style parameter. This is one of those python variable type conversion things again I think... Something I have issues with on a regular basis is |
Now, regardless of the JSON style working or not, I can imagine that other people might have faced the same issue. |
Yeah, I absolutely agree we should fix this. I just wanted to better understand why it needs fixing. The cli |
Thanks @evgeni |
An explicit conversion to int of the
foreman_content_view_version_cleanup_keep
variable is required to fix theslice indices must be integers or None or have an __index__ method
error.