feat: 按 doc_id 重组 ansible/files 与验证框架
- ansible/files 改为与文档 XX-YY 对齐的目录结构,更新相关 playbook 路径 - 新增 scripts/verify.sh 与 ansible/playbooks/verify/*.yml,移除单体 verify-matrix.yml - 补充 docs/00-02 矩阵状态、00-05 验证框架与流程、00-04 环境与 ylc65 工作机说明 - 增加 k3s 存储准备、Longhorn、local-path 等 playbook 与辅助脚本 Made-with: Cursor
This commit is contained in:
@@ -1,4 +1,33 @@
|
||||
---
|
||||
- name: Verify /storage is a separate mount (optional)
|
||||
hosts: k3s_nodes
|
||||
become: true
|
||||
tasks:
|
||||
- name: Check / and /storage mount sources
|
||||
when: k3s_verify_storage_mount | default(false) | bool
|
||||
block:
|
||||
- name: Get mount source for /
|
||||
ansible.builtin.command: findmnt -n -o SOURCE /
|
||||
register: mnt_root
|
||||
changed_when: false
|
||||
|
||||
- name: Get mount source for /storage
|
||||
ansible.builtin.command: findmnt -n -o SOURCE /storage
|
||||
register: mnt_storage
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Assert /storage is mounted on a different device than /
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- mnt_storage.rc == 0
|
||||
- (mnt_root.stdout | trim | length) > 0
|
||||
- (mnt_storage.stdout | trim | length) > 0
|
||||
- (mnt_root.stdout | trim) != (mnt_storage.stdout | trim)
|
||||
fail_msg: >-
|
||||
/storage must be a mount point on a block device different from /.
|
||||
See docs/00-04-部署环境说明.md and docs/01-06-节点初始化-ansible-实践.md
|
||||
|
||||
- name: Init base system
|
||||
hosts: k3s_nodes
|
||||
become: true
|
||||
|
||||
Reference in New Issue
Block a user