The lineinfile module uses the os.linesep variable to insert newlines, so
this should not be happening unless the file had either been edited on a
Windows system or had the ^M's before the edit occurred. Can you verify the
original file did not have the incorrect newlines, and that you are not
running the playbook from a Windows machine (ie. via cygwin)?


On Mon, Jun 16, 2014 at 7:12 AM, jepper <[email protected]> wrote:

> I'm setting up tomcat, and change a parameter in a config file as follows:
>
> - name: set max-request-size
>
>   lineinfile: dest={{ tomcat_home }}/webapps/manager/WEB-INF/web.xml
> regexp="max-request-size"
> line="<max-request-size>1000000000</max-request-size>"
>
> Post processing, lines in the target file web.xml now end with a ^M. The
> lines that were replaced are fine, e.g.
>
>     <multipart-config>^M
>         <max-request-size>1000000000</max-request-size>            <--- OK!
>       <file-size-threshold>0</file-size-threshold>^M
>
> This is as seen vi, on a RHEL64 system.
>
> What am I doing wrong?
>
> --
> 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/e9cd90ac-d0a5-403f-ba0b-744a37d058ef%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/e9cd90ac-d0a5-403f-ba0b-744a37d058ef%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAMFyvFhzHGxKvLvR4N-XtnQM5Teg9G6OcyvNskVz1GvUO-goeg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to