That yields a parsing error:

TASK: [compliance | Ensure /etc/hosts.deny has default ALL entry] 
************************
failed: [us202] => {"failed": true}
msg: line= is required with state=present

I switched it back to a single-line version but quoted as you showed, but 
the result is the same. A nonexistent file isn't created, and an existing 
file isn't modified.

On Wednesday, March 18, 2015 at 5:14:02 PM UTC-4, Phonthip Namkaew wrote:
>
>
> Try this:
>>
>
> (..)
>
>   tasks:
>     - name: add a line to /etc/hosts.deny
>       lineinfile:
>         "dest='/etc/hosts.deny'
>         line='ALL : ALL' 
>         insertafter=EOF
>         create=yes
>         state=present"
>  (..)
>

-- 
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/58447846-08a8-456d-8c32-a5358668ab8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to