On Apr 24, 2015 7:30 PM, <[email protected]> wrote:
>
> When using lineinfile, I get this kind of an error:
>
> TASK: [Enable/Disable watchdog]
***********************************************
> failed: [dni-7448-35] => {"failed": true, "parsed": false}
> invalid output was: Traceback (most recent call last):
>   File
"/home/cumulus/.ansible/tmp/ansible-tmp-1429913951.55-31782322592167/lineinfile",
line 1917, in <module>
>     main()
>   File
"/home/cumulus/.ansible/tmp/ansible-tmp-1429913951.55-31782322592167/lineinfile",
line 370, in main
>     should_unquote = not is_quoted(line)
> NameError: global name 'is_quoted' is not defined
>
>
> FATAL: all hosts have already failed -- aborting
>
> the task looks like so:
>     - name: Enable/Disable watchdog
>       lineinfile: dest=/etc/watchdog.d/platform line="run_watchdog={{
run_watchdog }}" state=present
>       when: run_watchdog is defined
>
> Ansible version is 1.7
>
> Anybody knows how to fix this?
>
Looking at the code in the git repo it looks like it's fixed as of 1.7.1

The lineinfile module needs to have

from ansible.module_utils.splitter import *

Near the bottom of the file.

-Toshio

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAG9juEp%3DHpeBqMBh9AjNCbRq2RxEqn0g%3DcsoPjeg1JDhiZFMXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to