Skip to content

Commit 727169f

Browse files
committed
Verify if puppet is installed before run bootstrap.py
1 parent ce071e5 commit 727169f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

fabfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ def provision(branch='master'):
161161
modules_path = os.path.join(puppet_path, 'modules')
162162
puppet_modules = '{}:/etc/puppet/modules'.format(modules_path)
163163

164+
if not exists('/usr/bin/puppet'):
165+
print(colors.red('Please install `puppet` before continue.'))
166+
return
167+
164168
with cd(puppet_path):
165169
run('sudo python bootstrap.py')
166170

@@ -169,10 +173,6 @@ def provision(branch='master'):
169173
else:
170174
cmd = '-e "include {}"'.format(APP_NAME)
171175

172-
if not exists('/usr/bin/puppet'):
173-
print(colors.red('Please install `puppet` before continue.'))
174-
return
175-
176176
sudo('puppet apply --modulepath={} {}'.format(puppet_modules, cmd))
177177

178178

0 commit comments

Comments
 (0)