声明式管理 Proxmox API 对象与 Samba DNS 上游
yaml / yaml (pull_request) Failing after 25s
terraform / validate (pull_request) Successful in 57s
ansible / collection-test (pull_request) Successful in 1m34s
ansible / lint (pull_request) Successful in 4m1s

This commit is contained in:
2026-09-17 13:18:59 +00:00
parent 76ec49ff48
commit 54dd52f0ed
17 changed files with 294 additions and 106 deletions
@@ -0,0 +1,10 @@
---
- name: 更新 Samba DNS 转发器并校验配置
ansible.builtin.lineinfile:
path: /etc/samba/smb.conf
regexp: '^\s*dns forwarder\s*='
insertafter: '^\[global\]'
line: "\tdns forwarder = {{ samba_ad_dns_forwarder }}"
validate: '/usr/bin/testparm -s %s'
backup: true
notify: restart samba-ad-dc
@@ -87,6 +87,9 @@
creates: /var/lib/samba/private/sam.ldb
no_log: true # keep the admin password out of logs
- name: 持续管理已初始化域控的 DNS 上游
ansible.builtin.import_tasks: dns_forwarder.yml
- name: Install the generated krb5.conf system-wide
ansible.builtin.copy:
src: /var/lib/samba/private/krb5.conf