Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
86f98039
Unverified
Commit
86f98039
authored
Jul 30, 2024
by
Kay Yan
Committed by
GitHub
Jul 30, 2024
Browse files
Options
Downloads
Plain Diff
Merge pull request #11402 from tu1h/fix_centos_baserepo
Check CentOS-Base.repo exists for CentOS 7
parents
d469503e
351832ba
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/bootstrap-os/tasks/centos.yml
+18
-11
18 additions, 11 deletions
roles/bootstrap-os/tasks/centos.yml
with
18 additions
and
11 deletions
roles/bootstrap-os/tasks/centos.yml
+
18
−
11
View file @
86f98039
...
@@ -88,24 +88,31 @@
...
@@ -88,24 +88,31 @@
-
(ansible_distribution_version | float) <
9
-
(ansible_distribution_version | float) <
9
# CentOS 7 EOL at July 1, 2024.
# CentOS 7 EOL at July 1, 2024.
-
name
:
Disable CentOS 7 mirrorlist in CentOS-Base.repo
-
name
:
Check CentOS-Base.repo exists for CentOS
7
replace
:
stat
:
path
:
/etc/yum.repos.d/CentOS-Base.repo
path
:
/etc/yum.repos.d/CentOS-Base.repo
regexp
:
'
^mirrorlist='
register
:
centos_base_repo_stat
replace
:
'
#mirrorlist='
become
:
true
when
:
when
:
-
ansible_distribution_major_version == "7"
-
ansible_distribution_major_version == "7"
# CentOS 7 EOL at July 1, 2024.
# CentOS 7 EOL at July 1, 2024.
-
name
:
Update CentOS 7 CentOS-Base.repo
when
:
-
ansible_distribution_major_version == "7"
-
centos_base_repo_stat.stat.exists
become
:
true
block
:
-
name
:
Disable CentOS 7 mirrorlist in CentOS-Base.repo
replace
:
path
:
"
{{
centos_base_repo_stat.stat.path
}}"
regexp
:
'
^mirrorlist='
replace
:
'
#mirrorlist='
-
name
:
Update CentOS 7 baseurl in CentOS-Base.repo
-
name
:
Update CentOS 7 baseurl in CentOS-Base.repo
replace
:
replace
:
path
:
/etc/yum.repos.d/CentOS-Base.repo
path
:
"
{{
centos_base_repo_stat.stat.path
}}"
regexp
:
'
^#baseurl=http:\/\/mirror.centos.org'
regexp
:
'
^#baseurl=http:\/\/mirror.centos.org'
replace
:
'
baseurl=http:\/\/vault.centos.org'
replace
:
'
baseurl=http:\/\/vault.centos.org'
become
:
true
when
:
-
ansible_distribution_major_version == "7"
# CentOS ships with python installed
# CentOS ships with python installed
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment