41 lines
898 B
YAML
41 lines
898 B
YAML
- name: Install SSL dependencies
|
|
package:
|
|
name: "{{ package }}"
|
|
state: present
|
|
loop:
|
|
- ssl-cert
|
|
- python3-openssl
|
|
loop_control:
|
|
loop_var: package
|
|
tags: selfsigned_install
|
|
|
|
- name: Create SSL config directories
|
|
file:
|
|
path: "{{ config_dir }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "755"
|
|
loop:
|
|
- "{{ acme_config_dir }}"
|
|
- "{{ acme_certs_dir }}"
|
|
- "{{ acme_csr_dir }}"
|
|
loop_control:
|
|
loop_var: config_dir
|
|
tags: selfsigned_install
|
|
|
|
- name: Create ACME private keys directory
|
|
file:
|
|
path: "{{ acme_keys_dir }}"
|
|
state: directory
|
|
owner: root
|
|
group: "{{ acme_ssl_group }}"
|
|
mode: "750"
|
|
tags: acme_install
|
|
|
|
- name: Install Self-Signed certificate for each domain
|
|
include_tasks: self_signed_domain.yml
|
|
loop: "{{ acme_config.domains }}"
|
|
loop_control:
|
|
loop_var: domain
|
|
label: "{{ domain.name }}" |