mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
added playbook for macos
This commit is contained in:
parent
2c97b35279
commit
9761cf3c79
69
installer/playbooks/macos_install.yml
Normal file
69
installer/playbooks/macos_install.yml
Normal file
@ -0,0 +1,69 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
vars:
|
||||
bench_repo_path: "/Users/{{ ansible_user_id }}/frappe/bench-repo"
|
||||
bench_path: "/Users/{{ ansible_user_id }}/frappe/frappe-bench"
|
||||
mysql_config_template: "templates/simple_mariadb_config.cnf"
|
||||
mysql_conf_dir:
|
||||
"CentOS": /etc/my.cnf.d
|
||||
"Ubuntu": /etc/mysql/conf.d
|
||||
"MacOSX": /usr/local/etc/my.cnf.d
|
||||
tasks:
|
||||
|
||||
- name: install prequisites
|
||||
homebrew: name={{ item }} state=present
|
||||
with_items:
|
||||
- cmake
|
||||
- redis
|
||||
- mariadb
|
||||
- nodejs
|
||||
- npm
|
||||
when: ansible_os_family == 'Darwin'
|
||||
- name: cask installs
|
||||
homebrew_cask: name={{ item }} state=present
|
||||
with_items:
|
||||
- wkhtmltopdf
|
||||
when: ansible_os_family == 'Darwin'
|
||||
|
||||
- name: Install MySQLdb in global env
|
||||
pip: name=mysql-python version=1.2.5
|
||||
become: yes
|
||||
become_method: sudo
|
||||
|
||||
- name: Set root Password
|
||||
mysql_user:
|
||||
name=root
|
||||
host={{ item }}
|
||||
password={{ mysql_root_password }}
|
||||
state=present
|
||||
login_user=root
|
||||
with_items:
|
||||
- localhost
|
||||
when: mysql_root_password is defined
|
||||
|
||||
- name: Add configuration
|
||||
template: src={{ mysql_config_template }} dest={{ mysql_conf_dir[ansible_distribution] }}/frappe.cnf owner=root mode=0644
|
||||
notify: restart mysql
|
||||
become: yes
|
||||
become_method: sudo
|
||||
|
||||
- name: clone bench
|
||||
git:
|
||||
repo=https://github.com/frappe/bench
|
||||
dest={{ bench_repo_path }}
|
||||
|
||||
- name: install bench
|
||||
pip: name={{ bench_repo_path }} extra_args='-e'
|
||||
become: yes
|
||||
become_method: sudo
|
||||
|
||||
- name: init bench
|
||||
command: bench init {{ bench_path }}
|
||||
args:
|
||||
creates: "{{ bench_path }}"
|
||||
|
||||
- name: install frappe app
|
||||
command: bench get-app frappe https://github.com/frappe/frappe
|
||||
args:
|
||||
creates: "{{ bench_path }}/apps/frappe"
|
||||
chdir: "{{ bench_path }}"
|
10
installer/playbooks/templates/simple_mariadb_config.cnf
Normal file
10
installer/playbooks/templates/simple_mariadb_config.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
[mysqld]
|
||||
innodb-file-format=barracuda
|
||||
innodb-file-per-table=1
|
||||
innodb-large-prefix=1
|
||||
character-set-client-handshake = FALSE
|
||||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_unicode_ci
|
||||
|
||||
[mysql]
|
||||
default-character-set = utf8mb4
|
Loading…
Reference in New Issue
Block a user