diff --git a/utils/baremetal.py b/utils/baremetal.py index 035400c..e451527 100644 --- a/utils/baremetal.py +++ b/utils/baremetal.py @@ -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) diff --git a/utils/cluster/__init__.py b/utils/cluster/__init__.py index 0ce1db3..c84c2a4 100644 --- a/utils/cluster/__init__.py +++ b/utils/cluster/__init__.py @@ -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):