mirror of
https://github.com/frappe/bench.git
synced 2024-11-14 09:14:04 +00:00
a694c9403a
See https://github.com/frappe/bench/issues/285#issuecomment-239983969 Also disable exe bit on `setup_mariadb.yml`
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
---
|
|
- 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'
|