声明式管理 Proxmox API 对象与 Samba DNS 上游
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user