From c1d5ce768251efd550541f6fd2693a4641e0c623 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Tue, 26 Apr 2022 09:44:52 +0200 Subject: [PATCH] Escape characters in replace pattern --- playbook.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbook.yml b/playbook.yml index e9b63e6..9c4f372 100644 --- a/playbook.yml +++ b/playbook.yml @@ -196,7 +196,7 @@ ansible.builtin.replace: path: "{{ kubeconfig.path }}" regexp: '(server:)127\.0\.0\.1(:6443)$' - replace: "\1{{ cluster.virtualip | ansible.utils.netaddr('ipaddr') }}\2" + replace: "\\1{{ cluster.virtualip | ansible.utils.netaddr('ipaddr') }}\\2" - ansible.builtin.slurp: src: "{{ kubeconfig.path }}" register: foo