Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
blog.robertelder.org
Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
1–10 of 106 posts
Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#2Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#3Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#4https://github.com/ianmiell/shutit/blob/master/README.md
Recently I used it to migrate an etcd cluster within OpenShift reproducibly:
https://medium.com/@zwischenzugs/migrating-an-openshift-etcd...
Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#5See also the Caius framework[4].
[1] http://shop.oreilly.com/product/9781565920903.do
[2] https://www.safaribooksonline.com/library/view/exploring-exp...
Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#6Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#7Expect is cool, I have used it in the past as well as the expect perl module, but in my opinion is always a suboptimal way to automate things. It's always better and more robust to have a proper interface to script things instead of relying on matching brittle text/regex responses and timers and such. Of course sometimes it's not possible, so expect comes in handy.
If you have a slave device over RS232, expect is probably your only option. But if that remote item is running sshd, you are way better off without expect.
Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#8I use pexpect as the basis of an automation framework I use a lot: https://github.com/ianmiell/shutit/blob/master/README.md Recently I used it to migrate an etcd cluster within OpenShift reproducibly: https://medium.com/@zwischenzugs/migrating-an-openshift-etcd...
Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#9You run autoexpect first to record what you want it to do on a dry run, then tidy up the generated expect script, then plug it into ansible as a raw task.
Granted this shouldn't be a problem in 2016 but some vendors are idiots. But thanks to expect my life is a little more comfortable :)
Re: Don Libes' Expect: A Surprisingly Underappreciated Unix Automation Tool
#10 brew install homebrew/dupes/expect
# find the expect/tcl path with this command
otool -L /usr/local/bin/expect
export TCLLIBPATH=/usr/local/Cellar/expect/5.45/lib
autoexpect