1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00
hetzner.hcloud/tests/integration/targets/setup_selfsigned_certificate/tasks/main.yml
Jonas L 86e476f961
test: fix linting error for integrations setup roles (#426)
##### SUMMARY

Fix ansible lint error for the integrations setup roles.
2023-12-15 15:25:20 +01:00

35 lines
1.2 KiB
YAML

---
- name: Create temporary file for test_certificate
ansible.builtin.tempfile:
suffix: "{{ hcloud_certificate_name }}"
register: _tmp_certificate_file
- name: Create certificate privatekey file
community.crypto.openssl_privatekey:
path: "{{ _tmp_certificate_file.path }}.key"
return_content: true
register: _certificate_privatekey_file
- name: Create certificate signing request file
community.crypto.openssl_csr:
privatekey_path: "{{ _tmp_certificate_file.path }}.key"
path: "{{ _tmp_certificate_file.path }}.csr"
country_name: DE
locality_name: Bavaria
state_or_province_name: Munich
organization_name: Dis
common_name: www.example.com
- name: Create certificate file
community.crypto.x509_certificate:
privatekey_path: "{{ _tmp_certificate_file.path }}.key"
csr_path: "{{ _tmp_certificate_file.path }}.csr"
path: "{{ _tmp_certificate_file.path }}.crt"
provider: selfsigned
return_content: true
register: _certificate_file
- name: Save certificate files content
ansible.builtin.set_fact:
test_certificate_privatekey_content: "{{ _certificate_privatekey_file.privatekey }}"
test_certificate_content: "{{ _certificate_file.certificate }}"