Skip to content

Commit 9a0f2cb

Browse files
committed
Move cifmw_basedir var to group_vars - part four
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 9a0f2cb

File tree

19 files changed

+16
-25
lines changed

19 files changed

+16
-25
lines changed

hooks/playbooks/group_vars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../group_vars

roles/reportportal/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
cifmw_reportportal_dry_run: false
3-
cifmw_reportportal_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
3+
cifmw_reportportal_basedir: "{{ cifmw_basedir }}"
44
cifmw_reportportal_datarouter_url: ""
55
cifmw_reportportal_datarouter_username: ""
66
cifmw_reportportal_datarouter_password: ""

roles/reproducer/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
cifmw_reproducer_controller_user: "{{ hostvars['controller-0']['ansible_ssh_user'] | default('zuul') }}"
2121
cifmw_reproducer_controller_user_dir: "/home/{{ cifmw_reproducer_controller_user }}"
2222
cifmw_reproducer_controller_basedir: "{{ cifmw_reproducer_controller_user_dir }}/ci-framework-data"
23-
cifmw_reproducer_basedir: "{{ cifmw_basedir | default( ansible_user_dir ~ '/ci-framework-data') }}"
23+
cifmw_reproducer_basedir: "{{ cifmw_basedir }}"
2424
cifmw_reproducer_src_dir: "{{ cifmw_ci_src_dir | default( ansible_user_dir ~ '/src') }}"
2525
cifmw_reproducer_kubecfg: "{{ cifmw_libvirt_manager_configuration.vms.crc.image_local_dir }}/kubeconfig"
2626
cifmw_reproducer_params: {}

roles/rhol_crc/defaults/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ cifmw_rhol_crc_base_url: >-
3939
# In case we don't use cifmw_basedir it will get the
4040
# base_dir of the project if .git exists - change dir
4141
# does not affect other tasks:
42-
cifmw_rhol_crc_basedir: >-
43-
{{ cifmw_basedir | default( ansible_user_dir ~ '/ci-framework-data') }}
42+
cifmw_rhol_crc_basedir: "{{ cifmw_basedir }}"
4443
cifmw_rhol_crc_binary_folder: "{{ ansible_user_dir }}/bin"
4544
cifmw_rhol_crc_binary: "{{ cifmw_rhol_crc_binary_folder }}/crc"
4645
cifmw_rhol_crc_force_cleanup: false

roles/run_hook/tasks/playbook.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
{%- else -%}
1313
{{ hook.source }}
1414
{%- endif -%}
15-
_bdir: >-
16-
{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}
15+
_bdir: "{{ cifmw_basedir }}"
1716
_operator_namespace: >-
1817
{{
1918
cifmw_install_yamls_defaults['OPERATOR_NAMESPACE'] |

roles/set_openstack_containers/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_set_openstack_containers"
20-
cifmw_set_openstack_containers_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}"
20+
cifmw_set_openstack_containers_basedir: "{{ cifmw_basedir }}"
2121
cifmw_set_openstack_containers_registry: quay.io
2222
cifmw_set_openstack_containers_namespace: podified-antelope-centos9
2323
cifmw_set_openstack_containers_tag: current-podified

roles/shiftstack/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# All variables within this role should have a prefix of "cifmw_shiftstack"
2020
cifmw_shiftstack_ansible_command_logs_dir: "{{ cifmw_shiftstack_basedir }}/ansible_command_logs"
2121
cifmw_shiftstack_artifacts_dir: "{{ cifmw_shiftstack_basedir }}/artifacts"
22-
cifmw_shiftstack_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}/tests/shiftstack"
22+
cifmw_shiftstack_basedir: "{{ cifmw_basedir }}/tests/shiftstack"
2323
cifmw_shiftstack_client_incluster_secret_manifest: "{{ cifmw_shiftstack_client_pod_name }}_incluster_secret.yml"
2424
cifmw_shiftstack_client_incluster_secret_name: "incluster-kubeconfig"
2525
cifmw_shiftstack_client_pod_image: "quay.io/shiftstack-qe/shiftstack-client:latest"

roles/sushy_emulator/defaults/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +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_sushy_emulator"
2020

21-
cifmw_sushy_emulator_basedir: >-
22-
{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}
21+
cifmw_sushy_emulator_basedir: "{{ cifmw_basedir }}"
2322
cifmw_sushy_emulator_container_name: "cifmw-sushy_emulator"
2423
cifmw_sushy_emulator_driver: libvirt
2524
cifmw_sushy_emulator_driver_openstack_client_config_file: /etc/openstack/clouds.yaml

roles/tempest/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_tempest"
20-
cifmw_tempest_artifacts_basedir: "{{ cifmw_basedir | default(ansible_user_dir ~ '/ci-framework-data') }}/tests/tempest"
20+
cifmw_tempest_artifacts_basedir: "{{ cifmw_basedir }}/tests/tempest"
2121
cifmw_tempest_default_groups:
2222
- default
2323
cifmw_tempest_default_jobs:

roles/tempest/molecule/default/prepare.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
hosts: all
2020
vars:
2121
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
22-
cifmw_basedir: "{{ ansible_user_dir }}/ci-framework-data"
2322
cifmw_install_yamls_tasks_out: "{{ ansible_user_dir }}/zuul-jobs/roles/install_yamls_makes/tasks"
2423
cifmw_install_yamls_defaults:
2524
NAMESPACE: openstack

0 commit comments

Comments
 (0)