mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-12-14 22:42:31 +00:00
28 lines
882 B
YAML
28 lines
882 B
YAML
|
# Copyright: (c) 2020, Hetzner Cloud GmbH <info@hetzner-cloud.de>
|
||
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||
|
|
||
|
- name: create a cert temp file
|
||
|
tempfile:
|
||
|
state: file
|
||
|
register: certificate_example_com
|
||
|
tags:
|
||
|
- prepare
|
||
|
- name: create a key temp file
|
||
|
tempfile:
|
||
|
state: file
|
||
|
register: certificate_example_com_key
|
||
|
tags:
|
||
|
- prepare
|
||
|
-
|
||
|
- name: generate certificate
|
||
|
shell: openssl req -nodes -new -x509 -keyout {{ certificate_example_com_key.path }} -out {{ certificate_example_com.path }} -subj "/C=DE/ST=Munich/L=Bavaria/O=Dis/CN=www.example.com"
|
||
|
tags:
|
||
|
- prepare
|
||
|
|
||
|
- name: set facts for future roles
|
||
|
set_fact:
|
||
|
certificate_example_com: "{{ lookup('file',certificate_example_com.path) }}"
|
||
|
certificate_example_com_key: "{{ lookup('file',certificate_example_com_key.path) }}"
|
||
|
tags:
|
||
|
- prepare
|