2018-12-01 00:31:11 +00:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Create tls folder structure
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
owner: root
|
2021-05-30 23:09:10 +00:00
|
|
|
group: ldap
|
2021-02-04 20:53:48 +00:00
|
|
|
mode: 0750
|
2018-12-01 00:31:11 +00:00
|
|
|
selevel: s0
|
|
|
|
serole: object_r
|
|
|
|
setype: slapd_cert_t
|
|
|
|
seuser: system_u
|
2019-09-18 15:23:35 +00:00
|
|
|
loop:
|
2018-12-01 00:31:11 +00:00
|
|
|
- "{{ ldap_proxy_tls_cert_path | dirname }}"
|
|
|
|
- "{{ ldap_proxy_tls_key_path | dirname }}"
|
2018-12-01 01:18:50 +00:00
|
|
|
- "{{ ldap_proxy_tls_ca_path | dirname }}"
|
2018-12-01 00:31:11 +00:00
|
|
|
|
2019-09-18 19:17:52 +00:00
|
|
|
- name: Copy certs and private key
|
2018-12-01 00:31:11 +00:00
|
|
|
copy:
|
|
|
|
src: "{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
2018-12-01 01:26:49 +00:00
|
|
|
owner: ldap
|
|
|
|
group: ldap
|
2018-12-01 00:31:11 +00:00
|
|
|
mode: "{{ item.mode }}"
|
|
|
|
selevel: s0
|
|
|
|
serole: object_r
|
|
|
|
setype: slapd_cert_t
|
|
|
|
seuser: system_u
|
2019-09-18 15:23:35 +00:00
|
|
|
loop:
|
2018-12-01 00:31:11 +00:00
|
|
|
- { src: "{{ ldap_proxy_tls_key_source }}", dest: '{{ ldap_proxy_tls_key_path }}', mode: '0600' }
|
2018-12-01 01:26:49 +00:00
|
|
|
- { 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' }
|
2018-12-01 00:31:11 +00:00
|
|
|
loop_control:
|
|
|
|
label: "{{ item.dest }}"
|
|
|
|
become: True
|
|
|
|
become_user: root
|