feat ✨: Add Samba configuration to defaults/main.yml
Added Samba domain information and package installation to the defaults/main.yml template, allowing for easier setup of a Samba Active Directory Domain Controller. This change enables the use of Samba as an alternative to OpenLDAP for authentication purposes.
This commit is contained in:
@@ -21,7 +21,29 @@ addc_ip_network_prefix: "{{ addc_ansible_host.split('.')[:3] | join('.') }}"
|
||||
addc_ip_last_octet: "{{ addc_ansible_host.split('.')[-1] }}"
|
||||
addc_reverse_zone_name: "{{ addc_ip_network_prefix.split('.') | reverse | join('.') }}.in-addr.arpa"
|
||||
|
||||
samba_domain_info:
|
||||
realm: "{{ samba_realm | upper }}"
|
||||
domain: "{{ samba_domain | upper }}"
|
||||
server_role: "dc"
|
||||
dns_backend: "SAMBA_INTERNAL"
|
||||
adminpass: "{{ samba_admin_password }}"
|
||||
interfaces: "{{ samba_iface | default('eth0') }}"
|
||||
bind_interfaces_only: "yes"
|
||||
|
||||
samba_iface: eth0
|
||||
|
||||
samba_packages:
|
||||
- acl
|
||||
- attr
|
||||
- samba
|
||||
- winbind
|
||||
- libpam-winbind
|
||||
- libnss-winbind
|
||||
- krb5-config
|
||||
- krb5-user
|
||||
- dnsutils
|
||||
- python3-setproctitle
|
||||
# - smbclient
|
||||
|
||||
# template for /etc/resolv.conf
|
||||
location_internal_dns: 192.168.1.1
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
---
|
||||
- name: Install required packages
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- acl
|
||||
- attr
|
||||
- samba
|
||||
- winbind
|
||||
- libpam-winbind
|
||||
- libnss-winbind
|
||||
- krb5-config
|
||||
- krb5-user
|
||||
- dnsutils
|
||||
- python3-setproctitle
|
||||
# - smbclient
|
||||
name: "{{ samba_packages }}"
|
||||
state: latest
|
||||
|
||||
- name: Stop samba-ad-dc before provisioning (if running)
|
||||
|
||||
Reference in New Issue
Block a user