2
0
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:
Rushabh Mehta 2016-03-14 18:42:21 +05:30
parent 2c97b35279
commit 9761cf3c79
2 changed files with 79 additions and 0 deletions

View 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 }}"

View 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