when I run below mentioned commands to generate RSA and csr in linux prompt , its require a password (Enter pass phrase for pradeep.key) and mention there "abc" password. Please do let me know how to capture this password in ansible script. When I mention -des3 then its require the password and its mandatory part.
1. openssl genrsa -des3 -out pradeep.key 2048 2. openssl req -new -key pradeep.key -out pradeepcsr.csr -config set.txt 3. openssl pkcs12 -export -out pradeep.p12 -inkey pradeep.key -in cert.pem Generating RSA private key, 2048 bit long modulus ...........................................................................+++ .....................................+++ e is 65537 (0x10001) Enter pass phrase for pradeep.key: Verifying - Enter pass phrase for pradeep.key: I mentioned below ansible script : command: openssl genrsa \ -des3 \ -out "/app/ex.key" 2048 command: openssl req \ -new \ -subj '/C=US/ST=Florida/L=atlanta View/O=xx/CN=abc' -key "/app/ex.key" \ -out "/app/ex.csr" Secondly, can we do this part with any ansible module, I tried with openssl_privatekey but its not cover all above details. -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.