This commit is contained in:
Pim Kunis 2023-04-25 16:47:58 +02:00
commit dc0a8aaeae
8 changed files with 770 additions and 0 deletions

19
tasks/main.yml Normal file
View file

@ -0,0 +1,19 @@
---
- name: Generate key pair
openssh_keypair:
path: "/etc/ssh/{{ ssh_ca_key_name }}"
type: "{{ ssh_ca_key_type }}"
comment: "{{ ssh_ca_key_comment }}"
register: key_pair
- name: Generate certificate
openssh_cert:
path: "/etc/ssh/{{ ssh_ca_key_name }}-cert.pub"
principals: "{{ ssh_ca_cert_principals }}"
public_key: "/etc/ssh/{{ ssh_ca_key_name }}.pub"
signature_algorithm: rsa-sha2-512
signing_key: "{{ role_path }}/files/{{ ssh_ca_signing_key }}"
type: "{{ ssh_ca_type }}"
valid_from: always
valid_to: forever