xoxys.ldap_proxy/tasks/setup.yml
Robert Kaussow 1edc1aae5f
All checks were successful
continuous-integration/drone/push Build is passing
feat: add test for Rocky Linux 8 (#1)
2022-02-12 13:34:44 +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