a Ansible regex_replace filter to extract the first part of the string with double quote at beginning.

32 views
Skip to first unread message

vkky2k

unread,
Apr 25, 2021, 9:29:15 PM4/25/21
to Ansible Project

My intention is to match and replace a string with its first part. The string would be started with double quote, and it's format would be like this: some-string = "ORACLE_logs:vserve-test-1": {

So, if my statement is: vol_name: "{{ some-string|regex_replace(??? }}", then the filter will assign “ORACLE_logs” to vol_name.

Thanks!


Reply all
Reply to author
Forward
0 new messages