Skip to content

Commit 0eb201a

Browse files
committed
Move cifmw_basedir var to group_vars - part three
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 part of a set of changes. Signed-off-by: Daniel Pawlik <[email protected]>
1 parent 9ccc1ee commit 0eb201a

File tree

18 files changed

+20
-32
lines changed

18 files changed

+20
-32
lines changed

roles/kustomize_deploy/defaults/main.yml

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

2020
# default resources
2121

22-
cifmw_kustomize_deploy_basedir: >-
23-
{{
24-
cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data')
25-
}}
22+
cifmw_kustomize_deploy_basedir: "{{ cifmw_basedir }}"
2623

2724
cifmw_kustomize_deploy_architecture_repo_url: "https://github.com/openstack-k8s-operators/architecture"
2825

roles/libvirt_manager/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_libvirt_manager"
2020

21-
cifmw_libvirt_manager_basedir: "{{ cifmw_basedir | default( ansible_user_dir ~ '/ci-framework-data') }}"
21+
cifmw_libvirt_manager_basedir: "{{ cifmw_basedir }}"
2222
cifmw_libvirt_manager_enable_virtualization_module: false
2323
cifmw_libvirt_manager_user: "{{ ansible_user_id | default(lookup('env', 'USER')) }}"
2424
cifmw_libvirt_manager_images_url: https://cloud.centos.org/centos/9-stream/x86_64/images

roles/manage_secrets/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_manage_secrets"
20-
cifmw_manage_secrets_basedir: >-
21-
{{
22-
cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data')
23-
}}
20+
cifmw_manage_secrets_basedir: "{{ cifmw_basedir }}"
2421

2522
cifmw_manage_secrets_owner: "{{ ansible_user_id }}"
2623

roles/mirror_registry/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
cifmw_mirror_registry_install_dir: /opt/mirror-registry
2222
cifmw_mirror_registry_fqdn: quay.openstack.lab
2323
cifmw_mirror_registry_release_version: v1.3.10
24-
cifmw_mirror_registry_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
24+
cifmw_mirror_registry_basedir: "{{ cifmw_basedir }}"

roles/nat64_appliance/defaults/main.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
# License for the specific language governing permissions and limitations
1515
# under the License.
1616

17-
cifmw_nat64_appliance_basedir: >-
18-
{{
19-
cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data')
20-
}}
17+
cifmw_nat64_appliance_basedir: "{{ cifmw_basedir }}"
2118
cifmw_nat64_appliance_workdir: "{{ cifmw_nat64_appliance_basedir }}/nat64_appliance"
2219
cifmw_nat64_appliance_venv_dir: "{{ cifmw_nat64_appliance_workdir }}/venv"
2320

roles/networking_mapper/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_networking_mapper"
20-
cifmw_networking_mapper_basedir: >-
21-
{{
22-
cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data')
23-
}}
20+
cifmw_networking_mapper_basedir: "{{ cifmw_basedir }}"
2421
cifmw_networking_mapper_infra_dir: "/etc/ci/env"
2522
cifmw_networking_mapper_networking_def_path: >-
2623
{{ cifmw_networking_mapper_infra_dir }}/networking-definition.yml

roles/openshift_login/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +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_openshift_login"
20-
cifmw_openshift_login_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
20+
cifmw_openshift_login_basedir: "{{ cifmw_basedir }}"
2121
cifmw_openshift_login_kubeconfig_default_path: "{{ cifmw_openshift_login_basedir ~ '/.kube/config' }}"
2222

2323
cifmw_openshift_login_force_refresh: false

roles/openshift_login/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@
9696
cifmw_openshift_token: "{{ cifmw_openshift_token }}"
9797
{% endif %}
9898
ansible.builtin.copy:
99-
dest: "{{ cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data') }}/artifacts/parameters/openshift-login-params.yml"
99+
dest: "{{ cifmw_basedir }}/artifacts/parameters/openshift-login-params.yml"
100100
content: "{{ cifmw_openshift_login_params_content | from_yaml | to_nice_yaml }}"
101101
mode: "0600"
102102
- name: Update the install-yamls-params with KUBECONFIG
103103
when: cifmw_install_yamls_environment is defined
104104
block:
105105
- name: Read the install yamls parameters file
106106
ansible.builtin.slurp:
107-
path: "{{ cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data') }}/artifacts/parameters/install-yamls-params.yml"
107+
path: "{{ cifmw_basedir }}/artifacts/parameters/install-yamls-params.yml"
108108
register: cifmw_openshift_login_install_yamls_artifacts_slurp
109109

110110
- name: Append the KUBECONFIG to the install yamls parameters
@@ -119,5 +119,5 @@
119119
}
120120
}, recursive=true) | to_nice_yaml
121121
}}
122-
dest: "{{ cifmw_basedir|default(ansible_user_dir ~ '/ci-framework-data') }}/artifacts/parameters/install-yamls-params.yml"
122+
dest: "{{ cifmw_basedir }}/artifacts/parameters/install-yamls-params.yml"
123123
mode: "0600"

roles/openshift_provisioner_node/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
cifmw_opn_external_bridge_name: "baremetal"
2222
cifmw_opn_prov_bridge_name: "provisioning"
2323

24-
cifmw_opn_basedir: "{{ cifmw_basedir | default( ansible_user_dir ~ '/ci-framework-data') }}"
24+
cifmw_opn_basedir: "{{ cifmw_basedir }}"
2525
cifmw_opn_artifacts_dir: "{{ cifmw_opn_basedir }}/artifacts"
2626
cifmw_opn_dry_run: false

roles/openshift_provisioner_node/molecule/default/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
cifmw_use_opn: true
2626
cifmw_opn_use_provisioning_network: false
2727
cifmw_opn_user: kni
28-
cifmw_opn_basedir: "{{ cifmw_basedir | default( ansible_user_dir ~ '/ci-framework-data') }}"
28+
cifmw_opn_basedir: "{{ cifmw_basedir }}"
2929

3030
tasks:
3131
- name: Including the openshift provisioner node role.

0 commit comments

Comments
 (0)