mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
Merge pull request #544 from codingCoffee/mariadb_localhost_ubuntu
fix for ubuntu and centOS
This commit is contained in:
commit
290db76826
@ -12,8 +12,6 @@
|
||||
- name: move /tmp/.bench if it exists
|
||||
command: 'cp -R /tmp/.bench {{ bench_repo_path }}'
|
||||
when: tmp_bench.stat.exists and not bench_repo_register.stat.exists
|
||||
become: yes
|
||||
become_user: frappe
|
||||
|
||||
- name: install bench
|
||||
pip: name={{ bench_repo_path }} extra_args='-e'
|
||||
|
@ -14,27 +14,38 @@
|
||||
stat: path="{{ bench_path }}/sites/site1.local"
|
||||
register: site_folder
|
||||
|
||||
- name: Link mysql.sock file for MariaDB
|
||||
file:
|
||||
src: "/var/lib/mysql/mysql.sock"
|
||||
dest: "/var/run/mysqld/mysqld.sock"
|
||||
state: link
|
||||
- name: Add additional conf for MariaDB 10.2 in mariadb.conf.d
|
||||
blockinfile:
|
||||
path: /etc/mysql/conf.d/settings.cnf
|
||||
block: |
|
||||
# Import all .cnf files from configuration directory
|
||||
!includedir /etc/mysql/mariadb.conf.d/
|
||||
become: yes
|
||||
become_user: root
|
||||
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
|
||||
|
||||
- name: Link mysql.pid file for MariaDB
|
||||
file:
|
||||
src: "/var/lib/mysql/mysql.pid"
|
||||
dest: "/var/run/mysqld/mysqld.pid"
|
||||
state: link
|
||||
- name: Add additional conf for MariaDB 10.2 in mariadb.conf.d
|
||||
blockinfile:
|
||||
path: /etc/mysql/mariadb.conf.d/erpnext.cnf
|
||||
block: |
|
||||
[mysqld]
|
||||
pid-file = /var/run/mysqld/mysqld.pid
|
||||
socket = /var/run/mysqld/mysqld.sock
|
||||
create: yes
|
||||
become: yes
|
||||
become_user: root
|
||||
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
|
||||
|
||||
- name: restart mysql
|
||||
service: name=mysql state=restarted
|
||||
become: yes
|
||||
become_user: root
|
||||
|
||||
- name: create a new default site
|
||||
command: bench new-site site1.local --admin-password {{ admin_password }} --mariadb-root-password {{ mysql_root_password }}
|
||||
args:
|
||||
chdir: "{{ bench_path }}"
|
||||
when: not site_folder.stat.exists
|
||||
become: yes
|
||||
become_user: frappe
|
||||
|
||||
- name: install erpnext to default site
|
||||
command: bench --site site1.local install-app erpnext
|
||||
|
@ -13,8 +13,8 @@
|
||||
- name: setup bench and dev environment
|
||||
hosts: localhost
|
||||
vars:
|
||||
bench_repo_path: "/home/{{ ansible_user_id }}/.bench"
|
||||
bench_path: "/home/{{ ansible_user_id }}/{{ bench_name }}"
|
||||
bench_repo_path: "/home/{{ frappe_user }}/.bench"
|
||||
bench_path: "/home/{{ frappe_user }}/{{ bench_name }}"
|
||||
tasks:
|
||||
# setup frappe-bench
|
||||
- include: includes/setup_bench.yml
|
||||
|
Loading…
Reference in New Issue
Block a user