From 80d348b572648a7d5f065f6fd3a2fcd8153b62c2 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Fri, 29 Apr 2022 16:09:17 +0200 Subject: [PATCH] Remove list index --- playbook.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playbook.yml b/playbook.yml index e2c58ed..b47f3fa 100644 --- a/playbook.yml +++ b/playbook.yml @@ -188,12 +188,11 @@ ansible.builtin.tempfile: state: file register: kubeconfig - - ansible.builtin.debug: - msg: "{{ lookup('dict', hostvars) }}" + - name: Store kubeconfig in tempfile ansible.builtin.copy: dest: "{{ kubeconfig.path }}" - content: "{{ ( lookup('dict', hostvars) )[0].value.cluster.kubeconfig }}" + content: "{{ ( lookup('dict', hostvars) ).value.cluster.kubeconfig }}" mode: 0600 - name: Replace API url