Re: [ansible-project] lineinfile module to replace a string

2023-06-21 Thread Veera
Thanks . It worked as expected On Tuesday, June 20, 2023 at 1:46:19 AM UTC+5:30 Dick Visser wrote: > On Mon, 19 Jun 2023 at 21:37, Veera wrote: > >> Yes.. It's basically another yaml file. >> >> I'm asking because string manipulation of otherwise structured data will > become messy quickly -

Re: [ansible-project] lineinfile module to replace a string

2023-06-19 Thread Dick Visser
On Mon, 19 Jun 2023 at 21:37, Veera wrote: > Yes.. It's basically another yaml file. > > I'm asking because string manipulation of otherwise structured data will become messy quickly - as you have found out. If you must keep all the comments then you'll have to use logic to handle that. Whenever

Re: [ansible-project] lineinfile module to replace a string

2023-06-19 Thread Veera
Yes.. It's basically another yaml file. On Tue, 20 Jun, 2023, 12:24 am Dick Visser, wrote: > What kind of file is this? > It looks like yaml? > > On Mon, 19 Jun 2023 at 18:47, Veera wrote: > >> Hi, >> >> I am trying to replace a line/string in a 224 lines file . >> Trying with replace and

Re: [ansible-project] lineinfile module to replace a string

2023-06-19 Thread Dick Visser
What kind of file is this? It looks like yaml? On Mon, 19 Jun 2023 at 18:47, Veera wrote: > Hi, > > I am trying to replace a line/string in a 224 lines file . > Trying with replace and lineinfile module , but seems i am missing a bit.. > > below is the string to consider: > > logging.files

[ansible-project] lineinfile module to replace a string

2023-06-19 Thread Veera
Hi, I am trying to replace a line/string in a 224 lines file . Trying with replace and lineinfile module , but seems i am missing a bit.. below is the string to consider: logging.files: # Configure the path where the logs are written. The default is the logs directory # under the home