ansible-role-mariadb/tasks/munin.yml

23 lines
677 B
YAML

---
- name: "Munin | Create sql user"
community.mysql.mysql_user:
name: "{{ munin_sql_user }}"
password: "{{ munin_sql_password }}"
priv: '*.*:PROCESS,REPLICATION CLIENT'
state: present
login_unix_socket: "{{ mysql_socket }}"
login_user: root
- name: "Munin | Copy Munin configuration"
ansible.builtin.template:
src: templates/munin-mariadb.conf
dest: "{{ munin_sql_config_file }}"
mode: 0660
notify: restart munin-node
- name: "Munin | Enable mysql plugin"
ansible.builtin.shell: munin-node-configure --shell | grep mysql_ | sh
args:
creates: "{{ munin_sql_config_file }}"
ignore_errors: true
notify: restart munin-node