Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rocky Linux configuration #555

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies: []
galaxy_info:
role_name: mysql
author: geerlingguy
description: MySQL server for RHEL/CentOS and Debian/Ubuntu.
description: MySQL server for RHEL/CentOS/Rocky and Debian/Ubuntu.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 2.10
Expand All @@ -18,6 +18,9 @@ galaxy_info:
- name: Archlinux
versions:
- all
- name: Rocky
versions:
- 9
galaxy_tags:
- database
- mysql
Expand Down
6 changes: 5 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- ansible.builtin.include_tasks: setup-RedHat.yml
when: ansible_os_family == 'RedHat'

- ansible.builtin.include_tasks: setup-Rocky.yml
when: ansible_os_family == 'Rocky'

- ansible.builtin.include_tasks: setup-Debian.yml
when: ansible_os_family == 'Debian'

Expand All @@ -16,7 +19,8 @@
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) }}"
or (arch_mysql_install_packages is defined and arch_mysql_install_packages.changed)
or (rocky_mysql_install_packages is defined and rocky_mysql_install_packages.changed)}}"

# Configure MySQL.
- ansible.builtin.include_tasks: configure.yml
Expand Down
7 changes: 7 additions & 0 deletions tasks/setup-Rocky.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Ensure MySQL packages are installed.
ansible.builtin.dnf:
name: "{{ mysql_packages }}"
state: present
enablerepo: "{{ mysql_enablerepo | default(omit, true) }}"
register: rocky_mysql_install_packages
18 changes: 18 additions & 0 deletions vars/Rocky.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
__mysql_daemon: mariadb
__mysql_packages:
- mariadb
- mariadb-server
- mariadb-connector-c
- python3-PyMySQL
- perl-DBD-MySQL
__mysql_slow_query_log_file: /var/log/mysql-slow.log
__mysql_log_error: /var/log/mariadb/mariadb.log
__mysql_syslog_tag: mariadb
__mysql_pid_file: /var/run/mariadb/mariadb.pid
__mysql_config_file: /etc/my.cnf
__mysql_config_include_dir: /etc/my.cnf.d
__mysql_socket: /var/lib/mysql/mysql.sock
# The entries controlled by this value should not be used with MariaDB >= 10.2.2
# See https://github.com/frappe/bench/issues/681#issuecomment-398984706
__mysql_supports_innodb_large_prefix: false
Loading