mirror of
https://github.com/rocky-linux/infrastructure
synced 2024-11-11 00:11:25 +00:00
33 lines
1.3 KiB
YAML
33 lines
1.3 KiB
YAML
---
|
|
# This playbook is meant to be used with callable variables, like adhoc or AWX.
|
|
# What: Requests and signs a certificate from an IPA CA
|
|
# What is expected:
|
|
# -> getcert_name: Name of the certificate (FQDN)
|
|
# -> getcert_owner: what account owns the certificate files
|
|
# -> getcert_key: path to the certificate key
|
|
# -> getcert_cert: path to the certificate
|
|
# -> getcert_postcmd: command to run after a certificate renews
|
|
# -> getcert_chain: true/false, should cert and key be chained together
|
|
# -> getcert_chain_location: location for the chain
|
|
# TODO: Add CNAME/SAN support
|
|
|
|
- name: Request and sign an IPA Certificate
|
|
hosts: "{{ host }}"
|
|
become: true
|
|
vars:
|
|
ipa_getcert_requested_hostnames:
|
|
- name: "{{ getcert_name|default(ansible_fqdn) }}"
|
|
owner: "{{ getcert_owner|default(omit) }}"
|
|
key_location: "{{ getcert_key|default(omit) }}"
|
|
cert_location: "{{ getcert_cert|default(omit) }}"
|
|
nss_db_dir: "{{ getcert_nss_db_dir|default(omit) }}"
|
|
nss_nickname: "{{ getcert_nss_nickname|default(ansible_fqdn) }}"
|
|
postcmd: "{{ getcert_postcmd|default(omit) }}"
|
|
ipa_getcert_chain: "{{ getcert_chain|default(omit) }}"
|
|
ipa_getcert_chain_location: "{{ getcert_chain_location|default(omit) }}"
|
|
ipa_getcert_nss: "{{ getcert_nss|default(false) }}"
|
|
|
|
roles:
|
|
- role: rockylinux.ipagetcert
|
|
state: present
|