slapd: listen on 127.0.0.1:389 by default

This commit is contained in:
Victor LABORIE 2017-12-18 18:05:37 +01:00
parent b90260ae28
commit b3ec1f09b6
2 changed files with 8 additions and 0 deletions

View file

@ -1,4 +1,5 @@
---
ldap_hostname: "{{ ansible_hostname }}"
ldap_listen: "ldap://127.0.0.1:389/"
ldap_domain: "{{ ansible_domain }}"
ldap_suffix: "dc={{ ldap_hostname }},dc={{ ldap_domain.split('.')[-2] }},dc={{ ldap_domain.split('.')[-1] }}"

View file

@ -8,6 +8,13 @@
- ldapvi
- shelldap
- name: change sldap listen ip:port
lineinfile:
dest: /etc/default/slapd
regexp: 'SLAPD_SERVICES=.*'
line: "SLAPD_SERVICES=\"{{ ldap_listen }}\""
notify: restart slapd
- name: "Is /root/.ldapvirc present ?"
stat:
path: /root/.ldapvirc