started tasks for proxmox

This commit is contained in:
2022-06-29 15:57:17 +02:00
parent 764a99ea28
commit e2d15f96f2
2 changed files with 20 additions and 0 deletions

2
host_vars/pve Normal file
View File

@@ -0,0 +1,2 @@
---
is_proxmox: true

View File

@@ -82,6 +82,24 @@
- { service: "manufacturer", script: "/bin/cat /sys/devices/virtual/dmi/id/sys_vendor" }
- { service: "serial", script: "/bin/cat /sys/devices/virtual/dmi/id/product_serial" }
- block:
- name: server | snmpd | get proxmox script
get_url:
url: "https://raw.githubusercontent.com/librenms/librenms-agent/master/agent-local/proxmox"
dest: "/usr/local/bin/proxmox"
mode: "0755"
owner: "root"
group: "root"
- name: server | snmpd | configure proxmox extends
lineinfile:
path: "{{ snmpd_conf }}"
state: present
line: "extend proxmox {{ sudo }} /usr/local/bin/proxmox"
insertafter: "# SECTION: custom settings"
when:
- is_proxmox is defined
- is_proxmox == true
- name: server | snmpd start service
service:
name: "snmpd"