def deploy_consul_binary(self):
""" Install the consul software """
log_green('deploying consul binary...')
with settings(
hide('stdout', 'running'),
host_string=self.host_string,
private_key_filename=self.private_key
):
apt_install(packages=['unzip'])
with cd('/usr/local/bin'):
if 'consul' not in sudo('ls /usr/local/bin'):
sudo(
'wget -c https://releases.hashicorp.com/consul/%s'
'/consul_%s_linux_amd64.zip' % (self.version,
self.version)
)
sudo('unzip *zip')
sudo('rm -f *.zip')
add_usr_local_bin_to_path()
评论列表
文章目录