I need to implement openssl command pkcs12 in Ansible 2.4 The latest Ansible version provides a module called openssl_pkcs12, but how to implement this in Ansible 2.4? So far, I have tried to put this command in the action of openssl_certificate like this:
name: openssl create hostcertificate.key
openssl_certificate:
action: pkcs12
attributes: '"-nocerts" "-nodes"'
src: <path-to-certificate>.p12
path: <destination-path>.key
mode: '400'
state: present
But it throws "Unsupported paramaters for (openssl_certificate) module" error as this action is not supported by openssl_certificate module. How can I implement this for this version?
Moreover, I need to automate the following openssl command, so please review if there are any other mistakes I made in the above Ansible script:
openssl pkcs12 -nocerts -nodes -out <destination-path>.key -in <path-to-certificate>.p12
Thanks in advance