New in version 2.3.
- python-pyOpenSSL
parameter | required | default | choices | comments |
---|---|---|---|---|
force |
no |
|
Should the key be regenerated even it it already exists | |
path |
yes | Name of the file in which the generated TLS/SSL public key will be written. | ||
privatekey_path |
yes | Path to the TLS/SSL private key from which to genereate the public key. | ||
state |
no | present |
|
Whether the public key should exist or not, taking action if the state is different from what is stated. |
# Generate an OpenSSL public key. - openssl_publickey: path: /etc/ssl/public/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem # Force regenerate an OpenSSL public key if it already exists - openssl_publickey: path: /etc/ssl/public/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem force: True # Remove an OpenSSL public key - openssl_publickey: path: /etc/ssl/public/ansible.com.pem privatekey_path: /etc/ssl/private/ansible.com.pem state: absent
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
privatekey | Path to the TLS/SSL private key the public key was generated from | ['changed', 'success'] | string | /etc/ssl/private/ansible.com.pem |
filename | Path to the generated TLS/SSL public key file | ['changed', 'success'] | string | /etc/ssl/public/ansible.com.pem |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is community maintained without core committer oversight.
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.