You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run the task openssl_certificate in my ansible playbook with a vault encrypted ownca_privatekey_path-file I always get message Wrong passphrase provided for private key.
When I run the same command with a decrypted ownca_privatekey_path-file it works like it should.
I would expect that ansible decrypt my ownca_privatekey_path-file, but it seems something goes wrong.
- name: Generate an OpenSSL certificate signed with your own CA certificateopenssl_certificate:
path: /tmp/certs/internal.crtcsr_path: /tmp/certs/internal.csrownca_path: roles/ssl/files/ownca/MyCA.crtownca_privatekey_path: roles/ssl/files/ownca/MyCA.keyownca_privatekey_passphrase: "{{ SECRET_CA_PASSWORD }}"provider: ownca
EXPECTED RESULTS
I expect to accept the passphrase for the private key.
My current workaround is to save the privatekey content in a variable and use the parameter ownca_privatekey_content.
But I hope there is a better way ;-)
Longer answer: modules cannot un-vault. This is only possible for plugins. Some modules like copy do this by not being a real module, but an action plugin combined with a module. Most modules, including all in this collection, do not support vaulted files.
SUMMARY
When I try to run the task
openssl_certificate
in my ansible playbook with a vault encrypted ownca_privatekey_path-file I always get message Wrong passphrase provided for private key.When I run the same command with a decrypted ownca_privatekey_path-file it works like it should.
I would expect that ansible decrypt my ownca_privatekey_path-file, but it seems something goes wrong.
ISSUE TYPE
COMPONENT NAME
crypto.x509_certificate
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Debian bullseye
STEPS TO REPRODUCE
EXPECTED RESULTS
I expect to accept the passphrase for the private key.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: