2014-03-01 04:32:17 +01:00
---
2014-04-23 17:09:31 +02:00
- name : Include OS-specific variables.
include_vars : "{{ ansible_os_family }}.yml"
2016-04-29 19:44:59 +02:00
when : ansible_os_family != "RedHat"
2016-04-06 15:34:28 +02:00
2016-04-29 21:36:39 +02:00
- name : Ensure required dependency is installed (RedHat).
yum : name=redhat-lsb-core state=installed
when : ansible_os_family == "RedHat"
2016-04-29 19:44:59 +02:00
- name : Include OS-specific variables (RedHat).
2016-04-29 20:41:29 +02:00
include_vars : "{{ ansible_os_family }}-{{ ansible_lsb.major_release }}.yml"
2016-04-29 19:44:59 +02:00
when : ansible_os_family == "RedHat"
2014-03-01 04:32:17 +01:00
2015-01-13 16:23:33 +01:00
- name : Define mysql_packages.
set_fact :
mysql_packages : "{{ __mysql_packages | list }}"
when : mysql_packages is not defined
2015-06-02 16:25:23 +02:00
- name : Define mysql_daemon.
set_fact :
2015-08-20 17:54:52 +02:00
mysql_daemon : "{{ __mysql_daemon }}"
2015-06-02 16:25:23 +02:00
when : mysql_daemon is not defined
2015-08-31 17:13:45 +02:00
- name : Define mysql_slow_query_log_file.
set_fact :
mysql_slow_query_log_file : "{{ __mysql_slow_query_log_file }}"
when : mysql_slow_query_log_file is not defined
2015-01-13 16:23:33 +01:00
# Setup/install tasks.
2014-08-26 15:23:48 +02:00
- include : setup-RedHat.yml
2014-04-23 17:09:31 +02:00
when : ansible_os_family == 'RedHat'
2014-08-26 15:23:48 +02:00
- include : setup-Debian.yml
2014-04-23 17:09:31 +02:00
when : ansible_os_family == 'Debian'
2014-03-01 04:32:17 +01:00
2015-10-04 10:21:51 +02:00
- name : Check if MySQL packages were installed.
set_fact :
2015-10-07 05:13:30 +02:00
mysql_install_packages : "{{ (rh_mysql_install_packages is defined and rh_mysql_install_packages.changed) or (deb_mysql_install_packages is defined and deb_mysql_install_packages.changed) }}"
2015-10-04 10:21:51 +02:00
2015-01-13 16:23:33 +01:00
# Configure MySQL.
2014-11-08 22:10:49 +01:00
- include : configure.yml
- include : secure-installation.yml
2014-11-09 04:43:31 +01:00
- include : databases.yml
- include : users.yml
- include : replication.yml