Skip to content

Commit

Permalink
Use utf8mb4 encoding for mysql databases
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar Khan committed Mar 2, 2016
1 parent 9e9f232 commit c05ae00
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions playbooks/roles/edxlocal/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@
apt: pkg={{ item }} install_recommends=yes state=present
with_items: edxlocal_debian_pkgs

# TODO: Add a test to make sure mysql is running.
- name: start mysql
service:
name: mysql
state: started

# Needed to create djcelery tables with utf8mb4 encoding:
# https://github.com/celery/django-celery/issues/259
- name: set innodb_large_prefix
mysql_variables:
variable: innodb_large_prefix
value: 1

- name: create databases
mysql_db:
db: "{{ item }}"
state: present
encoding: utf8
encoding: utf8mb4
when: item != None and item != ''
with_items: "{{ edxlocal_databases }}"

Expand Down

0 comments on commit c05ae00

Please sign in to comment.