26 lines
566 B
YAML
26 lines
566 B
YAML
- name: Install packages
|
|
apt:
|
|
name: nslcd
|
|
state: present
|
|
- name: Configure NSLCD
|
|
template:
|
|
src: nslcd.conf
|
|
dest: /etc/nslcd.conf
|
|
owner: root
|
|
group: nslcd
|
|
mode: '0640'
|
|
notify:
|
|
- restart-nslcd
|
|
register: nslcd
|
|
- name: Configure nsswitch to use NSLCD
|
|
lineinfile:
|
|
dest: /etc/nsswitch.conf
|
|
regexp: "{{item.regexp}}"
|
|
line: "{{item.line}}"
|
|
state: present
|
|
with_items:
|
|
- regexp: "^passwd:"
|
|
line: "passwd: files systemd ldap"
|
|
- regexp: "^group:"
|
|
line: "group: files systemd ldap"
|