gvasalt/states/ldapclient/init.sls

34 lines
834 B
Text
Raw Normal View History

2016-09-24 21:51:59 +02:00
ldapclient:
debconf.set:
- name: nslcd
- data:
'nslcd/ldap-base': {'type': 'string', 'value': '{{ pillar.get("ldap_base") }}'}
'nslcd/ldap-uris': {'type': 'string', 'value': '{{ pillar.get("ldap_uris") }}'}
pkg.installed:
- pkgs:
- ldap-utils
- nslcd
- libnss-ldapd
{% if 'ldap_auth' in pillar %}
- libpam-ldapd
{% endif %}
service.running:
- name: nslcd
- require:
- pkg: ldapclient
- debconf: nslcd
libnss-ldapd-reconfigure:
cmd.wait:
- name: dpkg-reconfigure --frontend=noninteractive libnss-ldapd
- require:
- pkg: ldapclient
- watch:
- debconf: libnss-ldapd-debconf
libnss-ldapd-debconf:
debconf.set:
- name: libnss-ldapd
- data:
'libnss-ldapd/nsswitch': {'type': 'multiselect', 'value': 'group, passwd'}