7c632352a0
The behaviour of the `include` module is badly defined (it try to choose between statically importing the tasks and dynamically including them) and can cause problems depending on any number of constraints (mostly if it choose the wrong behaviour). Replace it with the `import_tasks` (always statically import tasks) unless the `include` is in a loop in which case we replace it with `include_tasks` (always dynamically include tasks).
27 lines
557 B
YAML
27 lines
557 B
YAML
- name: LDAP packages are installed
|
|
apt:
|
|
name:
|
|
- slapd
|
|
- ldap-utils
|
|
- ldapvi
|
|
- shelldap
|
|
state: present
|
|
update_cache: yes
|
|
|
|
- name: change slapd listen ip:port
|
|
lineinfile:
|
|
dest: /etc/default/slapd
|
|
regexp: 'SLAPD_SERVICES=.*'
|
|
line: "SLAPD_SERVICES=\"{{ ldap_listen }}\""
|
|
notify: restart slapd
|
|
|
|
- name: ldapvirc file
|
|
import_tasks: ldapvirc.yml
|
|
|
|
- name: nagios config file for LDAP
|
|
import_tasks: nagios.yml
|
|
|
|
- name: initialize database
|
|
import_tasks: init.yml
|
|
when: not root_ldapvirc_path.stat.exists
|