不在ansible中运行expect脚本

不在ansible中运行expect脚本

我的脚本是:

#!/usr/bin/expect 

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"
interact

当我正常运行时没有问题,但是当我使用ansible运行时却出现问题not apply

我的 Ansible 代码:

- name: -- run oracleasm-configuration.sh (oracleasm configure -i) --
  shell: |
    /root/oracleasm-configuration.sh

相关内容