Skip to content

Commit 3bdef1b

Browse files
authored
Merge pull request #1501 from swordqiu/hotfix/qj-online-rpm-repos
fix: online rpm repos
2 parents 8ee8872 + d228271 commit 3bdef1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1341
-775
lines changed

onecloud/roles/common/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
- primary_master_node_ip is defined
2626

2727
# onecloud/roles/common/tasks/
28-
- name: Import OS Arch tasks Common 6
28+
- name: "Import OS Arch tasks Common 6 ({{ ansible_distribution }} {{ ansible_distribution_major_version }} {{ ansible_architecture }})"
2929
include_tasks: "{{ item }}"
3030
with_first_found:
3131
- files:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- name: Include RedHat General Repo Init
3+
include_tasks: redhat-general-repo.yml
4+
5+
- name: To enable almalinux-crb.repo
6+
shell: |
7+
dnf config-manager --set-enabled crb
8+
become: true
9+
10+
- name: Include RedHat Family Common Tasks
11+
include_tasks: redhat.yml
12+

onecloud/roles/common/tasks/os/almalinux_8.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,6 @@
22
- name: Include RedHat General Repo Init
33
include_tasks: redhat-general-repo.yml
44

5-
- name: Enable {{ ansible_distribution }} Modules
6-
shell: dnf module enable -y "{{dnf_module}}"
7-
with_items:
8-
- "{{ dnf_modules }}"
9-
loop_control:
10-
index_var: item_index
11-
loop_var: dnf_module
12-
become: true
13-
when:
14-
- dnf_modules is defined
15-
165
- name: Include RedHat Family Common Tasks
176
include_tasks: redhat.yml
187

19-
- name: Ensure iptables for {{ ansible_distribution }}
20-
include_role:
21-
name: utils/build-iptables-legacy
22-
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
- name: Include RedHat General Repo Init
3+
include_tasks: redhat-general-repo.yml
4+
5+
- name: Include RedHat Family Common Tasks
6+
include_tasks: redhat.yml
7+

onecloud/roles/common/tasks/os/anolis_os_8.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,5 @@
2424
- name: Include RedHat General Repo Init
2525
include_tasks: redhat-general-repo.yml
2626

27-
- name: Enable {{ ansible_distribution }} Modules
28-
shell: dnf module enable -y "{{dnf_module}}"
29-
with_items:
30-
- "{{ dnf_modules }}"
31-
loop_control:
32-
index_var: item_index
33-
loop_var: dnf_module
34-
become: true
35-
when:
36-
- dnf_modules is defined
37-
3827
- name: Include RedHat Family Common Tasks
3928
include_tasks: redhat.yml
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- name: Include RedHat General Repo Init
3+
include_tasks: redhat-general-repo.yml
4+
5+
- name: To enable centos CRB repo
6+
shell: |
7+
dnf config-manager --set-enabled crb
8+
become: true
9+
10+
- name: Include RedHat Family Common Tasks
11+
include_tasks: redhat.yml
12+

onecloud/roles/common/tasks/os/centos_8.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
- name: Include RedHat General Repo Init
33
include_tasks: redhat-general-repo.yml
44

5+
- name: enable CentOS 8 Stream Vault repo
6+
shell: |
7+
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
8+
sed -i 's/#baseurl/baseurl/g' /etc/yum.repos.d/CentOS-*
9+
sed -i 's/mirror.centos.org/vault.centos.org/g' /etc/yum.repos.d/CentOS-*
10+
become: true
11+
512
- name: Enable {{ ansible_distribution }} Modules
613
shell: dnf module enable -y "{{dnf_module}}"
714
with_items:
@@ -16,7 +23,3 @@
1623
- name: Include RedHat Family Common Tasks
1724
include_tasks: redhat.yml
1825

19-
- name: Ensure iptables for {{ ansible_distribution }}
20-
include_role:
21-
name: utils/build-iptables-legacy
22-
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
- name: Include RedHat General Repo Init
3+
include_tasks: redhat-general-repo.yml
4+
5+
- name: Enable {{ ansible_distribution }} Modules
6+
shell: dnf module enable -y "{{dnf_module}}"
7+
with_items:
8+
- "{{ dnf_modules }}"
9+
loop_control:
10+
index_var: item_index
11+
loop_var: dnf_module
12+
become: true
13+
when:
14+
- dnf_modules is defined
15+
16+
- name: Include RedHat Family Common Tasks
17+
include_tasks: redhat.yml
18+
Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,6 @@
1-
- name: enable repo
2-
shell: |
3-
cat > /etc/yum.repos.d/yunion.repo <<EOF_MISC
4-
[yunion-repo-base]
5-
name=Packages for Yunion Multi-Cloud Platform -
6-
baseurl=https://iso.yunion.cn/kylin/{{ ansible_distribution_version |lower }}-{{ ansible_distribution_release | lower }}/base/{{ ansible_architecture }}
7-
sslverify=0
8-
failovermethod=priority
9-
enabled=1
10-
gpgcheck=0
11-
12-
[yunion-repo-updates]
13-
name=Yunion Bin Packages for Yunion Multi-Cloud Platform -
14-
baseurl=https://iso.yunion.cn/rpm-updates/{{ansible_architecture}}
15-
sslverify=0
16-
failovermethod=priority
17-
enabled=1
18-
gpgcheck=0
19-
EOF_MISC
20-
become: yes
21-
22-
- name: Update package list for {{ansible_distribution}} {{ansible_distribution_release}}
23-
set_fact:
24-
common_packages: "{{common_packages | difference(['docker-ce']) + ['docker']}}"
25-
when:
26-
- ansible_distribution_release == 'Lance'
1+
---
2+
- name: Include RedHat General Repo Init
3+
include_tasks: redhat-general-repo.yml
274

285
- name: Include RedHat Family Common Tasks
29-
include_tasks: redhat.yml
6+
include_tasks: redhat.yml
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
- name: Include RedHat General Repo Init
3+
include_tasks: redhat-general-repo.yml
4+
5+
- name: Include RedHat Family Common Tasks
6+
include_tasks: redhat.yml

0 commit comments

Comments
 (0)