ansible.builtin.meraki_network (v2.8.13) — module

Manage networks 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.13

Description

Allows for creation, management, and visibility into networks within Meraki.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all networks associated to the YourOrg organization
  meraki_network:
    auth_key: abc12345
    state: query
    org_name: YourOrg
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query network named MyNet in the YourOrg organization
  meraki_network:
    auth_key: abc12345
    state: query
    org_name: YourOrg
    net_name: MyNet
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  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

tags:
    description:
    - List of tags to assign to network.
    - C(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.
    type: list

type:
    aliases:
    - net_type
    choices:
    - appliance
    - switch
    - wireless
    description:
    - Type of network device network manages.
    - Required when creating a network.
    - As of Ansible 2.8, C(combined) type is no longer accepted.
    - As of Ansible 2.8, changes to this parameter are no longer idempotent.
    type: list

state:
    choices:
    - absent
    - present
    - query
    default: present
    description:
    - Create or modify an organization.

net_id:
    description:
    - ID number of a network.

org_id:
    description:
    - ID of organization associated to a network.
    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
      MERAKI_KEY is not set.
    required: true
    type: str

net_name:
    aliases:
    - name
    - network
    description:
    - Name of a network.

org_name:
    aliases:
    - organization
    description:
    - Name of organization associated to a network.
    type: str

timezone:
    description:
    - Timezone associated to network.
    - See U(https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a list of
      valid timezones.

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

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

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

disable_my_meraki:
    description: '- 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))

      '
    type: bool
    version_added: '2.7'
    version_added_collection: ansible.builtin

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:
    disableMyMerakiCom:
      description: States whether U(my.meraki.com) and other device portals should
        be disabled.
      returned: success
      sample: true
      type: bool
    id:
      description: Identification string of network.
      returned: success
      sample: N_12345
      type: str
    name:
      description: Written name of network.
      returned: success
      sample: YourNet
      type: str
    organizationId:
      description: Organization ID which owns the network.
      returned: success
      sample: 0987654321
      type: str
    tags:
      description: Space delimited tags assigned to network.
      returned: success
      sample: ' production wireless '
      type: str
    timeZone:
      description: Timezone where network resides.
      returned: success
      sample: America/Chicago
      type: str
    type:
      description: Functional type of network.
      returned: success
      sample: switch
      type: str
  description: Information about the created or manipulated object.
  returned: info
  type: complex