Skip to content

Commit 878243d

Browse files
committed
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 0d6c58a commit 878243d

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

roles/ci_gen_kustomize_values/molecule/default/prepare.yml

Lines changed: 11 additions & 4 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', ansible_user_dir),
2424
'ci-framework-data',
2525
'artifacts', 'ci_k8s_snippets') | path_join
2626
}}
@@ -46,6 +46,13 @@
4646
type: "ecdsa"
4747

4848
- name: Download tools for later testing and validations
49-
ansible.builtin.import_playbook: >-
50-
{{ ('/home/zuul/src/github.com/openstack-k8s-operators',
51-
'install_yamls/devsetup/download_tools.yaml') | path_join }}
49+
#hosts: all
50+
#gather_facts: true
51+
#vars:
52+
# ansible_user_dir: "{{ lookup('env', 'HOME') }}"
53+
#tasks:
54+
# - name: Run download tools playbook
55+
ansible.builtin.include_playbook:
56+
file: "{{ (ansible_user_dir,
57+
'src/github.com/openstack-k8s-operators/install_yamls/devsetup/download_tools.yaml') | path_join
58+
}}"

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)