32 lines
850 B
YAML
32 lines
850 B
YAML
---
|
|
# Samba4 DC Installation Playbook
|
|
- name: Install and configure Samba4 Domain Controller
|
|
hosts: samba_servers
|
|
become: yes
|
|
gather_facts: yes
|
|
|
|
pre_tasks:
|
|
- name: Verify target server requirements
|
|
assert:
|
|
that:
|
|
- ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
|
|
- ansible_python_version is version('3.6', '>=')
|
|
fail_msg: "This playbook requires Debian/Ubuntu with Python 3.6+"
|
|
success_msg: "Server requirements verified"
|
|
|
|
roles:
|
|
- system
|
|
- nfs
|
|
- samba4-dc
|
|
|
|
post_tasks:
|
|
- name: Final verification
|
|
block:
|
|
- name: Display installation summary
|
|
debug:
|
|
msg:
|
|
- "Samba4 DC installation completed successfully!"
|
|
- "Domain: {{ samba_realm }}"
|
|
- "NetBIOS: {{ samba_domain }}"
|
|
|