Re: [ansible-project] Ansible-Expect command issue

14 views
Skip to first unread message
Message has been deleted

Kai Stian Olstad

unread,
Jan 24, 2019, 1:44:52 PM1/24/19
to ansible...@googlegroups.com
On 24.01.2019 18:33, mahikri...@gmail.com wrote:
> We are trying to automate Vault creation(internal component) and
> initialization using ansible scripts but we are facing issue in expect
> module
>
>
>
>
> expect module responses are not getting the inputs given. Below is the
> script which I have tried and error I am facing. Please let me know if
> you
> know any solution for the same.
>
>
>
> changed: [192.168.33.10] => {
>
> "changed": true,
>
> "cmd": "sh /opt/vcs/cegp/security-tools/bin/vaultsecurity.sh",
>
> "delta": "0:00:01.102558",
>
> "end": "2019-01-23 20:25:39.840327",
>
> "invocation": {
>
> "module_args": {
>
> "chdir": null,
>
> "command": "sh
> /opt/vcs/cegp/security-tools/bin/vaultsecurity.sh",
>
> "creates": null,
>
> "echo": false,
>
> "removes": null,
>
> "responses": {
>
> "Enter Attribute Name": "mongoPassword",
>
> "Enter Attribute value": "pwd",
>
> "Enter Attribute value again": "pwd ",
>
> "Enter Keystore Alias": "pdspKeystoreAlias",
>
> "Enter Keystore URL":
> "/opt/vcs/pds/ds-api-query/security/pdsp.keystore",
>
> "Enter Keystore password": "pdsp",
>
> "Enter Keystore password again": "pdsp",
>
> "Enter Vault Block": "pdspBlock",
>
> "Enter directory to store encrypted files":
> "/opt/vcs/pds/ds-api-query/security",
>
> "Please enter a Digit": "5",
>
> "Would you like to autogenerate the key value (Y/N)?":
> "N",
>
> "Would you like to create a new key file (Y/N)?": "y"

You need to show us the task, this output is not enough.
My suspicion is that you have multiple equal keys in your response lik
"Please enter a Digit", that is not allowed and you would need to make
them one key with a list of all the values/answers.

--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages