I think you misunderstood me.
Are those lines you put there the same as in your source file?
Because I think they're not.

Instead of posting what appear to be randomly selected lines of a playbook:

* post the actual playbook/task that you have
* post a snippet of the real file content that you want to change




On Tue, 11 Jan 2022 at 09:37, 'Tony' via Ansible Project <
ansible-project@googlegroups.com> wrote:

> Hey,
> Are those actual entire lines of content?
> *Yes, they are the enter lines of the content. It is part of an
> application configuration file.*
>
> *Because they contain regex patterns. *
> Yes and I think this is why I cant get it working
>
> Any pointers would be great, I just need to insert a replace "version"
> with a version number i.e. 9.1.2.3
>
> On Monday, 10 January 2022 at 20:54:56 UTC dick....@geant.org wrote:
>
>> Are those actual entire lines of content?
>> Because they contain regex patterns.
>>
>> On Mon, 10 Jan 2022 at 13:04, 'Tony' via Ansible Project <
>> ansible...@googlegroups.com> wrote:
>>
>>> I am trying to replace a specific part of an indented string, but I
>>> cannot get it working with lineinfile/replace modules for some reason.
>>>
>>> What I would like:
>>>
>>> before:        Substitute "s~(src|href)=('|\")/((?!version).*)~$1=$2/
>>> *version*//$3~i"
>>>
>>> after:            Substitute "s~(src|href)=('|\")/((?!version).*)~$1=$2/
>>> *9.1.2.3*/$3~i"
>>>
>>> Anyone help me out with this one please?
>>>
>>> Cheers!
>>>
>>> --
>>> 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 ansible-proje...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/00b8d501-d0f1-470f-88e5-ebb6ddec2196n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/00b8d501-d0f1-470f-88e5-ebb6ddec2196n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> Sent from a mobile device - please excuse the brevity, spelling and
>> punctuation.
>>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9420d0e1-4d34-4bb2-b61f-6820dbaef0a3n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/9420d0e1-4d34-4bb2-b61f-6820dbaef0a3n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwOYJbYdjBzAZKYVTJp%2BFpzN%3DbxP%2BE0LhXA3tjeVJeDUaQ%40mail.gmail.com.

Reply via email to