Created
January 27, 2024 09:15
-
-
Save meysam81/537a85b4265b2b340afdff75384b295e to your computer and use it in GitHub Desktop.
Creating the certificate for the CA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Generate CA private key | |
community.crypto.openssl_privatekey: | |
path: /etc/kubernetes/pki/ca.key | |
type: RSA | |
- name: Generate CA CSR to provide ALT names and other options | |
community.crypto.openssl_csr: | |
basicConstraints_critical: true | |
basic_constraints: | |
- CA:TRUE | |
common_name: kubernetes-ca | |
keyUsage_critical: true | |
key_usage: | |
- keyCertSign | |
- cRLSign | |
path: /etc/kubernetes/pki/ca.csr | |
privatekey_path: /etc/kubernetes/pki/ca.key | |
state: present | |
- name: Generate CA certificate | |
community.crypto.x509_certificate: | |
path: /etc/kubernetes/pki/ca.crt | |
privatekey_path: /etc/kubernetes/pki/ca.key | |
csr_path: /etc/kubernetes/pki/ca.csr | |
provider: selfsigned | |
state: present |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment