You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
8 years ago
|
---
|
||
|
# Variable configuration.
|
||
|
- name: Include OS-specific variables.
|
||
|
include_vars: "{{ ansible_os_family }}.yml"
|
||
|
when: ansible_os_family != "RedHat"
|
||
|
|
||
|
- name: Include OS-specific variables (RedHat).
|
||
|
include_vars: "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
|
||
|
when: ansible_os_family == "RedHat"
|
||
|
|
||
|
- name: Define mysql_packages.
|
||
|
set_fact:
|
||
|
mysql_packages: "{{ __mysql_packages | list }}"
|
||
|
when: mysql_packages is not defined
|
||
|
|
||
|
- name: Define mysql_daemon.
|
||
|
set_fact:
|
||
|
mysql_daemon: "{{ __mysql_daemon }}"
|
||
|
when: mysql_daemon is not defined
|
||
|
|
||
|
- 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
|
||
|
|
||
|
# Setup/install tasks.
|
||
|
- include: setup-RedHat.yml
|
||
|
when: ansible_os_family == 'RedHat'
|
||
|
|
||
|
- include: setup-Debian.yml
|
||
|
when: ansible_os_family == 'Debian'
|
||
|
|
||
|
- name: Check if MySQL packages were installed.
|
||
|
set_fact:
|
||
|
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) }}"
|
||
|
|
||
|
# Configure MySQL.
|
||
|
- include: configure.yml
|
||
|
- include: secure-installation.yml
|
||
|
- include: databases.yml
|
||
|
- include: users.yml
|
||
|
- include: replication.yml
|