anugram.cm_pki.cm_local_ca module – Create and manage CipherTrust Manager Local CA
Note
This module is part of the anugram.cm_pki collection (version 1.0.0).
To install it, use: ansible-galaxy collection install anugram.cm_pki
.
To use it in a playbook, specify: anugram.cm_pki.cm_local_ca
.
New in anugram.cm_pki 1.0.0
Synopsis
Create and edit local Certificate Authority on CipherTrust Manager
Parameters
Parameter |
Comments |
---|---|
RSA or ECDSA (default) algorithms are supported. Signature algorithm (SHA512WithRSA, SHA384WithRSA, SHA256WithRSA, SHA1WithRSA, ECDSAWithSHA512, ECDSAWithSHA384, ECDSAWithSHA256) is selected based on the algorithm and size. |
|
If set to true, the certificates signed by the specified CA can be used for client authentication. Choices:
|
|
If set to true, the certificates signed by the specified CA can be used for user authentication. Choices:
|
|
Common Name |
|
CSR in PEM format |
|
Parameters to be used during creating CSR like the subject, x509 extensions and signature algorithm used. |
|
Subject Alternative Names (SAN) values |
|
Duration in days of certificate. Either duration or notAfter date must be specified. |
|
E-mail addresses |
|
Private key encryption algorithm. Choices:
|
|
IP addresses |
|
Parameters to be used for creating an asymmetric key to be used for CSR creation. |
|
Type of the identifier, keyID, for the private key to be used for creating CSR. |
|
Parameters to be used for creating an asymmetric key to be used for CSR creation. |
|
Version of the private key, keyID, to be used for creating CSR. |
|
this holds the connection parameters required to communicate with an instance of CipherTrust Manager (CM) holds IP/FQDN of the server, username, password, and port |
|
admin password of CM |
|
CM Server IP or FQDN |
|
Port on which CM server is listening Default: |
|
internal or private IP of the CM Server, if different from the server_ip |
|
admin username of CM |
|
if SSL verification is required Choices:
|
|
A unique name of CA, if not provided, will be set to localca-<id>. |
|
Name fields |
|
End date of certificate. Either notAfter or duration must be specified. notAfter overrides duration if both are given. |
|
Start date of certificate |
|
Operation to be performed Choices:
|
|
Password to PEM-encrypt the private key. If not specified, the private key is not encrypted in return. |
|
Private Key bytes of the key which is to be used while creating CSR(Algorithm and size should be according to this key). If not given will generate key internally as per algorithm and size. |
|
server, client or ca |
|
Specify one of the reason. Choices:
|
|
CSR in PEM format |
Examples
- name: "Create CM Local CA"
anugram.cm_pki.cm_local_ca:
localNode:
server_ip: "IP/FQDN of CipherTrust Manager"
server_private_ip: "Private IP in case that is different from above"
server_port: 5432
user: "CipherTrust Manager Username"
password: "CipherTrust Manager Password"
verify: false
op_type: create
cn: local_ca_ansible
name: AnsibleLocalCA
algorithm: RSA
size: 4096
names:
- C: CA
ST: ontario
L: ottawa
O: ciphertrust
OU: test
register: ca
- name: Self sign the CA
anugram.cm_pki.cm_local_ca:
localNode:
server_ip: "IP/FQDN of CipherTrust Manager"
server_private_ip: "Private IP in case that is different from above"
server_port: 5432
user: "CipherTrust Manager Username"
password: "CipherTrust Manager Password"
verify: false
op_type: self-sign
id: "{{ ca['response']['id'] }}"
duration: 365
- name: Create CSR
anugram.cm_pki.cm_local_ca:
localNode:
server_ip: "IP/FQDN of CipherTrust Manager"
server_private_ip: "Private IP in case that is different from above"
server_port: 5432
user: "CipherTrust Manager Username"
password: "CipherTrust Manager Password"
verify: false
op_type: create-csr-key
cn: csr
name: AnsibleCSR
algorithm: RSA
size: 2048
ipAddresses:
- 10.1.1.10
names:
- C: CA
ST: ontario
L: ottawa
O: ciphertrust
OU: test
encryptionAlgo: AES256
register: csr
- name: Issue Certificate
anugram.cm_pki.cm_local_ca:
localNode:
server_ip: "IP/FQDN of CipherTrust Manager"
server_private_ip: "Private IP in case that is different from above"
server_port: 5432
user: "CipherTrust Manager Username"
password: "CipherTrust Manager Password"
verify: false
op_type: issue-cert
id: "{{ ca['response']['id'] }}"
csr: "{{ csr['response']['data']['csr'] }}"
purpose: server
duration: 365
name: AnsibleServerCert
register: cert