1

We have our deployment script with fabric, and it has a list of hosts:

 env.hosts = ['services', 'w1zA', 'w1zB']

but we have 2 more servers that are on and off when there is more pressure.

So I want my hosts variable to be:

 env.hosts = ['services', 'w1zA', 'w1zB', 'w2zA', 'w2zB']

but now when I run the script when the extra servers are off, the deployment fails because it can't connect to those servers.

How can I skip failures if server is off?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Tzook Bar Noy
  • 11,337
  • 14
  • 51
  • 82
  • I think this is about `warn_only` setting, see http://stackoverflow.com/questions/3876936/how-to-continue-a-task-when-fabric-receives-an-error. – alecxe Mar 09 '15 at 14:14
  • yes I saw that... but I don't want to not fail on any reason, only where server is not live – Tzook Bar Noy Mar 09 '15 at 14:17

1 Answers1

2

You can use env.skip_bad_hosts = True option.

Here is documentation about it: http://docs.fabfile.org/en/latest/usage/env.html#skip-bad-hosts

Igor Korin
  • 166
  • 1
  • 4