Files
percona/tasks/configure.yml

32 lines
822 B
YAML

---
- name: percona | configure Percona Server
template:
src: my.cnf.j2
dest: /etc/mysql/conf.d/01-override.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 | configure root .my.cnf
template:
src: root.my.cnf.j2
dest: /root/.my.cnf
mode: '0600'
owner: root
group: root
- name: percona | update MySQL root password
mysql_user:
name: root
host: localhost
plugin: caching_sha2_password
plugin_auth_string: "{{ percona_root_password }}"
salt: "{{ percona_caching_sha2_password_salt }}"
login_unix_socket: /var/run/mysqld/mysqld.sock
ignore_errors: true # In case password is already set and socket auth is disabled