Add fileserver and ldapclient sls
This commit is contained in:
parent
1cf93b8f30
commit
b72b6c960d
8 changed files with 271 additions and 2 deletions
33
states/ldapclient/init.sls
Normal file
33
states/ldapclient/init.sls
Normal file
|
@ -0,0 +1,33 @@
|
|||
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'}
|
Loading…
Add table
Add a link
Reference in a new issue