xoxys.ldap_proxy/tasks/setup.yml
Robert Kaussow 372cc1d23f
Some checks failed
continuous-integration/drone/pr Build is failing
enabled plus repo on rh-8
2022-02-12 11:58:30 +01:00

61 lines
1.5 KiB
YAML

---
- block:
- name: Install required packages
package:
name: "{{ item }}"
enablerepo: "{{ ldap_proxy_enablerepo }}"
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