vn-ansible/roles/debian-guest/tasks/auth.yml

26 lines
566 B
YAML
Raw Normal View History

2024-10-16 15:53:15 +00:00
- 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"