34 lines
980 B
YAML
34 lines
980 B
YAML
---
|
|
- block:
|
|
- name: Create tls folder structure
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: 700
|
|
with_items:
|
|
- "{{ ucs_tls_certs_dir }}"
|
|
- "{{ ucs_tls_key_dir }}"
|
|
|
|
- name: Copy certs and private key
|
|
copy:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
mode: "{{item.mode }}"
|
|
with_items:
|
|
- { src: "{{ ucs_tls_key_path }}", dest: "{{ ucs_tls_certs_dir }}/ucs.pem", mode: '0600' }
|
|
- { src: "{{ ucs_tls_cert_path }}", dest: "{{ ucs_tls_key_dir }}/ucs.pem", mode: '0750' }
|
|
loop_control:
|
|
label: "{{ item.dest }}"
|
|
notify: __ucs_apache_restart
|
|
|
|
- name: Set necessary ucr vars
|
|
ucr:
|
|
path: "{{ item.path }}"
|
|
value: "{{ item.value }}"
|
|
with_items:
|
|
- { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" }
|
|
- { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" }
|
|
notify: __ucs_apache_restart
|
|
become: True
|
|
become_user: root
|