Port Modules/OAM/oam-librenms.sh. Deploys the check_mk agent and systemd socket for LibreNMS monitoring, along with the local plugins: distro, dmi, dpkg, ntp-client, os-updates, postfixdetailed, and postfix-queues. 🤖 Generated with [Crush](https://github.com/charmassociates/crush) Assisted-by: GLM-5 via Crush <crush@charm.land>
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
---
|
|
# LibreNMS / check_mk agent — port of Modules/OAM/oam-librenms.sh.
|
|
|
|
- name: Ensure /usr/lib/check_mk_agent tree exists
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
loop:
|
|
- /usr/lib/check_mk_agent
|
|
- /usr/lib/check_mk_agent/plugins
|
|
- /usr/lib/check_mk_agent/local
|
|
|
|
- name: Deploy distro helper
|
|
ansible.builtin.copy:
|
|
src: librenms/distro
|
|
dest: /usr/local/bin/distro
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
- name: Deploy check_mk_agent
|
|
ansible.builtin.copy:
|
|
src: librenms/check_mk_agent
|
|
dest: /usr/bin/check_mk_agent
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
- name: Deploy check_mk systemd units
|
|
ansible.builtin.copy:
|
|
src: "librenms/{{ item.src }}"
|
|
dest: "/etc/systemd/system/{{ item.src }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
loop:
|
|
- { src: check_mk@.service }
|
|
- { src: check_mk.socket }
|
|
notify: Enable and start check_mk socket
|
|
|
|
- name: Deploy check_mk local plugins
|
|
ansible.builtin.copy:
|
|
src: "librenms/{{ item }}"
|
|
dest: "/usr/lib/check_mk_agent/local/{{ item }}"
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
loop:
|
|
- dmi.sh
|
|
- dpkg.sh
|
|
- ntp-client
|
|
- os-updates.sh
|
|
- postfixdetailed
|
|
- postfix-queues
|