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:
|
||||
- name: Install snmpd Package
|
||||
- hosts: netflows
|
||||
tasks:
|
||||
- name: Install fprobe Package
|
||||
become: yes
|
||||
apt:
|
||||
name: ['snmpd']
|
||||
name: ['fprobe']
|
||||
state: present
|
||||
update_cache: true
|
||||
tags: install_snmpd
|
||||
# - lineinfile:
|
||||
# path: /etc/snmp/snmpd.conf
|
||||
# state: present
|
||||
# backrefs: yes
|
||||
# regexp: "{{ item.regexp }}"
|
||||
# line: "{{ item.line }}"
|
||||
# with_items:
|
||||
# - { regexp: '^\s+rocommunity\s+public\s+default\s+-V\s+systemonly', line: ' rocommunity public' }
|
||||
# - { regexp: '^agentAddress\s+udp:127.0.0.1:161', line: 'agentAddress udp:161' }
|
||||
# tags: configure_snmpd
|
||||
# become: true
|
||||
# - name: enable snmpd service and ensure it is not masked
|
||||
# systemd:
|
||||
# name: snmpd
|
||||
# enabled: yes
|
||||
# masked: no
|
||||
# state: restarted
|
||||
# tags: enablestart_snmpd
|
||||
# become: true
|
||||
# - name: set timezone
|
||||
# become: true
|
||||
# timezone:
|
||||
# name: America/New_York
|
||||
# tags: set_timezone
|
||||
tags: install_fprobe
|
||||
- lineinfile:
|
||||
path: /etc/default/fprobe
|
||||
state: present
|
||||
backrefs: yes
|
||||
regexp: '^FLOW_COLLECTOR="localhost:555"'
|
||||
line: 'FLOW_COLLECTOR="192.168.200.247:9995"'
|
||||
become: true
|
||||
- name: enable fprobe service and ensure it is not masked
|
||||
systemd:
|
||||
name: fprobe
|
||||
enabled: yes
|
||||
masked: no
|
||||
state: restarted
|
||||
tags: enable_fprobe
|
||||
become: true
|
||||
|
||||
Reference in New Issue
Block a user