添加 Gitea APT 仓库配置功能和完整文档系统
- 新增 gitea_repo_setup.yaml playbook 用于管理 Gitea APT 仓库 - 支持删除旧源、下载 GPG 密钥、配置新源和自动更新 APT 缓存 - 添加仓库配置架构文档和使用指南 - 采用部分参数化设计,支持自定义仓库 URL 和所有者
This commit is contained in:
38
llmdoc/guides/gitea-repo-configuration.md
Normal file
38
llmdoc/guides/gitea-repo-configuration.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# 如何配置 Gitea APT 仓库
|
||||
|
||||
## 前提条件
|
||||
|
||||
- 已安装 Ansible
|
||||
- 目标机器可访问互联网
|
||||
- 具有 sudo 权限
|
||||
|
||||
## 配置步骤
|
||||
|
||||
1. **准备清单文件**
|
||||
- 编辑 `inventory` 文件,添加目标主机
|
||||
```ini
|
||||
[gitea_hosts]
|
||||
your_target_host ansible_user=your_username
|
||||
```
|
||||
|
||||
2. **设置变量**
|
||||
在 `group_vars` 或 playbook 中定义必要变量:
|
||||
```yaml
|
||||
repo_url: "https://gitea.example.com/repo"
|
||||
repo_owner: "wangdefa"
|
||||
```
|
||||
|
||||
3. **执行 Playbook**
|
||||
```bash
|
||||
ansible-playbook -i inventory playbooks/gitea_repo_setup.yaml
|
||||
```
|
||||
|
||||
4. **验证配置**
|
||||
- 检查 `/etc/apt/sources.list.d/wangdefa.list`
|
||||
- 运行 `apt update` 验证源可用性
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 确保网络连接正常
|
||||
- 检查 GPG 密钥下载是否成功
|
||||
- 对于不同的 Linux 发行版可能需要调整
|
||||
Reference in New Issue
Block a user