From 7b6e759a73a76dd83a08f4b95873610fc80781f4 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Tue, 26 Apr 2022 12:47:01 +0200 Subject: [PATCH] Escape patterns to avoid invalid group reference --- playbook.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playbook.yml b/playbook.yml index ab04cc4..6e64d6b 100644 --- a/playbook.yml +++ b/playbook.yml @@ -196,7 +196,8 @@ ansible.builtin.replace: path: "{{ kubeconfig.path }}" regexp: '(server:)127\.0\.0\.1(:6443)$' - replace: "\\1{{ cluster.virtualip | ansible.utils.ipaddr('address') }}\\2" + replace: >- + \1'{{ cluster.virtualip | ansible.utils.ipaddr('address') }}'\2 - ansible.builtin.slurp: src: "{{ kubeconfig.path }}" register: foo