---

- set_fact:
    mysql_config_directory: /etc/mysql/conf.d

- name: "Copy MySQL defaults config file (jessie)"
  copy:
    src: evolinux-defaults.cnf
    dest: "{{ mysql_config_directory }}/{{ mysql_evolinux_defaults_file }}"
    owner: root
    group: root
    mode: "0644"
    force: yes
  tags:
    - mysql

- name: "Copy MySQL custom config file (jessie)"
  template:
    src: evolinux-custom.cnf.j2
    dest: "{{ mysql_config_directory }}/{{ mysql_evolinux_custom_file }}"
    owner: root
    group: root
    mode: "0644"
    force: "{{ mysql_force_custom_config }}"
  tags:
    - mysql
