From dba77fe7480bf35094932a56f94a18ef7126fdd7 Mon Sep 17 00:00:00 2001 From: Jack Hodgkiss Date: Wed, 25 Oct 2023 16:21:45 +0100 Subject: [PATCH] fix: prevent unwanted evaluation In older versions of Ansible it attempts to evaluate the nested variable inside `github_kayobe_environment_input` this causes the role to fail if using no environments. --- roles/github/defaults/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/github/defaults/main.yml b/roles/github/defaults/main.yml index bfd185f..a6da44e 100644 --- a/roles/github/defaults/main.yml +++ b/roles/github/defaults/main.yml @@ -56,6 +56,7 @@ github_kolla_tags_input: | The ansible tags to use when running kolla-ansible playbooks. github_kayobe_environment_input: | + {%- if github_environment_selector == 'input' -%} kayobe_environment: description: | Select the environment the kayobe workflow shall target. @@ -63,6 +64,7 @@ github_kayobe_environment_input: | required: true default: '{{ github_kayobe_environments | first }}' options: {{ github_kayobe_environments }} + {%- endif -%} github_workflows: - "{{ github_prepare_runner }}"