diff options
| author | Matthew Fennell <matthew@fennell.dev> | 2026-09-09 22:54:41 +0100 |
|---|---|---|
| committer | Matthew Fennell <matthew@fennell.dev> | 2026-09-09 22:54:41 +0100 |
| commit | eb726d710784bb1676042f3fe2f1b5b0bb47cb81 (patch) | |
| tree | eb8cd90fa17855f3804a136804cff2a3a7f00980 /munin-node/tasks | |
| parent | 954c8ecb4f1ff54f1097f92224447bf76293cf51 (diff) | |
Don't install prosody plugins by defaultmain
I want to set up monitoring on fennell.dev and search.fennell.dev - neither of
which have a postgres instance or should include other prosody-related plugins
in the future. Therefore, configure a base set of plugins that should always be
included, and let extra plugins / configuration be driven by extra_profiles.
Over time, I'll want to create profile maps (containing config for the
necessary packages/plugins to install/configure for that profile) to avoid
unnecessary duplication of tasks, but for now, it's sufficient.
Diffstat (limited to 'munin-node/tasks')
| -rw-r--r-- | munin-node/tasks/main.yml | 52 |
1 files changed, 36 insertions, 16 deletions
diff --git a/munin-node/tasks/main.yml b/munin-node/tasks/main.yml index dde9572..f068eb5 100644 --- a/munin-node/tasks/main.yml +++ b/munin-node/tasks/main.yml @@ -7,12 +7,20 @@ - name: Ensure required packages are installed ansible.builtin.apt: name: - - libdbi-perl # Used by munin postgres plugins - munin-node # Graphs and monitoring state: present update_cache: true become: true +- name: Ensure prosody packages are installed + ansible.builtin.apt: + name: + - libdbi-perl # Used by munin postgres plugins + state: present + update_cache: true + when: "'prosody' in extra_profiles" + become: true + - name: Ensure munin-node tcp ports are open community.general.ufw: rule: allow @@ -33,7 +41,7 @@ become: true notify: Restart munin-node -- name: Ensure munin plugins are configured +- name: Ensure default plugins are configured ansible.builtin.file: src: "/usr/share/munin/plugins/{{ item.src }}" dest: "/etc/munin/plugins/{{ item.dest }}" @@ -80,6 +88,31 @@ dest: open_files - src: open_inodes dest: open_inodes + - src: proc_pri + dest: proc_pri + - src: processes + dest: processes + - src: swap + dest: swap + - src: threads + dest: threads + - src: uptime + dest: uptime + - src: users + dest: users + - src: vmstat + dest: vmstat + notify: Restart munin-node + +- name: Ensure prosody plugins are configured + ansible.builtin.file: + src: "/usr/share/munin/plugins/{{ item.src }}" + dest: "/etc/munin/plugins/{{ item.dest }}" + owner: root + group: root + state: link + become: true + with_items: - src: postgres_autovacuum dest: postgres_autovacuum - src: postgres_bgwriter @@ -114,18 +147,5 @@ dest: postgres_users - src: postgres_xlog dest: postgres_xlog - - src: proc_pri - dest: proc_pri - - src: processes - dest: processes - - src: swap - dest: swap - - src: threads - dest: threads - - src: uptime - dest: uptime - - src: users - dest: users - - src: vmstat - dest: vmstat + when: "'prosody' in extra_profiles" notify: Restart munin-node |
