On 15.01.22 17:55, Dick Visser wrote:
Hi
On Sat, 15 Jan 2022 at 15:28, dulhaver via Ansible Project
wrote:
I want to change replace a particular line in an exiting file
(after having pushed a template of it to the remote)
If you are already using a template, why not just that ins
Hii
On Sat, 15 Jan 2022 at 15:28, dulhaver via Ansible Project <
ansible-project@googlegroups.com> wrote:
> I want to change replace a particular line in an exiting file (after
> having pushed a template of it to the remote)
>
It you are already using a template, why not just that instead of
lin
I doubt without using ^ it wont be able to find line starting with
MYHOME.
On Sat, 15 Jan 2022 at 8:29 PM, dulhaver via Ansible Project <
ansible-project@googlegroups.com> wrote:
> hm. adding a become: yes makes the TASK go through, so the hint was good,
> thx.
>
> However the line is not bei
hm. adding a become: yes makes the TASK go through, so the hint was good, thx.
However the line is not being replaced.
can it be the regexp: 'MYHOME=/opt/db/mysql/mariadb-10.0.23-linux-x86_64' does
not identify the line to be changed correctly?
that would explain that behavior somewhat.
If so .
Hey,
Are you trying to use become method to be root or privileged user ? If file
exist on target node can u show permissions on it.
And in line regexp change to below to look for starting with line using ^
regexp = ‘^MYHOME=/opt/db/mysql/*’
Cheers,
Parth
On Sat, 15 Jan 2022 at 7:58 PM, dulhave
I want to change replace a particular line in an exiting file (after having
pushed a template of it to the remote)
this is ant extract of the file content
> cat bin/.myenv
# Mysql Environment
...
MYBASE=/opt/db/mysql/mariadb
MYHOME=/opt/db/mysql/mariadb-10.0.23-linux-x86_64
MYDATA=/opt/db/data/m