mahdi22.linux_joindomain
linux_joindomain
This is an Ansible role that helps automatically connect CentOS and Red Hat Linux machines to a domain using SSSD, Realm, Samba, and Winbind. It has been tested on Red Hat/CentOS versions 7.x, 8.x, and 6.6, as well as Ubuntu versions 24, 22, 20, 18, 16, and Debian versions 10 and 9.
Requirements
- The
source.list
should be set up and updated for Debian servers. - Ansible version must be 2.7 or higher.
Installation
Run the following command to install the role:
ansible-galaxy install mahdi22.linux_joindomain
Role Configuration
In the defaults/main.yml
file, you can set the following variable:
# Set to True if the managed hosts are behind a web proxy. Default is False.
use_proxy: False
You can also configure proxy environment variables in the same file. For example:
proxy_env:
http_proxy: http://proxy.local:8080/
https_proxy: http://proxy.local:8080/
Role Variables
In the vars/main.yml
file, set these variables:
Join_User: ADMDOMAIN # Change ADMDOMAIN to the domain admin username
DomainName: linuxlab.local # Change linuxlab.local to your domain name
Join_User_Pass: admdomainpassword # Change admdomainpassword to the domain admin password
realm: LINUXLAB.LOCAL # Replace with your domain name
server: linuxlab.local # Replace with your Active Directory server
In the vars/RedHat-6.yml
file, set these variables:
workgroup: LAB # Change LAB to your workgroup name
kdc:
- kerberos-1.linuxlab.local:88 # Replace with your first Kerberos server name
- kerberos-2.linuxlab.local:88 # Replace with your second Kerberos server name
- kerberos-3.linuxlab.local:88 # Replace with your third Kerberos server name
domain_realms:
- .linuxlab.local # Replace with your domain name
- linuxlab.local # Replace with your domain name
fallback_homedir: '/home/%u'
use_fully_qualified_names: False
Example Playbook
Here is an example playbook to use the role:
- hosts: servers
roles:
- role: mahdi22.linux_joindomain
become: yes
Testing
This role has been tested on the following Linux distributions:
- RHEL/CentOS 8
- RHEL/CentOS 7
- RHEL/CentOS 6
- Debian 10
- Debian 9
- Debian 8
- Ubuntu 24.04
- Ubuntu 22.04
- Ubuntu 20.04
- Ubuntu 19.10
- Ubuntu 18.04
- Ubuntu 16.04
Informazioni sul progetto
Join Domain Active Directory using sssd for RedHat, CentOS, Debian, Ubuntu distributions and using samba winbind for Redhat/CentOS 6
Installa
ansible-galaxy install mahdi22.linux_joindomain
Licenza
apache-2.0
Download
4k
Proprietario