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
Variable lists broken in only_if and debug #1348
Comments
Trying to join your list makes it possible to use variables in things like: vars: tasks: And cleans up some other things as well. I'm not sure I understand your above question entirely, but I'm not willing to stringify everything in with_items as that breaks iteration over hash and list variables (which also works). Most people are not going crazy with only_if and the new "when" in 0.9 will clean it up nicely, so I think this is a bit of an edge case. i.e, I want to be able to say: when: in($item,$list) as one of many operators to the proposed 'when' It's clearly only_if is a problem relative to templating and we need other options. I don't think we can fix this now in a clean way that doesn't break the other case, and when will eliminate the need for it. Sorry... not sure how to resolve immediately. |
See my latest comment on #1354, we probably can pass in different parameters when templating only_if to restore this and include that in 0.8 TBD. |
I'm all for making a comma-separated list when you need one, like I guess what I'm saying is
And I'm suggesting it shouldn't; maybe we can provide an easy way to do that for places that need strings. I know you're big on backward compatibility, and not only does this break my playbooks, it leaves me no way to fix them. :( Viewed another way, what's the point of lists if you're always going to join them? I can write a comma-separated string myself, but I can't make a list. Let's not take real data structures from people who need them. |
I've got a solution in mind. |
See if 25162c9 (now pushed) fixes this for you. It should. |
Thanks, works! |
I have lots of playbooks that use list vars:
But they have broken recently:
It seems it's trying to join my list:
I would expect the only_if condition to end up
3 not in [3, 4, 5]
, whicheval
s toFalse
. Is this an intended change, or can I have my repr back?The text was updated successfully, but these errors were encountered: