meraki_network – Manage networks in the Meraki cloud¶
New in version 2.6.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
auth_key
string
/ required
|
Authentication key provided by the dashboard. Required if environmental variable
MERAKI_KEY is not set. |
|
disable_my_meraki
boolean
added in 2.7 |
|
- Disables the local device status pages (U[my.meraki.com](my.meraki.com), U[ap.meraki.com](ap.meraki.com), U[switch.meraki.com](switch.meraki.com), U[wired.meraki.com](wired.meraki.com)). - Mutually exclusive of
enable_my_meraki . - Will be deprecated in Ansible 2.13 in favor of enable_my_meraki . |
enable_my_meraki
boolean
added in 2.9 |
|
- Enables the local device status pages (U[my.meraki.com](my.meraki.com), U[ap.meraki.com](ap.meraki.com), U[switch.meraki.com](switch.meraki.com), U[wired.meraki.com](wired.meraki.com)). - Ansible 2.7 had this parameter as
disable_my_meraki . |
enable_remote_status_page
boolean
added in 2.9 |
|
Enables access to the device status page (http://device LAN IP).
Can only be set if
enable_my_meraki: is set to yes . |
enable_vlans
boolean
added in 2.9 |
|
Boolean value specifying whether VLANs should be supported on a network.
Requires
net_name or net_id to be specified. |
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
-
|
ID number of a network.
|
|
net_name
-
|
Name of a network.
aliases: name, network |
|
org_id
string
|
ID of organization.
|
|
org_name
string
|
Name of organization.
aliases: organization |
|
output_format
string
|
|
Instructs module whether response keys should be snake case (ex.
net_id ) or camel case (ex. netId ). |
output_level
string
|
|
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.
|
state
-
|
|
Create or modify an organization.
|
tags
list
|
List of tags to assign to network.
tags name conflicts with the tags parameter in Ansible. Indentation problems may cause unexpected behaviors.Ansible 2.8 converts this to a list from a comma separated list.
|
|
timeout
integer
|
Default: 30
|
Time to timeout for HTTP requests.
|
timezone
-
|
Timezone associated to network.
See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of valid timezones.
|
|
type
list
|
|
Type of network device network manages.
Required when creating a network.
As of Ansible 2.8,
combined type is no longer accepted.As of Ansible 2.8, changes to this parameter are no longer idempotent.
aliases: net_type |
use_https
boolean
|
|
If
no , it will use HTTP. Otherwise it will use HTTPS.Only useful for internal Meraki developers.
|
use_proxy
boolean
|
|
If
no , it will not use a proxy, even if one is defined in an environment variable on the target hosts. |
validate_certs
boolean
|
|
Whether to validate HTTP certificates.
|
Notes¶
Note
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 tocamelcase
.Ansible’s Meraki modules will stop supporting camel case output in Ansible 2.13. Please update your playbooks.
Examples¶
- delegate_to: localhost
block:
- name: List all networks associated to the YourOrg organization
meraki_network:
auth_key: abc12345
state: query
org_name: YourOrg
- name: Query network named MyNet in the YourOrg organization
meraki_network:
auth_key: abc12345
state: query
org_name: YourOrg
net_name: MyNet
- name: Create network named MyNet in the YourOrg organization
meraki_network:
auth_key: abc12345
state: present
org_name: YourOrg
net_name: MyNet
type: switch
timezone: America/Chicago
tags: production, chicago
- name: Create combined network named MyNet in the YourOrg organization
meraki_network:
auth_key: abc12345
state: present
org_name: YourOrg
net_name: MyNet
type:
- switch
- appliance
timezone: America/Chicago
tags: production, chicago
- name: Enable VLANs on a network
meraki_network:
auth_key: abc12345
state: query
org_name: YourOrg
net_name: MyNet
enable_vlans: yes
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
data
complex
|
info |
Information about the created or manipulated object.
|
|
disable_my_meraki_com
boolean
|
success |
States whether my.meraki.com and other device portals should be disabled.
Sample:
True
|
|
disableRemoteStatusPage
boolean
|
success |
Disables access to the device status page.
Sample:
True
|
|
id
string
|
success |
Identification string of network.
Sample:
N_12345
|
|
name
string
|
success |
Written name of network.
Sample:
YourNet
|
|
organization_id
string
|
success |
Organization ID which owns the network.
Sample:
0987654321
|
|
tags
string
|
success |
Space delimited tags assigned to network.
Sample:
production wireless
|
|
time_zone
string
|
success |
Timezone where network resides.
Sample:
America/Chicago
|
|
type
string
|
success |
Functional type of network.
Sample:
switch
|
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Kevin Breit (@kbreit)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.