feat: add nvme plugin + refactor physical server
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0640'
|
||||
notify:
|
||||
- Restart munin-node
|
||||
|
||||
- name: Put garage scripts
|
||||
ansible.builtin.copy:
|
||||
|
@@ -1,5 +1,43 @@
|
||||
---
|
||||
|
||||
- name: Install prereq
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- nvme-cli
|
||||
- lm-sensors
|
||||
|
||||
- name: Put nvme plugin configuration
|
||||
ansible.builtin.template:
|
||||
src: nvme.j2
|
||||
dest: /etc/munin/plugin-conf.d/nvme
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0640'
|
||||
notify:
|
||||
- Restart munin-node
|
||||
|
||||
- name: Put nvme script
|
||||
ansible.builtin.copy:
|
||||
src: files/nvme
|
||||
dest: /etc/munin/plugins/nvme
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
notify:
|
||||
- Restart munin-node
|
||||
|
||||
- name: Configure specific munin plugin
|
||||
ansible.builtin.file:
|
||||
path: "/etc/munin/plugins/sensors_{{ item }}"
|
||||
src: /usr/share/munin/plugins/sensors_
|
||||
state: link
|
||||
notify:
|
||||
- Restart munin-node
|
||||
loop:
|
||||
- temp
|
||||
|
||||
- name: Delete squid plugins
|
||||
ansible.builtin.shell:
|
||||
cmd: "rm -f /etc/munin/plugins/squid_*"
|
||||
|
@@ -87,11 +87,6 @@
|
||||
- charge
|
||||
- voltages
|
||||
|
||||
# for physical servers
|
||||
- name: Execute specific tasks for physical servers
|
||||
ansible.builtin.include_tasks: physical_servers.yml
|
||||
when: "'hypervisors' in group_names"
|
||||
|
||||
- name: Reconfigure munin-node
|
||||
ansible.builtin.shell:
|
||||
cmd: munin-node-configure --shell | sh # noqa: risky-shell-pipe
|
||||
|
@@ -1,16 +0,0 @@
|
||||
---
|
||||
# for physical servers
|
||||
- name: Install necessary packages for hypervisors
|
||||
ansible.builtin.package:
|
||||
name: lm-sensors
|
||||
state: present
|
||||
|
||||
- name: Configure specific munin plugin
|
||||
ansible.builtin.file:
|
||||
path: "/etc/munin/plugins/sensors_{{ item }}"
|
||||
src: /usr/share/munin/plugins/sensors_
|
||||
state: link
|
||||
notify:
|
||||
- Restart munin-node
|
||||
loop:
|
||||
- temp
|
Reference in New Issue
Block a user