File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
- from fabric .api import *
1
+ from fabric .api import sudo , task
2
2
3
3
4
4
@task
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ def fetch(self):
95
95
return
96
96
97
97
self .hosts = _fetch_hosts ()
98
+ self .roledefs ['disaster_recovery' ] = _fetch_hosts ('--dr-only' )
98
99
99
100
for host in self .hosts :
100
101
try :
@@ -311,6 +312,12 @@ def vdc(vdc_name):
311
312
env .hosts .extend (env .roledefs ['vdc-%s' % vdc_name ]())
312
313
313
314
315
+ @task
316
+ def disaster_recovery ():
317
+ """Select disaster recovery machines"""
318
+ env .hosts .extend (env .roledefs ['disaster_recovery' ]())
319
+
320
+
314
321
@task
315
322
@runs_once
316
323
def hosts ():
Original file line number Diff line number Diff line change @@ -60,13 +60,7 @@ def bodge_unicorn(name):
60
60
"""
61
61
Manually kill off (and restart) unicorn processes by name
62
62
63
- e.g. To kill off and restart contentapi on backend-1 in Preview:
64
-
65
- fab integration -H backend-1.backend vm.bodge_unicorn:contentapi
66
-
67
- ...or on all backend hosts in Preview:
68
-
69
- fab integration class:backend vm.bodge_unicorn:contentapi
63
+ e.g. vm.bodge_unicorn:contentapi
70
64
71
65
Yes. This is a bodge. Sorry.
72
66
"""
You can’t perform that action at this time.
0 commit comments