roles/nsswitch: Configure glibc name service
The *nsswitch* role can be used to configure the name service switch on glibc-based distributions, including Gentoo, Fedora, and CentOS. It is specifically focused on Active Directory authentication via Samba/Winbind.
This commit is contained in:
17
roles/nsswitch/tasks/main.yml
Normal file
17
roles/nsswitch/tasks/main.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
- name: load distribution-specific variables
|
||||
include_vars: '{{ item }}'
|
||||
with_first_found:
|
||||
- '{{ ansible_distribution }}.yml'
|
||||
- '{{ ansible_os_family }}.yml'
|
||||
- defaults.yml
|
||||
|
||||
- name: ensure nsswitch is configured
|
||||
template:
|
||||
src={{ item }}
|
||||
dest=/etc/nsswitch.conf
|
||||
mode=644
|
||||
owner=root
|
||||
group=root
|
||||
with_first_found:
|
||||
- '{{ ansible_distribution }}.nsswitch.conf.j2'
|
||||
- default.nsswitch.conf.j2
|
||||
Reference in New Issue
Block a user