From 4c1f1fce5ee17bcf7ae5d7cd4b14640aa2bc2440 Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Thu, 24 Aug 2023 17:41:35 +0200 Subject: [PATCH] fix: Add playbook scoped variable --- .../firstboot/files/ansible_payload/bootstrap/playbook.yml | 3 +++ .../bootstrap/roles/metacluster/tasks/authentication.yml | 1 - .../bootstrap/roles/workloadcluster/tasks/gitops.yml | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/playbook.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/playbook.yml index 02f94aa..0a6dc68 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/playbook.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/playbook.yml @@ -2,6 +2,9 @@ - hosts: 127.0.0.1 connection: local gather_facts: true + vars: + # Needed by some templating in various tasks + _newline: "\n" vars_files: - defaults.yml - metacluster.yml diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/authentication.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/authentication.yml index ef2dc9d..e38c9e0 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/authentication.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/metacluster/tasks/authentication.yml @@ -109,7 +109,6 @@ state: present kubeconfig: "{{ kubeconfig.path }}" vars: - _newline: "\n" _template: name: "{{ item.name }}" namespace: "{{ item.namespace }}" diff --git a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml index 391ede6..9c3002a 100644 --- a/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml +++ b/ansible/roles/firstboot/files/ansible_payload/bootstrap/roles/workloadcluster/tasks/gitops.yml @@ -34,7 +34,6 @@ vars: manifest: "{{ item.0 }}" src: "{{ item.1.src }}" - _newline: "\n" _template: "{{ item.1._template }}" loop: "{{ query('ansible.builtin.subelements', query('ansible.builtin.dict', downstream_components), 'value.extra_manifests') }}" loop_control: