cisco.meraki.meraki_management_interface – Configure Meraki management interfaces

From Get docs
Ansible/docs/2.10/collections/cisco/meraki/meraki management interface module


cisco.meraki.meraki_management_interface – Configure Meraki management interfaces

Note

This plugin is part of the cisco.meraki collection (version 2.1.3).

To install it use: ansible-galaxy collection install cisco.meraki.

To use it in a playbook, specify: cisco.meraki.meraki_management_interface.


New in version 1.1.0: of cisco.meraki


Synopsis

  • Allows for configuration of management interfaces on Meraki MX, MS, and MR devices.

Parameters

Parameter Choices/Defaults Comments

auth_key

string / required

Authentication key provided by the dashboard. Required if environmental variable MERAKI_KEY is not set.

host

string

Default:

"api.meraki.com"

Hostname for Meraki dashboard.

Can be used to access regional Meraki environments, such as China.

internal_error_retry_time

integer

Default:

60

Number of seconds to retry if server returns an internal server error.

net_id

string

ID of the network to bind or unbind configuration template to.

net_name

string

Name of the network to bind or unbind configuration template to.

org_id

string

ID of organization associated to a configuration template.

org_name

string

Name of organization containing the configuration template.


aliases: organization

output_format

string

  • snakecase

  • camelcase

Instructs module whether response keys should be snake case (ex. net_id) or camel case (ex. netId).

output_level

string

  • debug
  • normal

Set amount of debug output during module execution.

rate_limit_retry_time

integer

Default:

165

Number of seconds to retry if rate limiter is triggered.

serial

string / required

serial number of the device to configure.

state

string

  • absent
  • query

  • present

Specifies whether configuration template information should be queried, modified, or deleted.

timeout

integer

Default:

30

Time to timeout for HTTP requests.

use_https

boolean

  • no
  • yes

If no, it will use HTTP. Otherwise it will use HTTPS.

Only useful for internal Meraki developers.

use_proxy

boolean

  • no

  • yes

If no, it will not use a proxy, even if one is defined in an environment variable on the target hosts.

validate_certs

boolean

  • no
  • yes

Whether to validate HTTP certificates.

wan1

dictionary

Management interface details for management interface.


aliases: mgmt1

static_dns

list / elements=string

DNS servers to use.

Allows for a maximum of 2 addresses.

static_gateway_ip

string

IP address for default gateway.

Valid only if using_static_ip is True.

static_ip

string

IP address assigned to Management interface.

Valid only if using_static_ip is True.

static_subnet_mask

string

Netmask for static IP address.

Valid only if using_static_ip is True.

using_static_ip

boolean

  • no
  • yes

Configures the interface to use static IP or DHCP.

vlan

integer

VLAN number to use for the management network.

wan_enabled

string

  • disabled
  • enabled
  • not configured

States whether the management interface is enabled.

Only valid for MX devices.

wan2

dictionary

Management interface details for management interface.


aliases: mgmt2

static_dns

list / elements=string

DNS servers to use.

Allows for a maximum of 2 addresses.

static_gateway_ip

string

IP address for default gateway.

Valid only if using_static_ip is True.

static_ip

string

IP address assigned to Management interface.

Valid only if using_static_ip is True.

static_subnet_mask

string

Netmask for static IP address.

Valid only if using_static_ip is True.

using_static_ip

boolean

  • no
  • yes

Configures the interface to use static IP or DHCP.

vlan

integer

VLAN number to use for the management network.

wan_enabled

string

  • disabled
  • enabled
  • not configured

States whether the management interface is enabled.

Only valid for MX devices.



Notes

Note

  • WAN2 parameter is only valid for MX appliances.
  • wan_enabled should not be provided for non-MX devies.
  • More information about the Meraki API can be found at https://dashboard.meraki.com/api_docs.
  • Some of the options are likely only used for developers within Meraki.
  • As of Ansible 2.9, Meraki modules output keys as snake case. To use camel case, set the ANSIBLE_MERAKI_FORMAT environment variable to camelcase.
  • Ansible’s Meraki modules will stop supporting camel case output in Ansible 2.13. Please update your playbooks.
  • Check Mode downloads the current configuration from the dashboard, then compares changes against this download. Check Mode will report changed if there are differences in the configurations, but does not submit changes to the API for validation of change.


Examples

- name: Set WAN2 as static IP
  meraki_management_interface:
    auth_key: abc123
    state: present
    org_name: YourOrg
    net_id: YourNetId
    serial: AAAA-BBBB-CCCC
    wan2:
      wan_enabled: enabled
      using_static_ip: yes
      static_ip: 192.168.16.195
      static_gateway_ip: 192.168.16.1
      static_subnet_mask: 255.255.255.0
      static_dns:
        - 1.1.1.1
      vlan: 1
  delegate_to: localhost

- name: Query management information
  meraki_management_interface:
    auth_key: abc123
    state: query
    org_name: YourOrg
    net_id: YourNetId
    serial: AAAA-BBBB-CCCC
  delegate_to: localhost

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description

data

complex

success

Information about queried object.


wan1

complex

success

Management configuration for WAN1 interface


static_dns

list / elements=string

only if static IP assignment is used

List of DNS IP addresses


Sample:

['1.1.1.1']

static_gateway_ip

string

only if static IP assignment is used

Assigned static gateway IP


Sample:

192.0.1.1

static_ip

string

only if static IP assignment is used

Assigned static IP


Sample:

192.0.1.2

static_subnet_mask

string

only if static IP assignment is used

Assigned netmask for static IP


Sample:

255.255.255.0

using_static_ip

boolean

success

Boolean value of whether static IP assignment is used on interface


Sample:

True

vlan

integer

success

VLAN tag id of management VLAN


Sample:

2

wan_enabled

string

success

Enabled state of interface


Sample:

enabled

wan2

complex

success

Management configuration for WAN1 interface


static_dns

list / elements=string

only if static IP assignment is used

List of DNS IP addresses


Sample:

['1.1.1.1']

static_gateway_ip

string

only if static IP assignment is used

Assigned static gateway IP


Sample:

192.0.1.1

static_ip

string

only if static IP assignment is used

Assigned static IP


Sample:

192.0.1.2

static_subnet_mask

string

only if static IP assignment is used

Assigned netmask for static IP


Sample:

255.255.255.0

using_static_ip

boolean

success

Boolean value of whether static IP assignment is used on interface


Sample:

True

vlan

integer

success

VLAN tag id of management VLAN


Sample:

2

wan_enabled

string

success

Enabled state of interface


Sample:

enabled




Authors

  • Kevin Breit (@kbreit)

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/cisco/meraki/meraki_management_interface_module.html