From 14d72ae55a45324170f31db9e1ec9b15e96ddbe6 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Thu, 6 Jul 2023 09:08:50 -0400 Subject: [PATCH] fix(ansible): use localhost when getting repository path for kubeconfig Signed-off-by: Devin Buhl --- ansible/playbooks/tasks/kubeconfig.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/playbooks/tasks/kubeconfig.yaml b/ansible/playbooks/tasks/kubeconfig.yaml index d05e27aa..56bf684e 100644 --- a/ansible/playbooks/tasks/kubeconfig.yaml +++ b/ansible/playbooks/tasks/kubeconfig.yaml @@ -1,9 +1,12 @@ --- - name: Get absolute path to this Git repository # noqa: command-instead-of-module ansible.builtin.command: git rev-parse --show-toplevel + delegate_to: localhost + become: false + run_once: true + register: repository_path changed_when: false check_mode: false - register: repository_path failed_when: repository_path.rc != 0 - name: Copy kubeconfig to the project directory