lineinfile cannot do that but I believe the replace module can: http://docs.ansible.com/replace_module.html
Maybe something like this: - replace: dest=/file/name regexp='(\s+<Connector .*)(/>)$' replace='\1 packetSize="65536" \2' -Toshio On Tue, May 26, 2015 at 4:14 AM, <[email protected]> wrote: > Hi All, > > I'm new to ansible can you please help to append a string at the end of a > particular line in server.xml file > > > String= packetSize="65536" > > line= <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> > > I need something like this > > <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" > packetSize="65536" /> > > Many Thanks > Thomas Xavier > > -- > 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/4d5f6572-6f86-4648-b269-2e5cafcac0ac%40googlegroups.com. > 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/CAG9juErhC-GS40WHBTLKGhMhwD5C7Bbs8R8LMFv3RNcwarSerA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
