2023-02-07 19:39:16 +01:00
|
|
|
---
|
|
|
|
- name: "Munin | Create sql user"
|
|
|
|
community.mysql.mysql_user:
|
2021-01-01 18:01:44 +01:00
|
|
|
name: "{{ munin_sql_user }}"
|
|
|
|
password: "{{ munin_sql_password }}"
|
|
|
|
priv: '*.*:PROCESS,REPLICATION CLIENT'
|
|
|
|
state: present
|
|
|
|
login_unix_socket: "{{ mysql_socket }}"
|
|
|
|
login_user: root
|
|
|
|
|
2023-02-07 19:39:16 +01:00
|
|
|
- name: "Munin | Copy Munin configuration"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: templates/munin-mariadb.conf
|
2021-01-04 14:33:32 +01:00
|
|
|
dest: "{{ munin_sql_config_file }}"
|
2023-05-08 21:13:53 +02:00
|
|
|
mode: "0660"
|
2021-01-01 18:01:44 +01:00
|
|
|
notify: restart munin-node
|
|
|
|
|
2023-02-07 19:39:16 +01:00
|
|
|
- name: "Munin | Enable mysql plugin"
|
|
|
|
ansible.builtin.shell: munin-node-configure --shell | grep mysql_ | sh
|
2021-01-04 14:33:32 +01:00
|
|
|
args:
|
|
|
|
creates: "{{ munin_sql_config_file }}"
|
2023-02-07 19:39:16 +01:00
|
|
|
ignore_errors: true
|
2021-01-01 18:01:44 +01:00
|
|
|
notify: restart munin-node
|