22 lines
543 B
YAML
22 lines
543 B
YAML
|
- name: Install OpenSSL
|
||
|
zypper:
|
||
|
name: openssl
|
||
|
state: present
|
||
|
|
||
|
- name: Create SSL directory
|
||
|
file:
|
||
|
path: "{{ ssl_cert_path }}"
|
||
|
state: directory
|
||
|
owner: root
|
||
|
group: root
|
||
|
mode: '0755'
|
||
|
|
||
|
- name: Generate Self-Signed SSL Certificate
|
||
|
command: >
|
||
|
openssl req -x509 -nodes -days 365
|
||
|
-newkey rsa:2048
|
||
|
-keyout {{ ssl_cert_path }}/{{ ssl_key_file }}
|
||
|
-out {{ ssl_cert_path }}/{{ ssl_cert_file }}
|
||
|
-subj "{{ ssl_subject }}"
|
||
|
args:
|
||
|
creates: "{{ ssl_cert_path }}/{{ ssl_cert_file }}"
|