mirror of
https://github.com/skoobasteeve/ansible-server-setup.git
synced 2026-03-20 03:18:57 +00:00
install rsyslog
This commit is contained in:
@@ -21,6 +21,11 @@
|
|||||||
name: jq
|
name: jq
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
|
- name: Install latest rsyslog
|
||||||
|
ansible.builtin.package:
|
||||||
|
name: rsyslog
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Fix extend serial permissions
|
- name: Fix extend serial permissions
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/sys/devices/virtual/dmi/id/product_serial"
|
path: "/sys/devices/virtual/dmi/id/product_serial"
|
||||||
@@ -96,7 +101,7 @@
|
|||||||
line: "ExecStart=/usr/sbin/snmpd -LS4d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f"
|
line: "ExecStart=/usr/sbin/snmpd -LS4d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f"
|
||||||
backrefs: true
|
backrefs: true
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
notify: reload systemd configs
|
notify: Reload systemd configs
|
||||||
|
|
||||||
- name: Set snmpdopts - centos
|
- name: Set snmpdopts - centos
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
@@ -114,7 +119,7 @@
|
|||||||
mode: '0644'
|
mode: '0644'
|
||||||
register: snmpd_config
|
register: snmpd_config
|
||||||
notify:
|
notify:
|
||||||
- enable and restart snmpd.service
|
- Enable and restart snmpd.service
|
||||||
|
|
||||||
- name: Add host to librenms
|
- name: Add host to librenms
|
||||||
block:
|
block:
|
||||||
@@ -154,8 +159,8 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
notify:
|
notify:
|
||||||
- enable and restart the rsyslog service
|
- Enable and restart the rsyslog service
|
||||||
- restart syslog-ng for LibreNMS
|
- Restart syslog-ng for LibreNMS
|
||||||
|
|
||||||
- name: Verify the rsyslog service is running
|
- name: Verify the rsyslog service is running
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
|
|||||||
Reference in New Issue
Block a user