Skip to content

Commit

Permalink
docs: fix certificates module options and examples (ansible-collectio…
Browse files Browse the repository at this point in the history
…ns#377)

##### SUMMARY

Closes ansible-collections#374 
Closes ansible-collections#375

##### ISSUE TYPE

- Docs Pull Request


##### COMPONENT NAME

hcloud_certificates
  • Loading branch information
jooola authored Oct 30, 2023
1 parent de1eed9 commit c491799
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions plugins/modules/hcloud_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
certificate:
description:
- Certificate and chain in PEM format, in order so that each record directly certifies the one preceding.
- Required if certificate does not exist.
- Required if certificate does not exist and I(type=uploaded).
type: str
private_key:
description:
- Certificate key in PEM format.
- Required if certificate does not exist.
- Required if certificate does not exist and I(type=uploaded).
type: str
domain_names:
description:
- Certificate key in PEM format.
- Required if certificate does not exist.
- Domains and subdomains that should be contained in the Certificate issued by Let's Encrypt.
- Required if I(type=managed).
type: list
default: [ ]
elements: str
Expand All @@ -70,20 +70,29 @@
- name: Create a basic certificate
hetzner.hcloud.hcloud_certificate:
name: my-certificate
certificate: ssh-rsa AAAjjk76kgf...Xt
private_key: ssh-rsa AAAjjk76kgf...Xt
certificate: -----BEGIN CERTIFICATE-----...
private_key: -----BEGIN PRIVATE KEY-----...
state: present
- name: Create a certificate with labels
hetzner.hcloud.hcloud_certificate:
name: my-certificate
certificate: ssh-rsa AAAjjk76kgf...Xt
private_key: ssh-rsa AAAjjk76kgf...Xt
certificate: -----BEGIN CERTIFICATE-----...
private_key: -----BEGIN PRIVATE KEY-----...
labels:
key: value
mylabel: 123
state: present
- name: Create a managed certificate
hetzner.hcloud.hcloud_certificate:
name: my-certificate
type: managed
domain_names:
- example.com
- www.example.com
state: present
- name: Ensure the certificate is absent (remove if needed)
hetzner.hcloud.hcloud_certificate:
name: my-certificate
Expand Down

0 comments on commit c491799

Please sign in to comment.