---

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

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

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