ansible-role-mariadb/tasks/munin.yml

24 lines
677 B
YAML
Raw Normal View History

---
- 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
2021-01-04 14:33:32 +01:00
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
2021-01-04 14:33:32 +01:00
args:
creates: "{{ munin_sql_config_file }}"
ignore_errors: true
notify: restart munin-node