-
Notifications
You must be signed in to change notification settings - Fork 1.9k
lookup password does not deal well with spaces in the path #1968
Comments
This is a tough one as the password lookup plugin doesn't take structured parameters.... it takes a string of values and then attempts to parse it for sets of space separated parameters. The space separated nature conflicts with spaces embedded in file paths. It looks like this was an older style of writing lookup plugins that we'd like to move away from but it would be backwards incompatible to do so. Have to think about how best to achieve that. |
After some discussion, we probably want to add an additional standard ways to specify and parse parameters to lookup plugins. So we'd officially support something like the following (examples only. Exact syntax subject to change as it's thought through):
We would deprecate the former methods of specifying parameters:
I don't know if we'd continue to support the current style of arg passing that has support from the code when used via lookup() but not when used via when_* and that some plugins (for instance, password), are currently ignoring.
These are ideas for post-2.0... not enough time until then to work one of these solutions to completion. I'll look at whether we can add some sort of quote handling (A less hacky solution but quote parsing gets tricky quickly) or not parsing out key=value pairs if there's no "=" present (to indicate k=v pairs). The latter would be quite hacky but should work for your specific usecase. |
@muell Okay, that's only fixed in devel (will be 2.0) but it should fix your issue. I don't think I'm going to push it back to 1.9.x as quite a bit of that code has been reorganized and refactored so there may be subtle bugs if I just try to copy it over. You can watch ansible/ansible#12255 if you are interested in how we make parameter passing more normalized in future releases. Don't expect anything before 2.0 is out the door though :-) |
In fact it breaks as can be seen in debops/debops-playbooks#185
Removing the spaces helps.
The text was updated successfully, but these errors were encountered: