2015-07-16 22:48:46 +02:00
|
|
|
---
|
2018-03-01 18:24:35 +01:00
|
|
|
- name: Create a basic configuration via debconf
|
|
|
|
debconf: name=slapd question='{{ item.question }}' value='{{ item.value }}' vtype='{{ item.vtype }}'
|
|
|
|
with_items: '{{ slapd_debconf_params }}'
|
|
|
|
when: openldap_service_enabled
|
|
|
|
tags: [ 'ldap_server', 'ldap', 'ldap_conf' ]
|
|
|
|
|
2015-07-16 22:48:46 +02:00
|
|
|
- name: Install the openldap server packages
|
|
|
|
apt: name={{ item }} state={{ openldap_pkg_state }}
|
2016-03-10 16:53:35 +01:00
|
|
|
with_items: '{{ openldap_pkg_list }}'
|
2015-07-16 22:48:46 +02:00
|
|
|
tags: [ 'ldap_server', 'ldap' ]
|
|
|
|
|
|
|
|
- name: Ensure that the slapd service is enabled and running
|
|
|
|
service: name=slapd state=started enabled=yes
|
|
|
|
when: openldap_service_enabled
|
|
|
|
tags: [ 'ldap_server', 'ldap' ]
|
|
|
|
|
|
|
|
- name: Ensure that the slapd service is disabled and stopped
|
|
|
|
service: name=slapd state=stopped enabled=no
|
|
|
|
when: not openldap_service_enabled
|
|
|
|
tags: [ 'ldap_server', 'ldap' ]
|
|
|
|
|
|
|
|
|