-
-
Notifications
You must be signed in to change notification settings - Fork 873
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
51 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
- name: restart mysql | ||
service: | ||
ansible.builtin.service: | ||
name: "{{ mysql_daemon }}" | ||
state: restarted | ||
sleep: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
--- | ||
# Variable configuration. | ||
- include_tasks: variables.yml | ||
- ansible.builtin.include_tasks: variables.yml | ||
|
||
# Setup/install tasks. | ||
- include_tasks: setup-RedHat.yml | ||
- ansible.builtin.include_tasks: setup-RedHat.yml | ||
when: ansible_os_family == 'RedHat' | ||
|
||
- include_tasks: setup-Debian.yml | ||
- ansible.builtin.include_tasks: setup-Debian.yml | ||
when: ansible_os_family == 'Debian' | ||
|
||
- include_tasks: setup-Archlinux.yml | ||
- ansible.builtin.include_tasks: setup-Archlinux.yml | ||
when: ansible_os_family == 'Archlinux' | ||
|
||
- name: Check if MySQL packages were installed. | ||
set_fact: | ||
ansible.builtin.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) | ||
or (arch_mysql_install_packages is defined and arch_mysql_install_packages.changed) }}" | ||
|
||
# Configure MySQL. | ||
- include_tasks: configure.yml | ||
- include_tasks: secure-installation.yml | ||
- include_tasks: databases.yml | ||
- include_tasks: users.yml | ||
- include_tasks: replication.yml | ||
- ansible.builtin.include_tasks: configure.yml | ||
- ansible.builtin.include_tasks: secure-installation.yml | ||
- ansible.builtin.include_tasks: databases.yml | ||
- ansible.builtin.include_tasks: users.yml | ||
- ansible.builtin.include_tasks: replication.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
--- | ||
- name: Ensure MySQL Python libraries are installed. | ||
pacman: "name=mysql-python state=present" | ||
community.general.pacman: "name=mysql-python state=present" | ||
|
||
- name: Ensure MySQL packages are installed. | ||
pacman: "name={{ mysql_packages }} state=present" | ||
community.general.pacman: "name={{ mysql_packages }} state=present" | ||
register: arch_mysql_install_packages | ||
|
||
- name: Run mysql_install_db if MySQL packages were changed. | ||
command: mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql | ||
ansible.builtin.command: mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql | ||
when: arch_mysql_install_packages.changed | ||
tags: ['skip_ansible_lint'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
--- | ||
# Variable configuration. | ||
- name: Include OS-specific variables. | ||
include_vars: "{{ item }}" | ||
ansible.builtin.include_vars: "{{ item }}" | ||
with_first_found: | ||
- files: | ||
- "vars/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml" | ||
- "vars/{{ ansible_os_family }}.yml" | ||
skip: true | ||
|
||
- name: Define mysql_packages. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_packages: "{{ __mysql_packages | list }}" | ||
when: mysql_packages is not defined | ||
|
||
- name: Define mysql_daemon. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_daemon: "{{ __mysql_daemon }}" | ||
when: mysql_daemon is not defined | ||
|
||
- name: Define mysql_slow_query_log_file. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_slow_query_log_file: "{{ __mysql_slow_query_log_file }}" | ||
when: mysql_slow_query_log_file is not defined | ||
|
||
- name: Define mysql_log_error. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_log_error: "{{ __mysql_log_error }}" | ||
when: mysql_log_error is not defined | ||
|
||
- name: Define mysql_syslog_tag. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_syslog_tag: "{{ __mysql_syslog_tag }}" | ||
when: mysql_syslog_tag is not defined | ||
|
||
- name: Define mysql_pid_file. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_pid_file: "{{ __mysql_pid_file }}" | ||
when: mysql_pid_file is not defined | ||
|
||
- name: Define mysql_config_file. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_config_file: "{{ __mysql_config_file }}" | ||
when: mysql_config_file is not defined | ||
|
||
- name: Define mysql_config_include_dir. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_config_include_dir: "{{ __mysql_config_include_dir }}" | ||
when: mysql_config_include_dir is not defined | ||
|
||
- name: Define mysql_socket. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_socket: "{{ __mysql_socket }}" | ||
when: mysql_socket is not defined | ||
|
||
- name: Define mysql_supports_innodb_large_prefix. | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
mysql_supports_innodb_large_prefix: "{{ __mysql_supports_innodb_large_prefix }}" | ||
when: mysql_supports_innodb_large_prefix is not defined |