Hi Racke, Line "USER_INSTALL_DIR" is exits in the file, Trying to match the line and add new line in same where it will match.
My issue is it's not matching new line will add end of file. Can you provide me suggestion any other method to fix this issue ? On Wed, Dec 18, 2019 at 2:45 AM Stefan Hornburg (Racke) <[email protected]> wrote: > On 12/17/19 6:06 PM, Uppara venkat wrote: > > Hi all, > > > > I would like add a line in particular line, I have written a task as > below; > > > > --- > > - name: adding script line with package name > > win_lineinfile: > > dest: D:/Software/configurations/uCMDBProbeResponseFile.txt > > regexp: '^USER_INSTALL_DIR= ' > > line: 'USER_INSTALL_DIR= F:\\UCMDB\\UCMDBServer' > > state: present > > > > But it will add the line in end of the file. > > " regexp" is not working it's not able to find the line. > > Could you please help me how to fix this issue. > > > > Hello Venkat, > > which line do you have in the file that is supposed to match your regular > expression? > > Regards > Racke > > > > > > > Thanks& Regards, > > Venkat > > > > -- > > 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] <mailto: > [email protected]>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/CAFMhZ_LD13JKfKAS8GrU%2B7MCAd8hXPubejmRh8WemT2fRuFg6w%40mail.gmail.com > > < > https://groups.google.com/d/msgid/ansible-project/CAFMhZ_LD13JKfKAS8GrU%2B7MCAd8hXPubejmRh8WemT2fRuFg6w%40mail.gmail.com?utm_medium=email&utm_source=footer > >. > > > -- > Ecommerce and Linux consulting + Perl and web application programming. > Debian and Sympa administration. Provisioning with Ansible. > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/1b93acc9-b8c4-4055-46d7-f6c0ab96dcb9%40linuxia.de > . > -- Thanks& Regards, venkatesulu.U 8147041026 -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFMhZ_KvOr%2BQdOxP2F_OicDsWnJKPu-PCmYA9ikXESkfbf3Ftg%40mail.gmail.com.
