mirror of
https://github.com/frappe/bench.git
synced 2025-01-24 15:38:25 +00:00
[fix] provision to specify bench name explicitly
This commit is contained in:
parent
ead5dbf9a6
commit
e360b0702a
@ -19,7 +19,7 @@
|
|||||||
hosts: localhost
|
hosts: localhost
|
||||||
vars:
|
vars:
|
||||||
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
|
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
|
||||||
bench_path: "/home/{{ ansible_user_id }}/frappe-bench"
|
bench_path: "/home/{{ ansible_user_id }}/{{ bench_name }}"
|
||||||
tasks:
|
tasks:
|
||||||
# setup frappe-bench
|
# setup frappe-bench
|
||||||
- include: includes/setup_bench.yml
|
- include: includes/setup_bench.yml
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Install MySQLdb in global env
|
|
||||||
pip: name=mysql-python version=1.2.5
|
|
||||||
become: yes
|
|
||||||
become_user: root
|
|
||||||
|
|
||||||
- name: Add configuration
|
|
||||||
template: src={{ mysql_config_template }} dest={{ mysql_conf_dir }}/frappe.cnf owner=root mode=0644
|
|
||||||
become: yes
|
|
||||||
become_user: root
|
|
||||||
|
|
||||||
- name: restart mysql linux
|
|
||||||
service: name=mysql state=restarted
|
|
||||||
become: yes
|
|
||||||
become_user: root
|
|
||||||
when: ansible_os_family == 'RedHat' or ansible_os_family == 'Debian'
|
|
||||||
|
|
||||||
- name: Set root Password
|
|
||||||
command: mysqladmin -u root password {{ mysql_root_password }}
|
|
||||||
become: yes
|
|
||||||
become_user: root
|
|
||||||
when: mysql_root_password is defined
|
|
||||||
# incase root password is already set
|
|
||||||
ignore_errors: yes
|
|
||||||
|
|
||||||
- name: add launchagents folder mac
|
|
||||||
file: path=~/Library/LaunchAgents state=directory
|
|
||||||
when: ansible_distribution == 'MacOSX'
|
|
||||||
|
|
||||||
- name: add mysql to mac startup
|
|
||||||
file: src=/usr/local/opt/mariadb/homebrew.mxcl.mariadb.plist path=~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist state=link force=yes
|
|
||||||
when: ansible_distribution == 'MacOSX'
|
|
||||||
|
|
||||||
- name: stop mysql mac
|
|
||||||
command: launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
|
|
||||||
when: ansible_distribution == 'MacOSX'
|
|
||||||
|
|
||||||
- name: start mysql mac
|
|
||||||
command: launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
|
|
||||||
when: ansible_distribution == 'MacOSX'
|
|
@ -103,6 +103,9 @@ def install_bench(args):
|
|||||||
|
|
||||||
branch = 'master' if args.production else 'develop'
|
branch = 'master' if args.production else 'develop'
|
||||||
extra_vars.update(branch=branch)
|
extra_vars.update(branch=branch)
|
||||||
|
|
||||||
|
bench_name = 'frappe-bench' if not args.bench_name else args.bench_name
|
||||||
|
extra_vars.update(bench_name=bench_name)
|
||||||
|
|
||||||
if args.develop:
|
if args.develop:
|
||||||
run_playbook('develop/install.yml', sudo=True, extra_vars=extra_vars)
|
run_playbook('develop/install.yml', sudo=True, extra_vars=extra_vars)
|
||||||
@ -364,6 +367,7 @@ def parse_commandline_args():
|
|||||||
# set passwords
|
# set passwords
|
||||||
parser.add_argument('--mysql-root-password', dest='mysql_root_password', help='Set mysql root password')
|
parser.add_argument('--mysql-root-password', dest='mysql_root_password', help='Set mysql root password')
|
||||||
parser.add_argument('--admin-password', dest='admin_password', help='Set admin password')
|
parser.add_argument('--admin-password', dest='admin_password', help='Set admin password')
|
||||||
|
parser.add_argument('--bench-name', dest='bench_name', help='Create bench with specified name. Default name is frappe-bench')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user