first draft

This commit is contained in:
Ludovic Cartier
2025-12-18 11:42:56 +01:00
parent 20fba6cb9b
commit d81541660e
13 changed files with 228 additions and 0 deletions

22
tasks/configure.yml Normal file
View File

@@ -0,0 +1,22 @@
---
- name: percona | configure Percona Server
template:
src: my.cnf.j2
dest: /etc/mysql/conf.d/01-ansible.cnf
mode: '0644'
notify: Restart Percona Server
- name: percona | ensure Percona Server is started and enabled
service:
name: mysql
state: started
enabled: yes
- name: percona | update MySQL root password
mysql_user:
name: root
host: localhost
password: "{{ percona_root_password }}"
login_unix_socket: /var/run/mysqld/mysqld.sock
priv: "*.*:ALL,GRANT"
ignore_errors: true # In case password is already set and socket auth is disabled