Commit f8158f6a authored by Chris Croome's avatar Chris Croome

quota plugin is too broken to bother with, docker plugin might be the only thing sof use...

parent fc7b802e
Pipeline #7732 passed with stage
in 21 seconds
......@@ -8,47 +8,19 @@
tags:
- munin
- name: Contrib plugins in place
- name: Selected contrib plugins in place
copy:
src: "/usr/local/src/munin_contrib/plugins/{{ plugin.dir }}/{{ plugin.name }}"
dest: "/usr/local/share/munin/plugins/{{ plugin.name }}"
mode: 0755
remote_src: true
loop:
- name: quota2percent_
dir: disk
- name: docker_cpu
dir: docker
- name: docker_memory
dir: docker
loop_control:
loop_var: plugin
tags:
- munin
- name: Find the first disk with quota enabled
shell: grep quota /etc/fstab | awk '{ print $1 }' | head -n1 | sed 's;/dev/;;'
register: munin_quota_disk_check
tags:
- munin
- name: Disk quota tasks
block:
- name: Set a fact for munin_quota_disk
set_fact:
munin_quota_disk: "{{ munin_quota_disk_check.stdout }}"
tags:
- munin
- name: Get the names of users with quotas
shell: "repquota -u -O csv /dev/{{ munin_quota_disk }} | grep -v ^User | grep -v 0,$ | awk -F, '{ print $1 }' | xargs"
register: munin_quota_users_check
tags:
- munin
- name: Set a fact for munin_quota_users
set_fact:
munin_quota_users: "{{ munin_quota_users_check.stdout }}"
when: ( munin_quota_users_check is defined ) and ( munin_quota_users_check.stdout != "" )
tags:
- munin
when: ( munin_quota_disk_check is defined ) and ( munin_quota_disk_check.stdout != "" )
...
......@@ -171,9 +171,4 @@ env.names {% if munin_multips_memory_processes is defined %}{{ munin_multips_mem
env.names {% if munin_multips_processes is defined %}{{ munin_multips_processes }}{% endif %}
env.regex_php ^[0-9]* php
{% if munin_quota_users is defined %}
[quota2percent_*]
user {{ munin_quota_users }}
env.low_uid never
{% endif %}
# vim: syntax=dosini
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment