Andy_L
(Andy L)
1
I went to run a playbook and got this error message.
ERROR: changed is not a legal parameter in an Ansible task or handler
At this point, I have dozens of roles which are changing rapidly. It isn’t easy to find the source of this error.
How to I generate a backtrace, so I can see what file/line has the error?
(running with -vvvv didn’t help.)
Install ack (ack-grep on Debian), search for " changed:"
That’s not a trace back but Ansible telling you about an invalid keyword. Trace backs include code and occur when errors are not caught.
– Michael
Andy_L
(Andy L)
3
Yes - I did use ack.
But - that’s the answer? Ack?
The ansible parser can not report which file/line contained an invalid keyword? Seriously?
This is not done at parse time.
– Michael
Andy_L
(Andy L)
5
Aah OK - some YAML lib does the parsing/loading…
IMHO a better error message would be super helpful, especially or newbies.
I could send a pull-request to include the task name in the error message. Michael - let me know if you would like me to do this.
Cheers, Andy