I wish to have the ability to programmatically produce a new cloud server, after which pass the brand new email@example.com into additional Fabric instructions to operate other setup scripts.
I can produce the server, grab the appropriate variables, and initiate a nearby('ssh firstname.lastname@example.org') command to include the brand new IP to my known hosts file. However, no matter however attempt to pass the string 'email@example.com' to Fabric, still it presents me with:
No hosts found. Please specify (single) host string for connection:
I've attempted a variety of string manipulation, for example:
env.host = '%s' % host
env.hosts = [host]
env.host = str(host)
However, Fabric always presents me using the "No hosts found" prompt. Basically copy caused by 'print host', that actually works fine. Granted, not really a huge hurdle however , stops working the entire auto-rollout approach I'm attempting to take.
Has anybody been effective in passing a env.host/hosts declaration to Fabric utilizing a variable?