 - name: config /etc/my.cnf for mysql-5.6.x
   when: mysql_option == 3
   template:
    src: ../template/5.6/my.cnf
    dest: /etc/my.cnf
    owner: mysql
    group: mysql
    backup: yes

 - name: config /etc/my.cnf for mysql-5.7.x
   when: mysql_option == 2
   template:
    src: ../template/5.7/my.cnf
    dest: /etc/my.cnf
    owner: mysql
    group: mysql
    backup: yes

 - name: config /etc/my.cnf for mysql-8.x.x
   when: mysql_option == 1
   template:
    src: ../template/8/my.cnf
    dest: /etc/my.cnf
    owner: mysql
    group: mysql
    backup: yes
