From d8183de9b38a6a168609e2d4894232414414a07d Mon Sep 17 00:00:00 2001 From: shreyas Date: Wed, 18 May 2016 18:33:19 +0530 Subject: [PATCH] [Fix] Added new folder named production and moved production ansible script --- playbooks/install.py | 11 +++++------ .../setup_production.yml => production/install.yml} | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) rename playbooks/{develop/setup_production.yml => production/install.yml} (65%) diff --git a/playbooks/install.py b/playbooks/install.py index 74b5aa53..6894f8c3 100644 --- a/playbooks/install.py +++ b/playbooks/install.py @@ -66,7 +66,7 @@ def install_bench(args): if args.develop: run_playbook('develop/install.yml', sudo=True, extra_args=vars(args)) elif args.setup_production: - run_playbook('develop/setup_production.yml', sudo=True, extra_args=vars(args)) + run_playbook('production/install.yml', sudo=True, extra_args=vars(args)) def install_python27(): version = (sys.version_info[0], sys.version_info[1]) @@ -197,7 +197,7 @@ def run_playbook(playbook_name, sudo=False, extra_args=None): if sudo: args.extend(['--become', '--become-user=frappe']) - if extra_args.get('run_verbose'): + if extra_args.get('verbosity'): args.append('-vvvv') success = subprocess.check_call(args, cwd=os.path.join(bench_repo, 'playbooks')) @@ -220,10 +220,9 @@ def parse_commandline_args(): parser.add_argument('--site', dest='site', action='store', default='site1.local', help='Specifiy name for your first ERPNext site') - - # Hidden arguments to the argsparse - parser.add_argument('--run-verbose', dest='run_verbose', action='store_true', default=False, - help=argparse.SUPPRESS) + + parser.add_argument('--verbose', dest='verbosity', action='store_true', default=False, + help='Run the script in verbose mode') # To enable testing of script using Travis, this should skip the prompt parser.add_argument('--run-travis', dest='run_travis', action='store_true', default=False, diff --git a/playbooks/develop/setup_production.yml b/playbooks/production/install.yml similarity index 65% rename from playbooks/develop/setup_production.yml rename to playbooks/production/install.yml index 52448e70..a3fae22d 100644 --- a/playbooks/develop/setup_production.yml +++ b/playbooks/production/install.yml @@ -2,13 +2,13 @@ - hosts: localhost # Install the common pre-requisites for the setting up bench - - include: install.yml + - include: ../develop/install.yml # Install the production environment - - include: includes/setup_prod_env.yml + - include: ../develop/includes/setup_prod_env.yml # Setup Bench for production environment - - include: includes/setup_bench_production.yml + - include: ../develop/includes/setup_bench_production.yml # Setup SELinux Policy, Optional can be done later # - include: includes/setup_selinux_policy.yml