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 }}"
6262# ##############################################################################
6363# Kolla configuration.
6464
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+
6576# Kolla base container image distribution. Options are "centos", "debian",
6677# "rocky", "ubuntu". Default is {{ os_distribution }}.
6778# kolla_base_distro:
@@ -430,11 +441,6 @@ kolla_build_customizations: "{{ kolla_build_customizations_common | combine(koll
430441# Dict mapping Kolla Dockerfile ARG names to their values.
431442kolla_build_args : {}
432443
433- # ##############################################################################
434- # Kolla platform architecture configuration.
435-
436- kolla_base_arch : " {{ 'aarch64' if stackhpc_cpu_arch == 'arm64' else stackhpc_cpu_arch }}"
437-
438444# ##############################################################################
439445# Kolla-ansible inventory configuration.
440446
Original file line number Diff line number Diff line change @@ -28,8 +28,13 @@ stackhpc_include_os_minor_version_in_repo_url: false
2828stackhpc_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' }}"
2929
3030# 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 }}"
3338
3439# ##############################################################################
3540# Debs
You can’t perform that action at this time.
0 commit comments