xoxys.ldap_proxy/tasks/tls.yml
Robert Kaussow 6183c02f9c
Some checks failed
continuous-integration/drone/push Build is failing
fix: solve linting issues
2021-02-04 21:53:48 +01:00

38 lines
1.1 KiB
YAML

---
- block:
- name: Create tls folder structure
file:
path: "{{ item }}"
state: directory
owner: root
group: root
mode: 0750
selevel: s0
serole: object_r
setype: slapd_cert_t
seuser: system_u
loop:
- "{{ ldap_proxy_tls_cert_path | dirname }}"
- "{{ ldap_proxy_tls_key_path | dirname }}"
- "{{ ldap_proxy_tls_ca_path | dirname }}"
- name: Copy certs and private key
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: ldap
group: ldap
mode: "{{ item.mode }}"
selevel: s0
serole: object_r
setype: slapd_cert_t
seuser: system_u
loop:
- { src: "{{ ldap_proxy_tls_key_source }}", dest: '{{ ldap_proxy_tls_key_path }}', mode: '0600' }
- { src: "{{ ldap_proxy_tls_cert_source }}", dest: '{{ ldap_proxy_tls_cert_path }}', mode: '0640' }
- { src: "{{ ldap_proxy_tls_ca_source }}", dest: '{{ ldap_proxy_tls_ca_path }}', mode: '0640' }
loop_control:
label: "{{ item.dest }}"
become: True
become_user: root