From ab0e06eae668562d3b2c4518ed9e563ca8b5679f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=85=8E=E9=A5=BC?= Date: Thu, 16 Feb 2023 09:43:38 +0800 Subject: [PATCH] Fix CentOS Extras repo url for Oracle Linux 7 aarch64 (#9791) --- roles/bootstrap-os/tasks/bootstrap-centos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/bootstrap-os/tasks/bootstrap-centos.yml b/roles/bootstrap-os/tasks/bootstrap-centos.yml index 007fdce22..19555005a 100644 --- a/roles/bootstrap-os/tasks/bootstrap-centos.yml +++ b/roles/bootstrap-os/tasks/bootstrap-centos.yml @@ -79,7 +79,7 @@ - { option: "name", value: "CentOS-{{ ansible_distribution_major_version }} - Extras" } - { option: "enabled", value: "1" } - { option: "gpgcheck", value: "0" } - - { option: "baseurl", value: "http://mirror.centos.org/centos/{{ ansible_distribution_major_version }}/extras/$basearch/{% if ansible_distribution_major_version|int > 7 %}os/{% endif %}" } + - { option: "baseurl", value: "http://mirror.centos.org/{{ 'altarch' if (ansible_distribution_major_version | int) <= 7 and ansible_architecture == 'aarch64' else 'centos' }}/{{ ansible_distribution_major_version }}/extras/$basearch/{% if ansible_distribution_major_version|int > 7 %}os/{% endif %}" } when: - use_oracle_public_repo|default(true) - '''ID="ol"'' in os_release.stdout_lines'