main.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ---
  2. - name: Add SNMP RO community
  3. nxos_snmp_community:
  4. community: "{{ snmp_ro_community }}"
  5. acl: "{{ mgmt_acl_name }}"
  6. group: network-operator
  7. tags: snmp
  8. - name: Add SNMP RW community
  9. nxos_snmp_community:
  10. community: "{{ snmp_rw_community }}"
  11. acl: "{{ mgmt_acl_name }}"
  12. group: network-admin
  13. tags: snmp
  14. - name: Add SNMP location
  15. nxos_snmp_location:
  16. location: "{{ snmp_location }}"
  17. tags: snmp
  18. - name: Add SNMP contact
  19. nxos_snmp_contact:
  20. contact: "{{ snmp_contact }}"
  21. tags: snmp
  22. - name: Add SNMP notification host
  23. nxos_snmp_host:
  24. community: "{{ snmp_notif_community }}"
  25. snmp_host: "{{ snmp_notif_host }}"
  26. udp: "{{ snmp_notif_port }}"
  27. version: "{{ snmp_notif_version }}"
  28. snmp_type: "{{ snmp_notif_type }}"
  29. tags: snmp
  30. - name: Add SNMPv3 users
  31. nxos_snmp_user:
  32. authentication: "{{ item.hash }}"
  33. group: "{{ item.group }}"
  34. privacy: "{{ item.password }}"
  35. encrypt: no
  36. pwd: "{{ item.password }}"
  37. user: "{{ item.username }}"
  38. with_items: "{{ n9k_snmp_users }}"
  39. tags: snmp