2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 16:36:25 +00:00

fix: ansible install on versioned pip

This commit is contained in:
Gavin D'souza 2020-01-15 13:36:32 +05:30
parent 7fb1484b7f
commit 71af7320f2

View File

@ -1,4 +1,5 @@
from bench.utils import exec_cmd from bench.utils import exec_cmd
from six import PY3
import click, sys, json import click, sys, json
import os import os
@ -57,7 +58,7 @@ def setup_production(user, yes=False):
# Install prereqs for production # Install prereqs for production
from distutils.spawn import find_executable from distutils.spawn import find_executable
if not find_executable('ansible'): if not find_executable('ansible'):
exec_cmd("sudo pip install ansible") exec_cmd("sudo {0} install ansible".format("pip3" if PY3 else "pip2"))
if not find_executable('fail2ban-client'): if not find_executable('fail2ban-client'):
exec_cmd("bench setup role fail2ban") exec_cmd("bench setup role fail2ban")
if not find_executable('nginx'): if not find_executable('nginx'):