labsync/packer/ansible/roles/auth/tasks/ldap.yml

39 lines
782 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
- name: install ldap packages
apt:
name: "libnss-ldapd"
state: present
# TODO: remove this step and switch to Lets encrypt
- name: add ldap ca cert
copy:
src: ldapca.pem
dest: /etc/ssl/certs/ldapca.pem
- name: add ldap global config
template:
src: ldap.conf.j2
dest: /etc/ldap/ldap.conf
- name: configure nsswitch
copy:
src: nsswitch.conf
dest: /etc/nsswitch.conf
owner: root
group: root
mode: '0640'
- name: configure nslcd
template:
src: nslcd.conf.j2
dest: /etc/nslcd.conf
owner: root
group: root
mode: '0640'
notify: restart nslcd
- name: add pam config for automated creation of the home directory
copy:
src: mkhomedir
dest: /usr/share/pam-configs/mkhomedir
notify: update pam