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
7509b85c
Commit
7509b85c
authored
Aug 11, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debian13
parent
38f7509d
Pipeline
#40070
failed with stage
in 3 minutes and 51 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
96 additions
and
35 deletions
+96
-35
tasks/apt-key.yml
tasks/apt-key.yml
+40
-0
tasks/docker-source.yml
tasks/docker-source.yml
+7
-6
tasks/kernel/Debian.yml
tasks/kernel/Debian.yml
+1
-1
tasks/kernel/xanmod.yml
tasks/kernel/xanmod.yml
+7
-6
tasks/nvidia-source.yml
tasks/nvidia-source.yml
+4
-3
tasks/pip.yml
tasks/pip.yml
+2
-0
tasks/railgun.yml
tasks/railgun.yml
+18
-10
tasks/utility.yml
tasks/utility.yml
+10
-2
templates/sources.list.j2
templates/sources.list.j2
+7
-7
No files found.
tasks/apt-key.yml
0 → 100644
View file @
7509b85c
# tasks/create_keyring.yml
# vars required:
# - name: 例如 "docker"
# - url: 例如 "https://download.docker.com/linux/debian/gpg"
-
name
:
apt_key {{ name }} -> Ensure /etc/apt/keyrings exists
become
:
true
file
:
path
:
/etc/apt/keyrings
state
:
directory
mode
:
"
0755"
-
name
:
apt_key {{ name }} -> Download key (armored or binary)
become
:
true
get_url
:
url
:
"
{{
url
}}"
dest
:
"
/etc/apt/keyrings/{{
name
}}.asc"
mode
:
"
0644"
register
:
key_download
-
name
:
apt_key {{ name }} -> Check if dearmored key exists
become
:
true
stat
:
path
:
"
/etc/apt/keyrings/{{
name
}}.gpg"
register
:
keyring_gpg
-
name
:
apt_key {{ name }} -> Dearmor key to .gpg (idempotent on change or first run)
become
:
true
command
:
>
gpg --dearmor
-o /etc/apt/keyrings/{{ name }}.gpg
/etc/apt/keyrings/{{ name }}.asc
when
:
key_download.changed or not keyring_gpg.stat.exists
-
name
:
apt_key {{ name }} -> Ensure key permissions
become
:
true
file
:
path
:
"
/etc/apt/keyrings/{{
name
}}.gpg"
state
:
file
mode
:
"
0644"
tasks/docker-source.yml
View file @
7509b85c
...
@@ -9,20 +9,21 @@
...
@@ -9,20 +9,21 @@
-
name
:
target distribution for non-sid
-
name
:
target distribution for non-sid
set_fact
:
set_fact
:
docker_distribution
:
'
{{
target_distribution
}}'
docker_distribution
:
'
{{
target_distribution
}}'
when
:
ansible_os_family == 'Debian' and ansible_distribution_release != 'sid' and target_distribution != '
bookworm
'
when
:
ansible_os_family == 'Debian' and ansible_distribution_release != 'sid' and target_distribution != '
trixie
'
-
name
:
target distribution for sid
-
name
:
target distribution for sid
set_fact
:
set_fact
:
docker_distribution
:
bookworm
docker_distribution
:
trixie
when
:
ansible_os_family == 'Debian' and (ansible_distribution_release == 'sid' or target_distribution == '
bookworm
')
when
:
ansible_os_family == 'Debian' and (ansible_distribution_release == 'sid' or target_distribution == '
trixie
')
-
name
:
Docker apt 源公钥
-
name
:
Docker apt 源公钥
become
:
true
include_tasks
:
./apt-key.yml
apt_key
:
vars
:
name
:
docker
url
:
'
{{mirror_docker}}/linux/{{
ansible_distribution|lower
}}/gpg'
url
:
'
{{mirror_docker}}/linux/{{
ansible_distribution|lower
}}/gpg'
when
:
ansible_os_family == 'Debian'
when
:
ansible_os_family == 'Debian'
-
name
:
Docker apt 源
-
name
:
Docker apt 源
become
:
true
become
:
true
copy
:
copy
:
content
:
'
deb
{{mirror_docker}}/linux/{{
ansible_distribution|lower
}}
{{
docker_distribution
}}
stable'
content
:
'
deb
[signed-by=/etc/apt/keyrings/docker.gpg]
{{mirror_docker}}/linux/{{
ansible_distribution|lower
}}
{{
docker_distribution
}}
stable'
dest
:
/etc/apt/sources.list.d/docker.list
dest
:
/etc/apt/sources.list.d/docker.list
when
:
ansible_os_family == 'Debian'
when
:
ansible_os_family == 'Debian'
-
name
:
docker yum 源
-
name
:
docker yum 源
...
...
tasks/kernel/Debian.yml
View file @
7509b85c
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
-
name
:
install kernel
-
name
:
install kernel
become
:
true
become
:
true
apt
:
apt
:
name
:
'
{{install_kernel_name}}
linux-base'
name
:
'
{{install_kernel_name}}
,
linux-base'
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
when
:
ansible_distribution_release != 'sid'
when
:
ansible_distribution_release != 'sid'
tasks/kernel/xanmod.yml
View file @
7509b85c
...
@@ -3,14 +3,15 @@
...
@@ -3,14 +3,15 @@
apt
:
apt
:
name
:
gnupg2
name
:
gnupg2
-
name
:
xanmod apt key
-
name
:
xanmod apt key
become
:
true
include_tasks
:
../apt-key.yml
apt_key
:
vars
:
url
:
'
https://dl.xanmod.org/gpg.key'
name
:
xanmod
url
:
https://dl.xanmod.org/gpg.key
-
name
:
xanmod apt source
-
name
:
xanmod apt source
become
:
true
become
:
true
apt_repositor
y
:
cop
y
:
repo
:
'
deb
http://deb.xanmod.org
releases
main'
content
:
'
deb
[signed-by=/etc/apt/keyrings/xanmod.gpg]
http://deb.xanmod.org
releases
main'
filename
:
xanmod-kernel
dist
:
/etc/apt/sources.list.d/xanmod-kernel.list
-
name
:
install xanmod kernel
-
name
:
install xanmod kernel
become
:
true
become
:
true
apt
:
apt
:
...
...
tasks/nvidia-source.yml
View file @
7509b85c
-
name
:
nvidia apt key
-
name
:
nvidia apt key
become
:
true
include_tasks
:
./apt-key.yml
apt_key
:
vars
:
name
:
nvidia
url
:
'
https://nvidia.github.io/libnvidia-container/gpgkey'
url
:
'
https://nvidia.github.io/libnvidia-container/gpgkey'
-
name
:
container runtime apt repo
-
name
:
container runtime apt repo
become
:
true
become
:
true
copy
:
copy
:
content
:
|
content
:
|
deb https://nvidia.github.io/libnvidia-container/stable/deb/$(ARCH) /
deb
[signed-by=/etc/apt/keyrings/nvidia.gpg]
https://nvidia.github.io/libnvidia-container/stable/deb/$(ARCH) /
dest
:
/etc/apt/sources.list.d/nvidia-container-runtime.list
dest
:
/etc/apt/sources.list.d/nvidia-container-runtime.list
tasks/pip.yml
View file @
7509b85c
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
-
'
3.10'
-
'
3.10'
-
'
3.11'
-
'
3.11'
-
'
3.12'
-
'
3.12'
-
'
3.13'
-
name
:
clean external managed flag
-
name
:
clean external managed flag
become
:
true
become
:
true
file
:
file
:
...
@@ -81,6 +82,7 @@
...
@@ -81,6 +82,7 @@
-
'
3.10'
-
'
3.10'
-
'
3.11'
-
'
3.11'
-
'
3.12'
-
'
3.12'
-
'
3.13'
-
name
:
upgrade pip
-
name
:
upgrade pip
become
:
true
become
:
true
pip
:
pip
:
...
...
tasks/railgun.yml
View file @
7509b85c
-
name
:
railgun
-
name
:
railgun (curl only status)
uri
:
command
:
url
:
https://m.lv5.ac/api/select
argv
:
method
:
'
POST'
-
curl
body_format
:
json
-
-sS
body
:
'
{{railgun}}'
-
-X
return_content
:
true
-
POST
status_code
:
-
-H
-
200
-
"
Content-Type:
application/json"
-
201
-
-d
-
"
{{
railgun
|
to_json
}}"
-
-o
-
/dev/null
-
-w
-
"
%{http_code}"
-
https://m.lv5.ac/api/select
register
:
railgun_result
changed_when
:
false
changed_when
:
false
failed_when
:
railgun_result.rc != 0 or (railgun_result.stdout | int not in [200, 201])
ignore_errors
:
true
ignore_errors
:
true
tasks/utility.yml
View file @
7509b85c
...
@@ -81,10 +81,18 @@
...
@@ -81,10 +81,18 @@
set_fact
:
set_fact
:
target_distribution
:
'
noble'
target_distribution
:
'
noble'
when
:
ansible_distribution == 'Ubuntu' and upgrade and not keep_distro and ansible_distribution_major_version|int <
24
when
:
ansible_distribution == 'Ubuntu' and upgrade and not keep_distro and ansible_distribution_major_version|int <
24
-
name
:
move to
bookworm
-
name
:
move to
trixie
set_fact
:
set_fact
:
target_distribution
:
'
bookworm
'
target_distribution
:
'
trixie
'
when
:
ansible_distribution == 'Debian' and upgrade and ansible_distribution_release != 'sid' and not keep_distro
when
:
ansible_distribution == 'Debian' and upgrade and ansible_distribution_release != 'sid' and not keep_distro
-
name
:
set Debian sources.list tail
set_fact
:
debian_sources_list_tail
:
main contrib non-free
when
:
ansible_distribution == 'Debian'
-
name
:
set Ubuntu sources.list tail for Debian >=
13
set_fact
:
debian_sources_list_tail
:
'
{{
debian_sources_list_tail
}}
non-free-firmware'
when
:
target_distribution == 'trixie'
-
name
:
系统源 (apt)
-
name
:
系统源 (apt)
become
:
true
become
:
true
template
:
template
:
...
...
templates/sources.list.j2
View file @
7509b85c
...
@@ -17,17 +17,17 @@ deb {{mirror_ubuntu_ports}}/ubuntu-ports {{ target_distribution }}-updates main
...
@@ -17,17 +17,17 @@ deb {{mirror_ubuntu_ports}}/ubuntu-ports {{ target_distribution }}-updates main
{% else %}
{% else %}
# Debian
# Debian
deb {{mirror_debian}}/debian {{ target_distribution }}
main contrib non-free
deb {{mirror_debian}}/debian {{ target_distribution }}
{{ debian_sources_list_tail }}
{% if target_distribution != 'sid' %}
{% if target_distribution != 'sid' %}
deb {{mirror_debian}}/debian {{ target_distribution }}-updates
main contrib non-free
deb {{mirror_debian}}/debian {{ target_distribution }}-updates
{{ debian_sources_list_tail }}
{% if target_distribution == 'bullseye' or target_distribution == 'bookworm' or target_distribution == 'testing' %}
{% if target_distribution == 'bullseye' or target_distribution == 'bookworm' or target_distribution == 't
rixie' or target_distribution == 't
esting' %}
deb {{mirror_debian_security}}/debian-security {{ target_distribution }}-security
main contrib non-free
deb {{mirror_debian_security}}/debian-security {{ target_distribution }}-security
{{ debian_sources_list_tail }}
{% else %}
{% else %}
deb {{mirror_debian_security}}/debian-security {{ target_distribution }}/updates
main contrib non-free
deb {{mirror_debian_security}}/debian-security {{ target_distribution }}/updates
{{ debian_sources_list_tail }}
{% endif %}
{% endif %}
deb {{mirror_debian}}/debian {{ target_distribution }}-backports
main contrib non-free
deb {{mirror_debian}}/debian {{ target_distribution }}-backports
{{ debian_sources_list_tail }}
{% else %}
{% else %}
deb {{mirror_debian}}/debian experimental
main contrib non-free
deb {{mirror_debian}}/debian experimental
{{ debian_sources_list_tail }}
{% endif %}
{% endif %}
{% 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