On 13. april 2017 10:15, Know Your Tech wrote:
Running this command from renew.sh without ansible is interactive and
desirable
keytool -genkey -alias $1 -keyalg RSA -sigalg SHA256withRSA -keystore $2"/"
$1.jks -keysize 2048 < /dev/tty
Output:
keytool -genkey -alias mydom -keyalg RSA -sigalg SHA256withRSA -keystore /
tmp/moht/dump/mydom.jks -keysize 2048
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: test me
What is the name of your organizational unit?
[Unknown]: testing
What is the name of your organization?
[Unknown]: tester
What is the name of your City or Locality?
[Unknown]:
but when the same is triggered using ansible it does not prompt the same
way as it does above.
Can you please help explain and fix ?
Ansible can't be used in a interactive way like this.
What you can do is using the expect module to automatic answer the question.
An alterative is to use vars_prompt and specify the information on the
command line.
https://docs.ansible.com/ansible/playbooks_prompts.html
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2bb64e6b-1d91-b91d-b842-818dad4bbad8%40olstad.com.
For more options, visit https://groups.google.com/d/optout.