On 24.01.2019 18:33, mahikrishna1...@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

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b7d22ac12b602fdba78885830900e710%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to