为 Ayatori 容器固定静态地址并发布 AD DNS
- dev 192.168.10.11、prod 192.168.10.12,位于 NEC IX DHCP 池之外 - 地址仅在 records.yml 声明一次,netplan 与 Samba DNS 同源读取 - 容器内禁用 cloud-init 网络模块,避免重启后回到 DHCP - dns.yml 扩展到 ayatori-dev / ayatori-prod 两条 A 记录 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
---
|
||||
- name: 准备 Ayatori 基础容器的 SSH 入口
|
||||
- name: 准备 Ayatori 基础容器的网络与 SSH 入口
|
||||
hosts: incus_hosts
|
||||
gather_facts: false
|
||||
# 静态地址与 AD DNS 记录同源,避免两处地址漂移。
|
||||
vars_files:
|
||||
- ../../dns/records.yml
|
||||
tasks:
|
||||
- name: 按容器协调静态地址
|
||||
ansible.builtin.include_tasks: tasks/container-network.yml
|
||||
loop: [ayatori-dev, ayatori-prod]
|
||||
loop_control:
|
||||
loop_var: incus_container
|
||||
|
||||
- name: 按容器协调 SSH
|
||||
ansible.builtin.include_tasks: tasks/container-ssh.yml
|
||||
loop: [ayatori-dev, ayatori-prod]
|
||||
|
||||
Reference in New Issue
Block a user