diff --git a/roles/server/tasks/utilities/snmpd.yml b/roles/server/tasks/utilities/snmpd.yml index b54fc3a..503bc32 100644 --- a/roles/server/tasks/utilities/snmpd.yml +++ b/roles/server/tasks/utilities/snmpd.yml @@ -61,6 +61,14 @@ src: "distro" mode: "0755" +- name: server | snmpd | get os-updates script + get_url: + url: "https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/osupdate" + dest: "/etc/snmp/osupdate" + mode: "0755" + owner: "root" + group: "root" + - name: server | snmpd | configure extends lineinfile: path: "/etc/snmp/snmpd.conf" @@ -68,7 +76,8 @@ line: "extend {{ item.service }} '{{ item.script }}'" insertafter: "# SECTION: custom settings" loop: - - { service: "distro", script: "sudo /etc/snmp/distro" } + - { service: "distro", script: "/usr/bin/sudo /etc/snmp/distro" } + - { service: "osupdate", script:" /usr/bin/sudo /etc/snmp/osupdate"} - { service: "hardware", script: "/bin/cat /sys/devices/virtual/dmi/id/product_name" } - { service: "manufacturer", script: "/bin/cat /sys/devices/virtual/dmi/id/sys_vendor" } - { service: "serial", script: "/bin/cat /sys/devices/virtual/dmi/id/product_serial" }