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