diff --git a/roles/ci_gen_kustomize_values/molecule/default/prepare.yml b/roles/ci_gen_kustomize_values/molecule/default/prepare.yml index b11327d265..1ddac734de 100644 --- a/roles/ci_gen_kustomize_values/molecule/default/prepare.yml +++ b/roles/ci_gen_kustomize_values/molecule/default/prepare.yml @@ -18,6 +18,11 @@ - name: Prepare hosts: all vars: + # the reason to have this new var definition for cifmw_installyamls_repos is + # that this var is being used in import_playbook which is not a task under + # the scope of any group. Thus, it won't use vars defined in group_vars. + # Ref: https://stackoverflow.com/a/78506392 + _cifmw_installyamls_repos: "{{ cifmw_installyamls_repos }}" cifmw_ci_gen_kustomize_values_src_dir: >- {{ (lookup('env', 'HOME'), @@ -46,7 +51,4 @@ type: "ecdsa" - name: Download tools for later testing and validations - ansible.builtin.import_playbook: >- - {{ (lookup('env', 'HOME'), - 'src/github.com/openstack-k8s-operators', - 'install_yamls/devsetup/download_tools.yaml') | path_join }} + ansible.builtin.import_playbook: "{{ _cifmw_installyamls_repos }}/devsetup/download_tools.yaml"