Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c34ce3 commit 10e22cfCopy full SHA for 10e22cf
locksmith.py
@@ -1,13 +1,16 @@
1
from fabric.api import run, task
2
+import util
3
4
etcd_cluster = 'http://etcd-1.management:4001,http://etcd-2.management:4001,http://etcd-3.management:4001'
5
6
@task
7
def status():
8
"""Get the status of locksmith"""
9
+ util.use_random_host('class-etcd')
10
run("/usr/bin/locksmithctl -endpoint='{0}' status".format(etcd_cluster))
11
12
13
def unlock(machine_name):
14
"""Unlock a machine with locksmith"""
15
16
run("/usr/bin/locksmithctl -endpoint='{0}' unlock '{1}'".format(etcd_cluster, machine_name))
0 commit comments