I configured nginx installation and configuration (together with setup SSL certificates for https
site) via ansible. SSL certificates are under passphrases.
I want to write ansilbe task which is restarting nginx. The problem is the following.
Normally, nginx with https site inside asks for PEM pass phrase
during restart. Ansible doesn't ask for that passphrase during execution of playbook.
There is solution with storing decrypted cert and key in some private directory. But I don't really want to leave my cert and key somewhere unencrypted.
How to pass password to nginx (or to openssl) during restart via ansible
? Perfect scenario is following:
- Ansible is asking for SSL password (via
vars_promt
). Another option is to use ansible vault. - Ansible is restarting nginx, and when nginx is asking for
PEM pass phrase
, ansible is passing password to nginx.
Is it possible?