Probablyi need to describe my problem better.

I need to create a role which performs the following steps:

   1. Download prerequisites packages like telnet schroot and wget
   2. create the appropriate folder if does not exists
   3. download a couple of .rpm packages within this folder
   4. install these .rpm packages using yum
   5. start the service
   6. Perform some configuration

Now, i have completed all the steps till step 5, only step 6 is missing.

Step 6 is regarding an IBM command line interface configuration.
When i perform the manual configuration after all it has been installed, 
and the service up, i need to access to the CLI using the following 
command: 

*$ telnet 0 2200*

then a login prompt is shown:

login: username
password: password

here i need to set the default username and password. After that i get the 
following message:

****************************************************************
ATTENTION: Use care when making your selections for operational
modes. If you select an incorrect mode for your environment,
the only way to change an operational mode is to reinitialize
the appliance.

Press any key to continue.
****************************************************************

here i should press enter. Then a new password will be required so i need 
to write the new password the first time and repeat it another time.

i tried with the previous code but i get always the same error. Probably 
i'm not doing the right things in my playbook, do you have any suggestion?


On Wednesday, 15 November 2017 15:07:58 UTC+1, stefano...@nap-anywhere.com 
wrote:
>
> HI
>
> I created an ansble role which install on the target hosts IBM api connect 
> gateways software and enable the service.
> I would improve this role adding configuration steps.
>
> After the installation the APIC gateways need to be configured accessing 
> to a dedicated command line interface, the first access is made of the 
> following steps:
>
> $ telnet 0 2200      *//command to launch to access the CLI*
> Trying 0.0.0.0...
> Connected to 0.
> Escape character is '^]'.
> stefano2.prv
> Unauthorized access prohibited.
>
> login: user          *//here i need to write the username*
> Password: *****  *// as well as the password*
>
> ****************************************************************
> ATTENTION: Use care when making your selections for operational
> modes. If you select an incorrect mode for your environment,
> the only way to change an operational mode is to reinitialize
> the appliance.
>
> Press any key to continue.
> ****************************************************************
>
> I'm stuck here, i tried to add these lines:
>
>  * - name: Launch the CLI first time*
> *    expect:*
> *      command: telnet 0 2200*
> *      responses:*
> *        Question:*
> *          login: "user"*
> *          Password: "password"*
> *          Press any key to continue.: /bin/bash -c "echo"*
>
> Every time i try to run the role i gt this error at the end:
>
> *TASK [Launch the CLI first time] 
> *************************************************************************************************************************************************************************
> *fatal: [stefano3]: FAILED! => {"changed": false, "failed": true, "msg": 
> "The pexpect python module is required"}*
> *fatal: [stefano2]: FAILED! => {"changed": false, "failed": true, "msg": 
> "The pexpect python module is required"}*
> *        to retry, use: --limit @/etc/ansible/api_gateways/apigw.retry*
>
> Could you help me? 
> How can i answer to the "Press any key to continue"? 
>
> Or maybe there are further errors i did not get in the previous steps.
>
>
>

-- 
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/5896dea1-fa14-44e5-b7b2-04d7b34c5dc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to