Expect module not working

Can you show the output? What specific error messages are you getting?

the output does not show any error message, but it is just taking the first three responses and not the PUM response.

I would suspect it is not recognizing the third prompt. Try to simplify it. You don’t need the entire phrase, just the unique part of it. Also, might try adding

echo: yes

to see if that gives you any more details.

i tried with simplified script

the problem is after the fourth response of “Y” there is extraction of files and it takes time. Would this have any problem?

This is tough. Is there a directory that pops up when the installation is complete? You could add:

wait_for:
path: /peoplesoft

or just wait for a set period of time:

wait_for: timeout=600

Or may async is better?

  • name: Run bash file
    expect:
    async: 600
    poll: 10
    echo: yes
    command: ./linux/setup/psft-dpk-setup.sh
    responses:

Something like that might work?

It is showing the same exact error.

I think we need someone with more experience using expect. :frowning:
Oracle really needs to provide a method to supply all responses either on the command line or in a file so that this can run unattended. I’ve never used the expect module. So, I’m guessing at best.

Maybe try: Turn on debugging?

The notes in the expect module documentation state:

The expect module is designed for simple scenarios. For more complex needs, consider the use of expect code with the shell or script modules. (An example is part of the shell module documentation)

In the shell module, there is an example of running a command with expect. Since this is more complicated and involved, maybe you should try that path?