expect script works while invoking individually but not as a salt state

前端 未结 1 1002
情书的邮戳
情书的邮戳 2021-01-27 19:45

I\'m trying to do scp as well as ssh through expect. Below script works if I invoke it directly from terminal like /usr/bin/expect myexpect.sh but when I ran it usi

相关标签:
1条回答
  • 2021-01-27 20:00

    I know nothing about salt-stack but I suspect it's not running your Expect script from a pty. So replace interact with expect eof (or expect -timeout 12345 eof if necessary). interact works only when stdin is on a tty/pty.

    0 讨论(0)
提交回复
热议问题