Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dylan W Wheeler
hpc-factory
Commits
5b96d551
Commit
5b96d551
authored
8 months ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
Use find since with_fileglob perform locally
parent
c5243949
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansible/roles/fix_centos_repo/tasks/main.yaml
+6
-2
6 additions, 2 deletions
ansible/roles/fix_centos_repo/tasks/main.yaml
with
6 additions
and
2 deletions
ansible/roles/fix_centos_repo/tasks/main.yaml
+
6
−
2
View file @
5b96d551
---
-
name
:
Get CentOS repo files
shell
:
ls /etc/yum.repos.d/CentOS-*
register
:
repo_files
-
name
:
Remove mirrorlist from CentOS repo files
ansible.builtin.replace
:
path
:
"
{{
item
}}"
regexp
:
'
^mirrorlist'
replace
:
'
#mirrorlist'
backup
:
yes
with_
fileglob
:
'
/etc/yum.repos.d/CentOS-*.repo'
with_
items
:
"
{{
repo_files.stdout_lines
}}"
-
name
:
Use vault baseurl to CentOS repo files
ansible.builtin.replace
:
...
...
@@ -13,4 +17,4 @@
regexp
:
'
^#baseurl=http://mirror.centos.org'
replace
:
'
baseurl=http://vault.centos.org'
backup
:
yes
with_
fileglob
:
'
/etc/yum.repos.d/CentOS-*.repo'
with_
items
:
"
{{
repo_files.stdout_lines
}}"
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