改由 cloud-init 声明 Ayatori 容器静态地址
- Terraform 写 cloud-init.network-config,地址从 records.yml 读取,与 AD DNS 同源 - 撤销 Ansible 直接改 netplan 的做法;镜像模板只在 create/copy 渲染 seed, 故两台空容器已用 -replace 重建 - 固定指纹已从上游 images: 下架,改从 local: 缓存创建 - sshd -t 前预建 /run/sshd:新装 24.04 只有 ssh.socket 运行,目录尚不存在 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -55,9 +55,11 @@
|
||||
register: container_sshd_write
|
||||
changed_when: true
|
||||
|
||||
# 24.04 新装时只有 ssh.socket 运行,/run/sshd 要等 ssh.service 的 RuntimeDirectory 才创建,
|
||||
# 缺它时 sshd -t 直接失败;按同样的 0755 预建(/run 为 tmpfs,不留持久状态)。
|
||||
- name: 校验 SSH 配置
|
||||
ansible.builtin.command:
|
||||
argv: [incus, exec, "local:{{ incus_container }}", --, /usr/sbin/sshd, -t]
|
||||
argv: [incus, exec, "local:{{ incus_container }}", --, sh, -c, install -d -m 0755 /run/sshd && exec /usr/sbin/sshd -t]
|
||||
changed_when: false
|
||||
|
||||
- name: 更新运行中的 SSH 配置
|
||||
|
||||
Reference in New Issue
Block a user