From 08bc61a53a018717bccad44a48bd6e1b2b9b0beb Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Thu, 7 May 2020 15:00:34 +0530 Subject: [PATCH] fix(playbooks): pre v5.1 compatibility for playbooks folder --- install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install.py b/install.py index cb8ecff8..31ee5ca9 100644 --- a/install.py +++ b/install.py @@ -359,7 +359,10 @@ def run_playbook(playbook_name, sudo=False, extra_vars=None): else: cwd = os.path.join(os.path.expanduser('~'), 'bench') - success = subprocess.check_call(args, cwd=os.path.join(cwd, 'bench', 'playbooks'), stdout=log_stream, stderr=sys.stderr) + playbooks_locations = [os.path.join(cwd, 'bench', 'playbooks'), os.path.join(cwd, 'playbooks')] + playbooks_folder = [x for x in playbooks_locations if os.path.exists(x)][0] + + success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr) return success