Skip to content

Commit 271f33f

Browse files
committed
Move cifmw_basedir var to group_vars - part two
The `cifmw_basedir` variable is now expected to be defined group_vars. Previous fallback to `ansible_user_dir ~ '/ci-framework-data'` has been removed from playbooks and roles. This change ensures consistency across roles and prevents accidental use of a default path when `cifmw_basedir` is intentionally unset. This commit is one of a set of changes. Signed-off-by: Daniel Pawlik <[email protected]>
1 parent 975ab76 commit 271f33f

File tree

22 files changed

+24
-26
lines changed

22 files changed

+24
-26
lines changed

group_vars/all.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ cifmw_project_dir_absolute: "{{ ansible_user_dir }}/{{ cifmw_project_dir }}"
88
cifmw_installyamls_repos_relative: src/github.com/openstack-k8s-operators/install_yamls
99
# since cifmw_installyamls_repos var already exists, let's use that and move all definition here in single place instead of creating another variable.
1010
cifmw_installyamls_repos: "{{ ansible_user_dir }}/{{ cifmw_installyamls_repos_relative }}"
11+
cifmw_basedir: "{{ ansible_user_dir }}/ci-framework-data"

roles/ci_setup/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# All variables intended for modification should be placed in this file.
1919
# All variables within this role should have a prefix of "cifmw_ci_setup"
2020

21-
cifmw_ci_setup_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
21+
cifmw_ci_setup_basedir: "{{ cifmw_basedir }}"
2222
cifmw_ci_setup_openshift_client_version: "stable"
2323
cifmw_ci_setup_oc_install_path: "{{ ansible_user_dir ~ '/bin' }}"
2424
cifmw_ci_setup_epel_pkgs: []

roles/cifmw_cephadm/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# defaults file for cifmw_cephadm
3-
cifmw_cephadm_basedir: "{{ cifmw_basedir | default( ansible_user_dir ~ '/ci-framework-data') }}"
3+
cifmw_cephadm_basedir: "{{ cifmw_basedir }}"
44
cifmw_cephadm_spec_on_bootstrap: false # not recommended due to https://tracker.ceph.com/issues/49277
55
cifmw_cephadm_ssh_user: ceph-admin
66
cifmw_cephadm_bin: /usr/sbin/cephadm

roles/cifmw_external_dns/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cifmw_external_dns_check_mode: false
2323
cifmw_external_dns_certificate_dir: /etc/pki/tls/
2424
cifmw_external_dns_certificate: "{{ cifmw_external_dns_certificate_dir ~ cifmw_external_dns_domain }}.crt"
2525
cifmw_external_dns_key: "{{ cifmw_external_dns_certificate_dir ~ cifmw_external_dns_domain }}.key"
26-
cifmw_external_dns_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
26+
cifmw_external_dns_basedir: "{{ cifmw_basedir }}"
2727
cifmw_external_dns_manifests_dir: "{{ cifmw_manifests | default(cifmw_external_dns_basedir ~ '/artifacts/manifests') }}/cifmw_external_dns"
2828
# Important: use the same rootca-public as openstack
2929
cifmw_external_dns_cert_issuer_ref:

roles/cifmw_setup/tasks/bootstrap.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@
6363
- always
6464
ansible.builtin.copy:
6565
mode: "0644"
66-
dest: "{{ cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data') }}/artifacts/parameters/custom-params.yml"
66+
dest: "{{ cifmw_basedir }}/artifacts/parameters/custom-params.yml"
6767
content: "{{ ci_framework_params | to_nice_yaml }}"

roles/cifmw_setup/tasks/run_logs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
logfiles_dest_dir: >-
3939
{{
4040
(
41-
cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data'),
41+
cifmw_basedir,
4242
'logs/',
4343
now(fmt='%Y-%m-%d_%H-%M')
4444
) | path_join
@@ -97,7 +97,7 @@
9797
dest: >-
9898
{{
9999
(
100-
cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data'),
100+
cifmw_basedir,
101101
"artifacts/ansible_facts." + now(fmt='%Y-%m-%d_%H-%M')
102102
) | path_join
103103
}}

roles/compliance/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# defaults file for compliance role
1919

20-
cifmw_compliance_artifacts_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}/tests/compliance"
20+
cifmw_compliance_artifacts_basedir: "{{ cifmw_basedir }}/tests/compliance"
2121
cifmw_compliance_cleanup: true
2222

2323
# A list of available profiles can be found using "oscap info /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml"

roles/config_drive/defaults/main.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717

1818
# All variables intended for modification should be placed in this file.
1919
# All variables within this role should have a prefix of "cifmw_config_drive"
20-
cifmw_config_drive_basedir: >-
21-
{{
22-
cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data')
23-
}}
20+
cifmw_config_drive_basedir: "{{ cifmw_basedir }}"
2421
cifmw_config_drive_workdir: >-
2522
{{ cifmw_config_drive_basedir }}/artifacts/cifmw_config_drive
2623

roles/copy_container/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ enable_cron_c9: true
66
# NEW names for conventions
77
cifmw_copy_ct_enable_cron: "{{ enable_cron }}"
88
cifmw_copy_ct_enable_cron_c9: "{{ enable_cron_c9 }}"
9-
cifmw_copy_ct_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
9+
cifmw_copy_ct_basedir: "{{ cifmw_basedir }}"

roles/dlrn_promote/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# All variables intended for modification should be placed in this file.
1919
# All variables within this role should have a prefix of "cifmw_dlrn_report"
2020

21-
cifmw_dlrn_promote_workspace: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
21+
cifmw_dlrn_promote_workspace: "{{ cifmw_basedir }}"
2222
cifmw_dlrn_promote_dlrnapi_user: "{{ dlrnapi_user | default('review_rdoproject_org') }}"
2323
cifmw_dlrn_promote_kerberos_auth: false
2424
cifmw_dlrn_promote_dlrnapi_host_principal: ""

0 commit comments

Comments
 (0)