Cluster script, handle branches better but default to master
This commit is contained in:
parent
4f3550f54b
commit
c2e908a25a
@ -67,6 +67,10 @@ def git_mini_mon(install_dir, branch=None, proxy=None):
|
||||
|
||||
if branch is not None:
|
||||
with cd(install_dir):
|
||||
with settings(hide('everything'), warn_only=True):
|
||||
branch_exists = sudo('git branch| grep %s' % branch)
|
||||
if branch_exists.failed:
|
||||
sudo('git branch {branch} origin/{branch}'.format(branch=branch))
|
||||
sudo('git checkout %s' % branch)
|
||||
|
||||
@task(default=True)
|
||||
|
@ -41,7 +41,7 @@ class SetupCluster(Task):
|
||||
The data bags in the cluster subdir should be properly setup for the environment before running.
|
||||
"""
|
||||
execute(install_deps)
|
||||
execute(git_mini_mon, self.mini_mon_dir, 'feature/cluster')
|
||||
execute(git_mini_mon, self.mini_mon_dir)
|
||||
|
||||
# download cookbooks
|
||||
with settings(hide('running', 'output', 'warnings'), warn_only=True):
|
||||
|
Loading…
x
Reference in New Issue
Block a user