1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

Add managed certs support (#72)

This commit is contained in:
Lukas Kämmerling 2021-04-06 11:59:59 +02:00 committed by GitHub
parent cf4b59257a
commit e16ae06ea3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 77 additions and 8 deletions

View file

@ -121,3 +121,29 @@
assert:
that:
- result is success
- name: test create managed certificate
hcloud_certificate:
name: "{{ hcloud_certificate_name }}"
domain_names:
- "{{ hcloud_dns_test_domain }}"
type: managed
labels:
HC-Use-Staging-CA: "true"
register: result
- name: test rename certificate
assert:
that:
- result is changed
- result.hcloud_certificate.name == "{{ hcloud_certificate_name }}"
- result.hcloud_certificate.domain_names[0] == "{{ hcloud_dns_test_domain }}"
- name: absent certificate
hcloud_certificate:
id: "{{ result.hcloud_certificate.id }}"
state: absent
register: result
- name: verify absent server
assert:
that:
- result is success