ansible-role-ldap-client-co.../tasks/nslcd-deb.yml

41 lines
1.4 KiB
YAML

---
- name: Manage the nslcd installation and configuration
block:
- name: Install the packages required to enable the LDAP PAM authentication
apt: pkg={{ nslcd_deb_pkgs }} state=present cache_valid_time=1800
- name: Install the pam ldap configuration. We cannot use the debian tools, they are broken on ubuntu in non interactive mode
copy: src={{ item }} dest=/etc/pam.d/{{ item }}
with_items: '{{ nslcd_ldap_map_common }}'
notify:
- Restart the NSLCD service
- Restart the NSCD service
- name: Create the ldap-auth-config directory
file: dest=/etc/auth-client-config/profile.d state=directory
notify:
- Restart the NSLCD service
- Restart the NSCD service
- name: Install the ldap-auth-config file
copy: src=ldap-auth-config dest=/etc/auth-client-config/profile.d/ldap-auth-config
notify:
- Restart the NSLCD service
- Restart the NSCD service
- name: Install the nsswitch.conf file
copy: src=nsswitch.conf dest=/etc/nsswitch.conf
notify:
- Restart the NSLCD service
- Restart the NSCD service
- name: Install the nslcd configuration
template: src=nslcd.conf.j2 dest=/etc/nslcd.conf mode=0640 owner=root group=nslcd
notify:
- Restart the NSLCD service
- Restart the NSCD service
tags: [ 'ldap_client', 'nslcd', 'nslcd_conf' ]
when: nslcd_install | bool
tags: [ 'ldap_client', 'nslcd' ]