ansible.builtin.meraki_snmp (v2.8.11) — module

Manage organizations in the Meraki cloud

| "added in version" 2.6 of ansible.builtin"

Authors: Kevin Breit (@kbreit)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.8.11

Description

Allows for management of SNMP settings for Meraki.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query SNMP values
  meraki_snmp:
    auth_key: abc12345
    org_name: YourOrg
    state: query
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Enable SNMPv2
  meraki_snmp:
    auth_key: abc12345
    org_name: YourOrg
    state: present
    v2c_enabled: yes
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Disable SNMPv2
  meraki_snmp:
    auth_key: abc12345
    org_name: YourOrg
    state: present
    v2c_enabled: no
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Enable SNMPv3
  meraki_snmp:
    auth_key: abc12345
    org_name: YourOrg
    state: present
    v3_enabled: true
    v3_auth_mode: SHA
    v3_auth_pass: ansiblepass
    v3_priv_mode: AES128
    v3_priv_pass: ansiblepass
    peer_ips: 192.0.1.1;192.0.1.2
  delegate_to: localhost

Inputs

    
host:
    default: api.meraki.com
    description:
    - Hostname for Meraki dashboard.
    - Can be used to access regional Meraki environments, such as China.
    type: str

state:
    choices:
    - query
    - present
    default: present
    description:
    - Specifies whether SNMP information should be queried or modified.

org_id:
    description:
    - ID of organization.
    type: str

timeout:
    default: 30
    description:
    - Time to timeout for HTTP requests.
    type: int

auth_key:
    description:
    - Authentication key provided by the dashboard. Required if environmental variable
      C(MERAKI_KEY) is not set.
    required: true
    type: str

org_name:
    aliases:
    - organization
    description:
    - Name of organization.
    type: str

peer_ips:
    description:
    - Semi-colon delimited IP addresses which can perform SNMP queries.

use_https:
    default: true
    description:
    - If C(no), it will use HTTP. Otherwise it will use HTTPS.
    - Only useful for internal Meraki developers.
    type: bool

use_proxy:
    default: false
    description:
    - If C(no), it will not use a proxy, even if one is defined in an environment variable
      on the target hosts.
    type: bool

v3_enabled:
    description:
    - Specifies whether SNMPv3 is enabled.
    type: bool

v2c_enabled:
    description:
    - Specifies whether SNMPv2c is enabled.
    type: bool

output_level:
    choices:
    - debug
    - normal
    default: normal
    description:
    - Set amount of debug output during module execution.
    type: str

v3_auth_mode:
    choices:
    - MD5
    - SHA
    description:
    - Sets authentication mode for SNMPv3.

v3_auth_pass:
    description:
    - Authentication password for SNMPv3.
    - Must be at least 8 characters long.

v3_priv_mode:
    choices:
    - DES
    - AES128
    description:
    - Specifies privacy mode for SNMPv3.

v3_priv_pass:
    description:
    - Privacy password for SNMPv3.
    - Must be at least 8 characters long.

output_format:
    choices:
    - snakecase
    - camelcase
    default: snakecase
    description:
    - Instructs module whether response keys should be snake case (ex. C(net_id)) or camel
      case (ex. C(netId)).
    type: str

validate_certs:
    default: true
    description:
    - Whether to validate HTTP certificates.
    type: bool

rate_limit_retry_time:
    default: 165
    description:
    - Number of seconds to retry if rate limiter is triggered.
    type: int

internal_error_retry_time:
    default: 60
    description:
    - Number of seconds to retry if server returns an internal server error.
    type: int

Outputs

data:
  contains:
    hostname:
      description: Hostname of SNMP server.
      returned: success
      sample: n1.meraki.com
      type: str
    peerIps:
      description: Semi-colon delimited list of IPs which can poll SNMP information.
      returned: success
      sample: 192.0.1.1
      type: str
    port:
      description: Port number of SNMP.
      returned: success
      sample: 16100
      type: str
    v2CommunityString:
      description: Automatically generated community string for SNMPv2c.
      returned: When SNMPv2c is enabled.
      sample: o/8zd-JaSb
      type: str
    v2cEnabled:
      description: Shows enabled state of SNMPv2c
      returned: success
      sample: true
      type: bool
    v3AuthMode:
      description: The SNMP version 3 authentication mode either MD5 or SHA.
      returned: success
      sample: SHA
      type: str
    v3Enabled:
      description: Shows enabled state of SNMPv3
      returned: success
      sample: true
      type: bool
    v3PrivMode:
      description: The SNMP version 3 privacy mode DES or AES128.
      returned: success
      sample: AES128
      type: str
    v3User:
      description: Automatically generated username for SNMPv3.
      returned: When SNMPv3c is enabled.
      sample: o/8zd-JaSb
      type: str
  description: Information about SNMP settings.
  returned: always
  type: complex