purestorage.flasharray.purefa_certs module – Manage FlashArray SSL Certificates
Note
This module is part of the purestorage.flasharray collection (version 1.24.0).
You might already have this collection installed if you are using the ansible
package.
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 purestorage.flasharray
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: purestorage.flasharray.purefa_certs
.
New in purestorage.flasharray 1.8.0
Synopsis
Create, delete, import and export FlashArray SSL Certificates
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.3
purestorage >= 1.19
py-pure-client >= 1.26.0
netaddr
requests
pycountry
packaging
Parameters
Parameter |
Comments |
---|---|
FlashArray API token for admin privileged user. |
|
Required for import A valid signed certicate in PEM format (Base64 encoded) Includes the “—–BEGIN CERTIFICATE—–” and “—–END CERTIFICATE—–” lines Does not exceed 3000 characters in length |
|
The fully qualified domain name (FQDN) of the current array For example, the common name for https://purearray.example.com is purearray.example.com, or *.example.com for a wildcard certificate This can also be the management IP address of the array or the shortname of the current array. Maximum of 64 characters If not provided this will default to the shortname of the array |
|
The two-letter ISO code for the country where your organization is located |
|
The number of valid days for the self-signed certificate being generated If not specified, the self-signed certificate expires after 3650 days. Default: |
|
The email address used to contact your organization |
|
Name of file to contain Certificate Signing Request when `status sign` Name of file to export the current SSL Certificate when `status export` File will be overwritten if it already exists |
|
FlashArray management IPv4 address or Hostname. |
|
Generate a new private key. If not selected, the certificate will use the existing key Choices:
|
|
Intermeadiate certificate provided by the CA |
|
If the Certificate Signed Request (CSR) was not constructed on the array or the private key has changed since construction the CSR, provide a new private key here |
|
The key size in bits if you generate a new private key Choices:
|
|
The full name of the city where your organization is located |
|
Name of the SSL Certificate Default: |
|
The department within your organization that is managing the certificate |
|
The full and exact legal name of your organization. The organization name should not be abbreviated and should include suffixes such as Inc, Corp, or LLC. |
|
Passphrase if the private key is encrypted |
|
The full name of the state or province where your organization is located |
|
Action for the module to perform present will create or re-create an SSL certificate absent will delete an existing SSL certificate sign will construct a Certificate Signing request (CSR) export will export the exisitng SSL certificate import will import a CA provided certificate. Choices:
|
Notes
Note
This module requires the
purestorage
andpy-pure-client
Python librariesAdditional Python librarues may be required for specific modules.
You must set
PUREFA_URL
andPUREFA_API
environment variables if fa_url and api_token arguments are not passed to the module directly
Examples
- name: Create SSL certifcate foo
purestorage.flasharray.purefa_certs:
name: foo
key_size: 4096
country: US
province: FL
locality: Miami
organization: "Acme Inc"
org_unit: "DevOps"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete SSL certificate foo
purestorage.flasharray.purefa_certs:
name: foo
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Request CSR
purestorage.flasharray.purefa_certs:
state: sign
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Request CSR with updated fields
purestorage.flasharray.purefa_certs:
state: sign
org_unit: Development
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Regenerate key for SSL foo
purestorage.flasharray.purefa_certs:
generate: true
name: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Import SSL Cert foo and Private Key
purestorage.flasharray.purefa_certs:
state: import
name: foo
certificate: "{{lookup('file', 'example.crt') }}"
key: "{{lookup('file', 'example.key') }}"
passphrase: password
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592