On 14.05.2018 20:31, ZillaYT wrote:
This helped some, but brought up the next issue.
The keytool command has multiple multi-lined prompts, with "[Unknown]"
as
the second line, so if I do this
tasks:
- name: Test expect
expect:
timeout: 5
echo: yes
command: keytool -genkey -alias tomcat -keyalg RSA -sigalg
SHA1withRSA -keysize 2048 -keystore keystore.jks
responses:
"Enter keystore password": "changeit"
"Re-enter new password": "changeit"
\[Unknown\]: "{{ cname }}"
\[Unknown\]: "EngIT"
\[Unknown\]: "{{ company }}"
\[Unknown\]: "RTP"
\[Unknown\]: "NC"
\[Unknown\]: "US"
I saw you did make it work, but to answer this for the future.
The responses is often call question and answers, you can only have one
uniq question but many answer, and the answers must be in a list like so
- name: Test expect
expect:
timeout: 5
echo: yes
command: keytool -genkey -alias tomcat -keyalg RSA -sigalg
SHA1withRSA -keysize 2048 -keystore keystore.jks
responses:
"Enter keystore password": "changeit"
"Re-enter new password": "changeit"
\[Unknown\]:
- "{{ cname }}"
- "EngIT"
- "{{ company }}"
- "RTP"
- "NC"
- "US"
--
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/73d902b7a1276178242c3f23ef890e22%40olstad.com.
For more options, visit https://groups.google.com/d/optout.