File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,17 @@ kolla_ansible_source_version: "{{ stackhpc_kolla_ansible_source_version }}"
62
62
# ##############################################################################
63
63
# Kolla configuration.
64
64
65
+
66
+ # Kolla base container image architecture. Options are "x86_64", "aarch64".
67
+ # Default is "{{ ansible_facts.architecture }}"
68
+ # NOTE(bbezak): evaluating this var locally for non facts gathering playbooks
69
+ kolla_base_arch : >-
70
+ {{
71
+ 'aarch64' if (stackhpc_cpu_arch_override is defined and stackhpc_cpu_arch_override | length > 0 and stackhpc_cpu_arch_override == 'arm64')
72
+ else (stackhpc_cpu_arch_override if (stackhpc_cpu_arch_override is defined and stackhpc_cpu_arch_override | length > 0)
73
+ else ('aarch64' if lookup('pipe','uname -m') in ['aarch64','arm64'] else 'x86_64'))
74
+ }}
75
+
65
76
# Kolla base container image distribution. Options are "centos", "debian",
66
77
# "rocky", "ubuntu". Default is {{ os_distribution }}.
67
78
# kolla_base_distro:
@@ -430,11 +441,6 @@ kolla_build_customizations: "{{ kolla_build_customizations_common | combine(koll
430
441
# Dict mapping Kolla Dockerfile ARG names to their values.
431
442
kolla_build_args : {}
432
443
433
- # ##############################################################################
434
- # Kolla platform architecture configuration.
435
-
436
- kolla_base_arch : " {{ 'aarch64' if stackhpc_cpu_arch == 'arm64' else stackhpc_cpu_arch }}"
437
-
438
444
# ##############################################################################
439
445
# Kolla-ansible inventory configuration.
440
446
Original file line number Diff line number Diff line change @@ -28,8 +28,13 @@ stackhpc_include_os_minor_version_in_repo_url: false
28
28
stackhpc_rocky_9_url_version : " {{ '9.' + stackhpc_pulp_repo_rocky_9_minor_version | string if stackhpc_include_os_minor_version_in_repo_url | bool else '9' }}"
29
29
30
30
# Pick build architecture for kolla and disk image builder
31
- # Choose between x86_64 or arm64
32
- stackhpc_cpu_arch : ' x86_64'
31
+ # Choose between x86_64 or arm64. Leaving unset will default
32
+ # to the local architecture.
33
+ stackhpc_cpu_arch_override : " "
34
+
35
+ # If the override variable hasnt been set above then both kolla_base_arch and
36
+ # stackhpc_cpu_arch will default to the local architecture.
37
+ stackhpc_cpu_arch : " {{ 'arm64' if kolla_base_arch == 'aarch64' else kolla_base_arch }}"
33
38
34
39
# ##############################################################################
35
40
# Debs
You can’t perform that action at this time.
0 commit comments