|
From: | Carlos García |
Subject: | Re: [Fab-user] Finding out which hosts are alive |
Date: | Wed, 16 Sep 2015 18:33:20 +0200 |
Check this out if you want to hide other kinds of output messages [http://docs.fabfile.org/en/1.10/usage/output_controls.html]fab DoTheUpdates --skip-bad-hosts --hide=warnings -H <comma-separated list of hosts>
--skip-bad-hosts (or env.skip_bad_hosts) doesn't seem to work for this. That is, using either (or both), DoTheUpdates says:That doesn't seem like "skipping". What else do I need to do here to make bad hosts skipped silently?
Warning: Timed out trying to connect to host2 (tried 1 time)
Underlying exception:
timed outOn Wed, Sep 16, 2015 at 12:52 AM, Carlos García <address@hidden> wrote:I think --skip-bad-hosts would do the work.Try:fab DoTheUpdates --skip-bad-hosts -H <comma-separated list of hosts>Regards2015-09-16 1:52 GMT+02:00 Paul Hoffman <address@hidden>:_______________________________________________--Paul HoffmanHow can I get the above code to work? Or if this is too much of a kludge, what is the proper way to have DoTheUpdates try a bunch of hosts but gracefully stop each time it can't log into one?Greetings. I want a script to do an update to all of the hosts that are alive, but not spend time on ones that aren't. I tried the following as a way of filling env.hosts:
@hosts("address@hidden", "address@hidden")
def PickHosts():
PickAttempt = run("echo")
if PickAttempt.succeeded:
(env.hosts).append(env.host_string)
print("Adding {}".format(env.host_string))
PickHosts()
def DoTheUpdates(): ...However, running this with a command line of "fab DoTheUpdates", prompts:
No hosts found. Please specify (single) host string for connection:
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user
[Prev in Thread] | Current Thread | [Next in Thread] |