trfore.smallstep.step_cert role – Request x509 certificates from the step CA server and automatically renew them
Note
This role is part of the trfore.smallstep collection (version 1.1.2).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it use: ansible-galaxy collection install trfore.smallstep
.
To use it in a playbook, specify: trfore.smallstep.step_cert
.
Entry point certs
– Request x509 certificates from the step CA server
Synopsis
Request x509 certificates from the step CA server.
Parameters
Parameter |
Comments |
---|---|
List of dictionaries, certificates to request from the Step CA server. Default: |
|
Name for the local files - certificate, key, and systemd timer. Default: |
|
Time (RFC 3339) or Duration, i.e. `24h`. Note: This value cannot exceed the provisioners max duration. |
|
Folder to store x509 certificate. Default: |
|
Name of provisioner to use. Default: |
|
Subject Alternative Name (SAN) for the x509 certificate, useful for setting the host IP in the x509 certificate. Default: |
|
Additional SAN for the x509 certificate. |
|
Common name, DNS name, or IP address that will be set as the subject for the certificate, e.g. `client01.example.com`. Default: |
|
One-time token used to authenticate with the CA. |
Entry point main
– Request x509 certificates from the step CA server and automatically renew them
Synopsis
Request x509 certificates from the step CA server and automatically renew them.
The systemd renewal timers will attempt to restart the service that matches the `step_cert_list.name`. Thus, it is important to name the certificate after the service, e.g. set `step_cert_list.name = docker` for the `docker.service`.
Parameters
Parameter |
Comments |
---|---|
Step CA folder containing the CA configuration and root certificate. Default: |
|
Enable automatic renewal of certificate. Creates a systemd service and timer template, and configures `cert-renew@[step_cert_list.name].timer`. Choices:
|
Entry point renewal
– Create systemd timers to renew x509 certificates
Synopsis
This creates two systemd templates, `cert-renewer@.service` and `cert-renewer@.timer`.
For each certificate, a timer is created `cert-renewer@[step_cert_list.name].timer`. On the client server, view all timers with `$ systemctl list-timers | grep cert-renewer`.
Parameters
Parameter |
Comments |
---|---|
Attempt to restart the service that matches the certificate name, `step_cert_list.name`. Choices:
|