-
Notifications
You must be signed in to change notification settings - Fork 361
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
Using variable for Line with Lineinfile module throws exception #1333
Comments
Variables:
This works:
this doesn't work
and produces this error:
Thanks for investigating this |
I'm unable to recreate the error you are seeing. Please provide the output of the following commands:
|
here you go, hope this helps: ansible-runner --version $ ansible --version |
Oh, apologies, I tested the working code, not the non-working. Your problem is a quoting issue. The non-working code is not using quotes around your strings with embedded spaces, thus causing Add these 3 new debugging parameters to your
|
Thanks David - That was a rookie move on my part - works as designed now You're awesome - have a great day my friend! |
I'm trying to use python variables for the line and regexp elements of Lineinfile in Python using ansible-runner.
When I pass the string to ansible-runner for Line and Regexp in Lineinfile it works fine
When I put the exact same strings into variables and use them the same Lineinfile code I get an exception about wrong number of arguments
Any suggestions as to what I need to do in order to resolve this problem?
The text was updated successfully, but these errors were encountered: