2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 00:37:51 +00:00

Support for mariadb debian 9 and above

This commit is contained in:
Saurabh 2017-09-05 19:35:28 +05:30
parent e2c24d8c0e
commit b9f096bd3e
6 changed files with 19 additions and 4 deletions

View File

@ -2,8 +2,10 @@
- hosts: localhost - hosts: localhost
- include: ../prerequisites/install_prerequisites.yml - include: ../prerequisites/install_prerequisites.yml
when: ansible_distribution != 'MacOSX'
- include: ../prerequisites/install_roles.yml - include: ../prerequisites/install_roles.yml
when: ansible_distribution != 'MacOSX'
- include: macosx.yml - include: macosx.yml
when: ansible_distribution == 'MacOSX' when: ansible_distribution == 'MacOSX'

View File

@ -22,7 +22,7 @@
- wkhtmltopdf - wkhtmltopdf
- name: configure mariadb - name: configure mariadb
include: ../prerequisites/roles/mariadb/main.yml include: ../prerequisites/roles/mariadb/task/main.yml
vars: vars:
mysql_conf_tpl: ../prerequisites/files/mariadb_config.cnf mysql_conf_tpl: ../prerequisites/files/mariadb_config.cnf

View File

@ -1,4 +1,7 @@
--- ---
- name: Setup OpenSSL dependancy
pip: name=pyOpenSSL version=16.2.0
- name: install pillow prerequisites for Debian < 8 - name: install pillow prerequisites for Debian < 8
apt: pkg={{ item }} state=present apt: pkg={{ item }} state=present
with_items: with_items:

View File

@ -1,9 +1,12 @@
--- ---
- name: Add apt key for mariadb for Debian <= 8 - name: Add apt key for mariadb for Debian <= 8
apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=0xcbcb082a1bb943db state=present apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=0xcbcb082a1bb943db state=present
when: ansible_distribution_major_version | version_compare('8', 'le') when: ansible_distribution_major_version | version_compare('8', 'le')
- name: Add apt key for mariadb for Debian > 8
apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=0xF1656F24C74CD1D8 state=present
when: ansible_distribution_major_version | version_compare('8', 'gt')
- name: Add apt repository - name: Add apt repository
apt_repository: apt_repository:
repo: 'deb [arch=amd64,i386] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/debian {{ ansible_distribution_release }} main' repo: 'deb [arch=amd64,i386] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/debian {{ ansible_distribution_release }} main'

View File

@ -5,17 +5,24 @@
- include: ubuntu.yml - include: ubuntu.yml
when: ansible_distribution == 'Ubuntu' when: ansible_distribution == 'Ubuntu'
- name: Add configuration
template: src={{ mysql_conf_tpl }} dest={{ mysql_conf_dir[ansible_distribution] }}/{{ mysql_conf_file }} owner=root group=root mode=0644
when: mysql_conf_tpl != 'change_me' and ansible_distribution != 'Debian'
notify: restart mysql
- include: debian.yml - include: debian.yml
when: ansible_distribution == 'Debian' when: ansible_distribution == 'Debian'
- name: Add configuration - name: Add configuration
template: src={{ mysql_conf_tpl }} dest={{ mysql_conf_dir[ansible_distribution] }}/{{ mysql_conf_file }} owner=root group=root mode=0644 template: src=files/debian_mariadb_config.cnf dest={{ mysql_conf_dir[ansible_distribution] }}/{{ mysql_conf_file }} owner=root group=root mode=0644
when: mysql_conf_tpl != 'change_me' when: mysql_conf_tpl != 'change_me' and ansible_distribution == 'Debian'
notify: restart mysql notify: restart mysql
- name: Start and enable service - name: Start and enable service
service: name=mysql state=started enabled=yes service: name=mysql state=started enabled=yes
- include: mysql_secure_installation.yml - include: mysql_secure_installation.yml
when: mysql_root_password is defined
- debug: var=mysql_secure_installation - debug: var=mysql_secure_installation
when: mysql_secure_installation and mysql_root_password is defined when: mysql_secure_installation and mysql_root_password is defined