Hello, I was wondering if someone can possible help me with my Ansible
playbook. I have a file called myfile.yml with a line that contains an
image. Example line:
service:
blahblah
image: myoldimagename
blahblah
I want to change everything after the word "image: " with a configuration
line, however I'm having trouble. For example, I want to replace
"myoldimagename" with "mynewline". I don'e want to match "myoldimagename"
explicitly because that may be different.
- name: Configure myfile.yml
replace:
path: /data/config/myfile.yml
regexp: "(?<=image: ).*"
replace: \1mynewline
backup: yes
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/4f2d6e8a-516c-4b34-bf30-d33670de654e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.