xoxys.ldap_proxy/tasks/setup.yml
Robert Kaussow 1fddc32819
All checks were successful
continuous-integration/drone/push Build is passing
fix slapd config file ownership
2021-02-04 23:47:01 +01:00

60 lines
1.5 KiB
YAML

---
- block:
- name: Install required packages
package:
name: "{{ item }}"
state: present
loop:
- openldap-servers
- openldap-clients
- name: Ensure base directories exists at '{{ ldap_proxy_base_dir }}'
file:
path: "{{ item }}"
state: directory
owner: root
group: ldap
mode: 0750
loop:
- "{{ ldap_proxy_base_dir }}"
- "{{ ldap_proxy_acl_file | dirname }}"
- name: Deploy environment file
template:
src: "etc/sysconfig/slapd.j2"
dest: "/etc/sysconfig/slapd"
owner: root
group: root
mode: 0600
notify: __slapd_restart
- name: Deploy config file to '{{ ldap_proxy_base_dir }}/slapd.conf'
template:
src: "etc/openldap/slapd.conf.j2"
dest: "{{ ldap_proxy_base_dir }}/slapd.conf"
owner: root
group: ldap
mode: 0640
notify: __slapd_restart
- name: Deploy access control file '{{ ldap_proxy_acl_file }}'
template:
src: "etc/openldap/slapd.access.j2"
dest: "{{ ldap_proxy_acl_file }}"
owner: root
group: ldap
mode: 0640
notify: __slapd_restart
- name: Deploy custom ldap schemas
copy:
src: "{{ item }}"
dest: "/etc/openldap/schema/{{ item | basename }}"
owner: root
group: ldap
mode: 0640
loop: "{{ ldap_proxy_custom_schemas }}"
notify: __slapd_restart
become: True
become_user: root