logging host 10.10.20.10
logging trap warnings

snmp-server group NMS v3 priv
snmp-server user nms NMS v3 auth sha Passw0rd! priv aes 128 Passw0rd!
snmp-server host 10.10.20.10 version 3 priv nms

flow exporter name
 destination 10.10.20.10
 source Loopback0
 transport udp 9996
 export-protocol netflow-v5
 
flow monitor name
 description name traff
 exporter name
 cache timeout inactive 60
 cache timeout active 60
 record netflow ipv4 original-input
 
int name name
 ip flow monitor name input

ANSIBLE

- hosts: all
  tasks:
  - name: config
    ios_config:
      lines:
        - logging host 10.10.20.10
        - logging trap warnings
        - ntp server 10.255.1.1
        - snmp-server group NMS v3 priv
        - snmp-server user nms NMS v3 auth sha Passw0rd! priv aes 128 Passw0rd!
        - snmp-server host 10.10.20.10 version 3 priv nms
        - banner login ^
        - AUTHORIZED ACCESS ONLY
        - ^
--> vi hosts
====================
DSW1 ansible_host=10.10.10.2
 
[all:vars] # или group_vars/all.yml
ansible_user=admin
ansible_password=Password
ansible_network_os=ios
ansible_connection=network_cli
ansible_host_key_checking: false
====================