Skip to content

Commit 7e31249

Browse files
committed
PR geerlingguy#38 cleanup - change order and update README.
1 parent a45d836 commit 7e31249

File tree

4 files changed

+32
-28
lines changed

4 files changed

+32
-28
lines changed

README.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/geerlingguy/ansible-role-mysql.svg?branch=master)](https://travis-ci.org/geerlingguy/ansible-role-mysql)
44

5-
Installs MySQL server on RHEL/CentOS or Debian/Ubuntu servers.
5+
Installs and configures MySQL or MariaDB server on RHEL/CentOS or Debian/Ubuntu servers.
66

77
## Requirements
88

@@ -81,6 +81,34 @@ The rest of the settings in `defaults/main.yml` control MySQL's memory usage. Th
8181

8282
Replication settings. Set `mysql_server_id` and `mysql_replication_role` by server (e.g. the master would be ID `1`, with the `mysql_replication_role` of `master`, and the slave would be ID `2`, with the `mysql_replication_role` of `slave`). The `mysql_replication_user` uses the same keys as `mysql_users`, and is created on master servers, and used to replicate on all the slaves.
8383

84+
### MariaDB usage
85+
86+
This role works with either MySQL or a compatible version of MariaDB. On RHEL/CentOS 7+, the mariadb database engine was substituted as the default MySQL replacement package, so you should override the `mysql_packages` variable with the below configuration to make sure MariaDB is installed correctly.
87+
88+
#### RHEL/CentOS 7 MariaDB configuration
89+
90+
Set the following variables (at a minimum):
91+
92+
mysql_packages:
93+
- mariadb
94+
- mariadb-server
95+
- mariadb-libs
96+
- MySQL-python
97+
- perl-DBD-MySQL
98+
mysql_daemon: mariadb
99+
mysql_log_error: /var/log/mariadb/mariadb.log
100+
mysql_syslog_tag: mariadb
101+
mysql_pid_file: /var/run/mariadb/mariadb.pid
102+
103+
#### Ubuntu 14.04 MariaDB configuration
104+
105+
Set the following variables (at a minimum):
106+
107+
mysql_packages:
108+
- mariadb-client
109+
- mariadb-server
110+
- python-mysqldb
111+
84112
## Dependencies
85113

86114
None.
@@ -106,30 +134,6 @@ None.
106134
password: similarly-secure-password
107135
priv: "example_db.*:ALL"
108136

109-
110-
## Mariadb usage
111-
112-
For CentOS 7:
113-
114-
mysql_packages:
115-
- mariadb
116-
- mariadb-server
117-
- mariadb-libs
118-
- MySQL-python
119-
- perl-DBD-MySQL
120-
mysql_daemon: mariadb
121-
mysql_socket: /var/lib/mysql/mysql.sock
122-
mysql_log_error: /var/log/mariadb/mariadb.log
123-
mysql_syslog_tag: mariadb
124-
mysql_pid_file: /var/run/mariadb/mariadb.pid
125-
126-
For Ubuntu 14.04:
127-
128-
mysql_packages:
129-
- mariadb-client
130-
- mariadb-server
131-
- python-mysqldb
132-
133137
## License
134138

135139
MIT / BSD

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dependencies: []
33

44
galaxy_info:
55
author: geerlingguy
6-
description: MySQL server for RHEL/CentOS 6.x and Debian/Ubuntu
6+
description: MySQL server for RHEL/CentOS and Debian/Ubuntu
77
company: "Midwestern Mac, LLC"
88
license: "license (BSD, MIT)"
99
min_ansible_version: 1.4

vars/Debian.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
__mysql_daemon: mysql
3-
mysql_config_file: /etc/mysql/my.cnf
43
__mysql_packages:
54
- mysql-common
65
- mysql-server
76
- python-mysqldb
7+
mysql_config_file: /etc/mysql/my.cnf
88
mysql_socket: /var/run/mysqld/mysqld.sock

vars/RedHat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
__mysql_daemon: mysqld
3-
mysql_config_file: /etc/my.cnf
43
__mysql_packages:
54
- mysql
65
- mysql-server
76
- MySQL-python
7+
mysql_config_file: /etc/my.cnf
88
mysql_socket: /var/lib/mysql/mysql.sock

0 commit comments

Comments
 (0)