added working fprobe install and config
This commit is contained in:
1
roles/netflows/tasks/main.retry
Normal file
1
roles/netflows/tasks/main.retry
Normal file
@@ -0,0 +1 @@
|
|||||||
|
192.168.50.2
|
||||||
@@ -1,33 +1,25 @@
|
|||||||
---
|
---
|
||||||
- tasks:
|
- hosts: netflows
|
||||||
- name: Install snmpd Package
|
tasks:
|
||||||
|
- name: Install fprobe Package
|
||||||
become: yes
|
become: yes
|
||||||
apt:
|
apt:
|
||||||
name: ['snmpd']
|
name: ['fprobe']
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
tags: install_snmpd
|
tags: install_fprobe
|
||||||
# - lineinfile:
|
- lineinfile:
|
||||||
# path: /etc/snmp/snmpd.conf
|
path: /etc/default/fprobe
|
||||||
# state: present
|
state: present
|
||||||
# backrefs: yes
|
backrefs: yes
|
||||||
# regexp: "{{ item.regexp }}"
|
regexp: '^FLOW_COLLECTOR="localhost:555"'
|
||||||
# line: "{{ item.line }}"
|
line: 'FLOW_COLLECTOR="192.168.200.247:9995"'
|
||||||
# with_items:
|
become: true
|
||||||
# - { regexp: '^\s+rocommunity\s+public\s+default\s+-V\s+systemonly', line: ' rocommunity public' }
|
- name: enable fprobe service and ensure it is not masked
|
||||||
# - { regexp: '^agentAddress\s+udp:127.0.0.1:161', line: 'agentAddress udp:161' }
|
systemd:
|
||||||
# tags: configure_snmpd
|
name: fprobe
|
||||||
# become: true
|
enabled: yes
|
||||||
# - name: enable snmpd service and ensure it is not masked
|
masked: no
|
||||||
# systemd:
|
state: restarted
|
||||||
# name: snmpd
|
tags: enable_fprobe
|
||||||
# enabled: yes
|
become: true
|
||||||
# masked: no
|
|
||||||
# state: restarted
|
|
||||||
# tags: enablestart_snmpd
|
|
||||||
# become: true
|
|
||||||
# - name: set timezone
|
|
||||||
# become: true
|
|
||||||
# timezone:
|
|
||||||
# name: America/New_York
|
|
||||||
# tags: set_timezone
|
|
||||||
|
|||||||
Reference in New Issue
Block a user