summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2018-12-09 18:51:23 +0100
committerGuilhem Moulin <guilhem@fripost.org>2018-12-09 20:25:40 +0100
commit9039847b88dd737de1b92b08cba67cbfe9a2d840 (patch)
tree548f6b9c5d71a5c695b8956d8cea7a0661551c3b /roles
parente2ddcfc51f66c2a52a401064eab005e793f148ee (diff)
Use mariadb.service not mysql.service.
Since d8d07afe49e69114f8deb807031bec71a327d3ae our MySQL flavor is MariaDB.
Diffstat (limited to 'roles')
-rw-r--r--roles/common-SQL/handlers/main.yml4
-rw-r--r--roles/common-SQL/tasks/main.yml8
2 files changed, 6 insertions, 6 deletions
diff --git a/roles/common-SQL/handlers/main.yml b/roles/common-SQL/handlers/main.yml
index d1d355f..eae5efd 100644
--- a/roles/common-SQL/handlers/main.yml
+++ b/roles/common-SQL/handlers/main.yml
@@ -1,6 +1,6 @@
---
-- name: Restart MySQL
- service: name=mysql state=restarted
+- name: Restart MariaDB
+ service: name=mariadb state=restarted
- name: Restart munin-node
service: name=munin-node state=restarted
diff --git a/roles/common-SQL/tasks/main.yml b/roles/common-SQL/tasks/main.yml
index d6ab1c4..3df2cab 100644
--- a/roles/common-SQL/tasks/main.yml
+++ b/roles/common-SQL/tasks/main.yml
@@ -1,62 +1,62 @@
- name: Install MariaDB
apt: pkg={{ packages }}
vars:
packages:
- mariadb-common
- mariadb-server
- python-mysqldb
# for the 'mysql_' munin plugin
- libcache-cache-perl
-- name: Copy MySQL's configuration
+- name: Copy MySQL/MariaDB configuration
copy: src=etc/mysql/my.cnf
dest=/etc/mysql/my.cnf
owner=root group=root
mode=0644
register: r
notify:
- - Restart MySQL
+ - Restart MariaDB
# We need to restart now and load the relevant authplugin before we
# connect to the database.
- meta: flush_handlers
# XXX Dirty fix for #742046
- name: Force root to use UNIX permissions
mysql_user2: name=root password= auth_plugin=unix_socket soname=auth_socket.so
state=present
- name: Disallow anonymous and TCP/IP root login
mysql_user2: name={{ item.name|default('') }} host={{ item.host }}
state=absent
with_items:
- { host: '{{ inventory_hostname_short }}' }
- { host: 'localhost' }
- { host: '127.0.0.1'}
- { host: '::1'}
- { name: root, host: '{{ inventory_hostname_short }}' }
- { name: root, host: '127.0.0.1'}
- { name: root, host: '::1'}
-- name: Start MySQL
- service: name=mysql state=started
+- name: Start MariaDB
+ service: name=mariadb state=started
- name: Install 'mysql_' Munin wildcard plugin
file: src=/usr/share/munin/plugins/mysql_
dest=/etc/munin/plugins/mysql_{{ item }}
owner=root group=root
state=link force=yes
with_items:
# sudo /usr/share/munin/plugins/mysql_ suggest
- bin_relay_log
- commands
- connections
- files_tables
- innodb_bpool
- innodb_bpool_act
- innodb_io
- innodb_log
- innodb_rows
- innodb_semaphores
- innodb_tnx