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 c8d2060 commit 048ec31Copy full SHA for 048ec31
locksmith.py
@@ -1,7 +1,6 @@
1
from fabric.api import run, task
2
from fabric.utils import error
3
import fabric.contrib.files
4
-import util
5
6
etcd_cluster = 'http://etcd-1.management:4001'
7
locksmithctl = '/usr/bin/locksmithctl'
@@ -15,14 +14,12 @@ def check_locksmithctl():
15
14
@task
16
def status():
17
"""Get the status of locksmith"""
18
- util.use_random_host('class-etcd')
19
check_locksmithctl()
20
run("{0} -endpoint='{1}' status".format(locksmithctl, etcd_cluster))
21
22
23
24
def unlock(machine_name):
25
"""Unlock a machine with locksmith"""
26
27
28
run("{0} -endpoint='{1}' unlock '{2}'".format(locksmithctl, etcd_cluster, machine_name))
0 commit comments