diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2022-10-11 16:05:48 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2022-10-11 20:03:03 +0200 |
commit | eeadb037937ee1b5da6e084b98acb8f9c3242e2f (patch) | |
tree | 2bbf6687122d8cc0938bec1a4570c362047bdc80 /roles/common-SQL | |
parent | 9c67e4f8e539638a6621803c3c18ce5723fbdcc6 (diff) |
Remove module ‘mysql_user2’.
These days upstream's ‘mysql_user’ is good enough.
Diffstat (limited to 'roles/common-SQL')
-rw-r--r-- | roles/common-SQL/tasks/main.yml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/roles/common-SQL/tasks/main.yml b/roles/common-SQL/tasks/main.yml index 927f567..7e59f60 100644 --- a/roles/common-SQL/tasks/main.yml +++ b/roles/common-SQL/tasks/main.yml @@ -1,51 +1,51 @@ - name: Install MariaDB apt: pkg={{ packages }} vars: packages: - mariadb-common - mariadb-server - - python-mysqldb + - python3-mysqldb # for the 'mysql_' munin plugin - libcache-cache-perl - name: Copy MySQL/MariaDB configuration copy: src=etc/mysql/mariadb.conf.d/99-user.cnf dest=/etc/mysql/mariadb.conf.d/99-user.cnf owner=root group=root mode=0644 register: r notify: - 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 + mysql_user: name=root password="" plugin=unix_socket + state=present - name: Disallow anonymous and TCP/IP root login - mysql_user2: name={{ item.name|default('') }} host={{ item.host }} - state=absent + mysql_user: 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 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 |