What's the *exact line* in your file. You are trying to match on '^USER_INSTALL_DIR= ', so the equal sign *and* the
white space are significant. I would remove the white space from your regular expression as I don't think it has to
>
> On Wed, Dec 18, 2019 at 2:45 AM Stefan Hornburg (Racke) <
ra...@linuxia.de <mailto:
ra...@linuxia.de>> 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