Skip to content

Commit fa902d4

Browse files
bshewaleamartyasinha
authored andcommitted
Replace hardcoded /home/zuul paths in kustomize_deploy & ci_gen_kustomize_values
Replace hardcoded /home/zuul/ paths with ansible_user_dir variable in kustomize_deploy & ci_gen_kustomize_values role to support different user environments and improve consistency with configurable user variables pattern.
1 parent 0ec3565 commit fa902d4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

roles/ci_gen_kustomize_values/molecule/default/prepare.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
vars:
2121
cifmw_ci_gen_kustomize_values_src_dir: >-
2222
{{
23-
(lookup('env', 'HOME', '/home/zuul'),
23+
(lookup('env', 'HOME'),
2424
'ci-framework-data',
2525
'artifacts', 'ci_k8s_snippets') | path_join
2626
}}
@@ -47,5 +47,6 @@
4747

4848
- name: Download tools for later testing and validations
4949
ansible.builtin.import_playbook: >-
50-
{{ ('/home/zuul/src/github.com/openstack-k8s-operators',
50+
{{ (lookup('env', 'HOME'),
51+
'src/github.com/openstack-k8s-operators',
5152
'install_yamls/devsetup/download_tools.yaml') | path_join }}

roles/kustomize_deploy/tasks/cleanup.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
- "{{ cifmw_kustomize_deploy_kustomizations_dest_dir }}/openstack.yaml"
5151
- "{{ cifmw_kustomize_deploy_olm_dest_file }}"
5252
_external_dns_crs:
53-
- /home/zuul/ci-framework-data/artifacts/manifests/cifmw_external_dns/ceph-local-dns.yml
54-
- /home/zuul/ci-framework-data/artifacts/manifests/cifmw_external_dns/ceph-local-cert.yml
53+
- "{{ ansible_user_dir }}/ci-framework-data/artifacts/manifests/cifmw_external_dns/ceph-local-dns.yml"
54+
- "{{ ansible_user_dir }}/ci-framework-data/artifacts/manifests/cifmw_external_dns/ceph-local-cert.yml"
5555
register: _cifmw_kustomize_files
5656
ansible.builtin.set_fact:
5757
cifmw_kustomize_deploy_crs_to_delete: >-

0 commit comments

Comments
 (0)