my script is :


set timeout 1

spawn /etc/init.d/oracleasm configure

expect "Default user to own the driver interface []:\r"
send -- "grid\r"
expect "Default group to own the driver interface []:\r"
send -- "asmadmin\r"
expect {Scan for Oracle ASM disks on boot (y/n) [y]:\r}
send -- "y\r"

When I run normally there is no problem, But when I run with an ansible does not apply.

my ansible code :

- name: -- run oracleasm-configuration.sh (oracleasm configure -i) --
  shell: |
  • how is interact going to work off on some presumably remote system? – thrig Oct 13 '18 at 15:19
  • take a look at sexpect with which you can write Expect scripts with shell code only. – pynexj Oct 15 '18 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.