Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
init
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
init
Commits
02f7f77a
Commit
02f7f77a
authored
Aug 04, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update sources.list
parent
40f1c091
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
22 deletions
+27
-22
tasks/utility.yml
tasks/utility.yml
+10
-22
templates/sources.list.j2
templates/sources.list.j2
+17
-0
No files found.
tasks/utility.yml
View file @
02f7f77a
...
...
@@ -52,36 +52,24 @@
mirror_ubuntu
:
http://mirrors.tuna.tsinghua.edu.cn
mirror_ubuntu_security
:
http://mirrors.tuna.tsinghua.edu.cn
when
:
china_mirror
-
name
:
set facts for not upgrade
-
name
:
keep old distribution
set_fact
:
target_distribution
:
'
{{
ansible_distribution_release
}}'
when
:
not upgrade
and ansible_distribution_release !
= 'sid'
-
name
:
set facts for Ubuntu upgrade
when
:
not upgrade
or ansible_distribution_release =
= 'sid'
-
name
:
move to focal
set_fact
:
target_distribution
:
'
focal'
when
:
upgrade and ansible_distribution == 'Ubuntu'
-
name
:
set facts for Debian upgrade
when
:
ansible_distribution == 'Ubuntu' and upgrade
-
name
:
move to buster
set_fact
:
target_distribution
:
'
buster'
when
:
(upgrade or ansible_distribution_release == 'sid') and ansible_distribution == 'Debian
'
-
name
:
系统源 (
Debian
)
when
:
ansible_distribution == 'Debian' and upgrade and ansible_distribution_release != 'sid
'
-
name
:
系统源 (
apt
)
become
:
true
copy
:
content
:
|
deb {{mirror_debian}}/debian {{ target_distribution }} main contrib non-free
deb {{mirror_debian}}/debian {{ target_distribution }}-updates main contrib non-free
deb {{mirror_debian_security}}/debian-security {{ target_distribution }}/updates main contrib non-free
template
:
src
:
sources.list.j2
dest
:
/etc/apt/sources.list
when
:
ansible_distribution == 'Debian'
-
name
:
系统源 (Ubuntu)
become
:
true
copy
:
content
:
|
deb {{mirror_ubuntu}}/ubuntu/ {{ target_distribution }} main restricted universe multiverse
deb {{mirror_ubuntu_security}}/ubuntu/ {{ target_distribution }}-security main restricted universe multiverse
deb {{mirror_ubuntu}}/ubuntu/ {{ target_distribution }}-updates main restricted universe multiverse
dest
:
/etc/apt/sources.list
when
:
ansible_distribution == 'Ubuntu'
when
:
ansible_os_family == 'Debian'
-
name
:
clean some Debian packages
become
:
true
apt
:
...
...
templates/sources.list.j2
0 → 100644
View file @
02f7f77a
{% if ansible_distribution == 'Ubuntu' %}
deb {{mirror_ubuntu}}/ubuntu/ {{ target_distribution }} main restricted universe multiverse
deb {{mirror_ubuntu_security}}/ubuntu/ {{ target_distribution }}-security main restricted universe multiverse
deb {{mirror_ubuntu}}/ubuntu/ {{ target_distribution }}-updates main restricted universe multiverse
{% else %}
deb {{mirror_debian}}/debian {{ target_distribution }} main contrib non-free
{% if target_distribution != 'sid' %}
deb {{mirror_debian}}/debian {{ target_distribution }}-updates main contrib non-free
deb {{mirror_debian_security}}/debian-security {{ target_distribution }}/updates main contrib non-free
{% else %}
deb {{mirror_debian}}/debian experimantal main contrib non-free
{% endif %}
{% endif %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment