added working fprobe install and config

This commit is contained in:
Pi
2019-02-20 16:27:32 -05:00
parent 4e269533d7
commit 2d915c81ff
2 changed files with 21 additions and 28 deletions

View File

@@ -0,0 +1 @@
192.168.50.2

View File

@@ -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