Re: [ansible-project] [ Ansible ] - How to comment (add #) all lines in file

2020-02-21 Thread Pawan Kumar
Vlado you are the champ 鷺 On Fri, 21 Feb 2020, 15:46 Vladimir Botka, wrote: > On Fri, 21 Feb 2020 08:48:33 + > João Santos wrote: > > > Indeed that suggestion worked out in replacement of using `shell` module > > (or similar). > > > > On Thu, 20 Feb 2020 at 18:53, Vladimir Botka wrote: >

Re: [ansible-project] [ Ansible ] - How to comment (add #) all lines in file

2020-02-21 Thread Vladimir Botka
On Fri, 21 Feb 2020 08:48:33 + João Santos wrote: > Indeed that suggestion worked out in replacement of using `shell` module > (or similar). > > On Thu, 20 Feb 2020 at 18:53, Vladimir Botka wrote: > > > > Use "replace" module. For example > > > >

Re: [ansible-project] [ Ansible ] - How to comment (add #) all lines in file

2020-02-21 Thread João Santos
Hi, thanks for the reply. Indeed that suggestion worked out in replacement of using `shell` module (or similar). Thanks for sharing. On Thu, 20 Feb 2020 at 18:53, Vladimir Botka wrote: > On Thu, 20 Feb 2020 09:25:26 -0800 (PST) > João Santos wrote: > > >- I have a file and want to insert

Re: [ansible-project] [ Ansible ] - How to comment (add #) all lines in file

2020-02-20 Thread Vladimir Botka
On Thu, 20 Feb 2020 09:25:26 -0800 (PST) João Santos wrote: >- I have a file and want to insert in the beginning of each line the # > character >- No matter if it has 10 lines or 1000 lines >- The final goal would be to no matter which file I said so, will add # > to the

Re: [ansible-project] [ Ansible ] - How to comment (add #) all lines in file

2020-02-20 Thread João Santos
To be clear, add # to the beginning of every single line in the file... 10, 1000, 10 lines... doesnt matter. On Thu, 20 Feb 2020 at 18:13, Mauricio Tavares wrote: > On Thu, Feb 20, 2020 at 12:25 PM João Santos > wrote: > > > > Hey Ansible gurus, need your help here... > > > > Just googled

Re: [ansible-project] [ Ansible ] - How to comment (add #) all lines in file

2020-02-20 Thread Mauricio Tavares
On Thu, Feb 20, 2020 at 12:25 PM João Santos wrote: > > Hey Ansible gurus, need your help here... > > Just googled around and was not able to find a satisfactory answer to the > following: > > I have a file and want to insert in the beginning of each line the # character > No matter if it has 10

[ansible-project] [ Ansible ] - How to comment (add #) all lines in file

2020-02-20 Thread João Santos
Hey Ansible gurus, need your help here... Just googled around and was not able to find a satisfactory answer to the following: - I have a file and want to insert in the beginning of each line the # character - No matter if it has 10 lines or 1000 lines - The final goal would be to