4

I use fabric to run an installer on remote host

def test(): run("sh /opt/foo.bin") The output looks like:

[user@remoteHost:22] out: PRESS TO CONTINUE:

..........

During the installation i need to press Enter several times and input some info. Are there any possibility to automate this operations (press and input text info) using Fabric?

1 Answers1

2

No, you're looking more for pxepect, but you can use this module and it's functionality inside fabric tasks. It's just that Fabric doesn't keep state, and also doesn't have functionality to interact with prompts in a scripted way. It expects the user to interact, in those cases.

Morgan
  • 4,143
  • 27
  • 35