Skip to content

Commit 9292182

Browse files
committed
Move cifmw_architecture_repo var to group_vars
This commit is one of the steps of replacing common used vars with group_vars to improve overall maintenance of variables in ci-framework Signed-off-by: Amartya Sinha <[email protected]>
1 parent 0cf91bc commit 9292182

File tree

19 files changed

+20
-28
lines changed

19 files changed

+20
-28
lines changed

group_vars/all.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ 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_architecture_repo_relative: src/github.com/openstack-k8s-operators/architecture
12+
cifmw_architecture_repo: "{{ ansible_user_dir }}/{{ cifmw_architecture_repo_relative }}"

hooks/playbooks/link2file.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@
2020
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
2121

2222
vars:
23-
_base_dir: >-
24-
{{
25-
(
26-
ansible_user_dir,
27-
"src/github.com/openstack-k8s-operators/architecture"
28-
) | ansible.builtin.path_join
29-
}}
23+
_base_dir: "{{ cifmw_architecture_repo }}"
3024
_link_files: "{{ cifmw_link2file_files | split(',') }}"
3125

3226
tasks:

playbooks/06-deploy-architecture.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
cifmw_architecture_automation_file: >-
170170
{{
171171
(
172-
cifmw_architecture_repo | default(ansible_user_dir+'/src/github.com/openstack-k8s-operators/architecture'),
172+
cifmw_architecture_repo,
173173
'automation/vars',
174174
cifmw_architecture_scenario~'.yaml'
175175
) | ansible.builtin.path_join

roles/ci_dcn_site/defaults/main.yml

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

17-
ci_dcn_site_arch_repo_path: "{{ cifmw_architecture_repo | default('/home/zuul/src/github.com/openstack-k8s-operators/architecture') }}"
17+
ci_dcn_site_arch_repo_path: "{{ cifmw_architecture_repo }}"
1818
ci_dcn_site_arch_path: "{{ ci_dcn_site_arch_repo_path }}/examples/dt/dcn"
1919
ci_dcn_site_cifmw_repo_path: "{{ cifmw_project_dir_absolute }}"
2020
ci_dcn_site_search_storage_network_names:

roles/ci_gen_kustomize_values/molecule/default/converge.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@
2121
cifmw_architecture_scenario: hci
2222
cifmw_ci_gen_kustomize_values_basedir: >-
2323
{{ ansible_user_dir }}/ci-framework-data
24-
architecture_repo: >-
25-
{{
26-
(ansible_user_dir,
27-
'src/github.com/openstack-k8s-operators/architecture') | path_join
28-
}}
24+
architecture_repo: "{{ cifmw_architecture_repo }}"
2925
artifacts: "{{ cifmw_ci_gen_kustomize_values_basedir }}/artifacts"
3026
to_kustomize:
3127
- name: 'ctlplane'

roles/cifmw_setup/tasks/deploy_architecture.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
cifmw_architecture_automation_file: >-
147147
{{
148148
(
149-
cifmw_architecture_repo | default(ansible_user_dir+'/src/github.com/openstack-k8s-operators/architecture'),
149+
cifmw_architecture_repo,
150150
'automation/vars',
151151
cifmw_architecture_scenario~'.yaml'
152152
) | ansible.builtin.path_join

roles/reproducer/tasks/configure_controller.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
cifmw_architecture_automation_file: >-
427427
{{
428428
(
429-
cifmw_architecture_repo | default(ansible_user_dir+'/src/github.com/openstack-k8s-operators/architecture'),
429+
cifmw_architecture_repo,
430430
'automation/vars',
431431
cifmw_architecture_scenario~'.yaml'
432432
) | ansible.builtin.path_join

roles/reproducer/vars/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cifmw_reproducer_default_repositories:
66
- src: "https://github.com/openstack-k8s-operators/install_yamls"
77
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_installyamls_repos_relative }}"
88
- src: "https://github.com/openstack-k8s-operators/architecture"
9-
dest: "{{ cifmw_reproducer_controller_user_dir }}/src/github.com/openstack-k8s-operators/architecture"
9+
dest: "{{ cifmw_reproducer_controller_user_dir }}/{{ cifmw_architecture_repo_relative }}"
1010

1111
# one place to rule them all
1212
cifmw_reproducer_nm_dnsmasq: "/etc/NetworkManager/conf.d/zz-dnsmasq.conf"

scenarios/reproducers/bgp-4-racks-3-ocps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,6 @@ cifmw_devscripts_enable_ocp_nodes_host_routing: true
373373
# controller-0 as-is and be consumed by the `deploy-va.sh` script.
374374
# Please note, all paths are on the controller-0, meaning managed by the
375375
# Framework. Please do not edit them!
376-
_arch_repo: "{{ cifmw_architecture_repo | default('/home/zuul/src/github.com/openstack-k8s-operators/architecture') }}"
376+
_arch_repo: "{{ cifmw_architecture_repo }}"
377377
cifmw_architecture_scenario: bgp
378378
cifmw_kustomize_deploy_architecture_examples_path: "examples/dt/"

scenarios/reproducers/bgp-l3-xl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ cifmw_devscripts_enable_ocp_nodes_host_routing: true
763763
# controller-0 as-is and be consumed by the `deploy-va.sh` script.
764764
# Please note, all paths are on the controller-0, meaning managed by the
765765
# Framework. Please do not edit them!
766-
_arch_repo: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/architecture"
766+
_arch_repo: "{{ cifmw_architecture_repo }}"
767767
cifmw_architecture_scenario: bgp-l3-xl
768768
cifmw_kustomize_deploy_architecture_examples_path: "examples/dt/"
769769
cifmw_arch_automation_file: "bgp-l3-xl.yaml"

0 commit comments

Comments
 (0)