fix: Add playbook scoped variable

This commit is contained in:
Danny Bessems 2023-08-24 17:41:35 +02:00
parent bb58e287b7
commit 4c1f1fce5e
3 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,9 @@
- hosts: 127.0.0.1 - hosts: 127.0.0.1
connection: local connection: local
gather_facts: true gather_facts: true
vars:
# Needed by some templating in various tasks
_newline: "\n"
vars_files: vars_files:
- defaults.yml - defaults.yml
- metacluster.yml - metacluster.yml

View File

@ -109,7 +109,6 @@
state: present state: present
kubeconfig: "{{ kubeconfig.path }}" kubeconfig: "{{ kubeconfig.path }}"
vars: vars:
_newline: "\n"
_template: _template:
name: "{{ item.name }}" name: "{{ item.name }}"
namespace: "{{ item.namespace }}" namespace: "{{ item.namespace }}"

View File

@ -34,7 +34,6 @@
vars: vars:
manifest: "{{ item.0 }}" manifest: "{{ item.0 }}"
src: "{{ item.1.src }}" src: "{{ item.1.src }}"
_newline: "\n"
_template: "{{ item.1._template }}" _template: "{{ item.1._template }}"
loop: "{{ query('ansible.builtin.subelements', query('ansible.builtin.dict', downstream_components), 'value.extra_manifests') }}" loop: "{{ query('ansible.builtin.subelements', query('ansible.builtin.dict', downstream_components), 'value.extra_manifests') }}"
loop_control: loop_control: