ansible.builtin.meraki_network (v2.9.24) — 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.9.24

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

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.
    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

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

org_name:
    aliases:
    - organization
    description:
    - Name of organization.
    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

enable_vlans:
    description:
    - Boolean value specifying whether VLANs should be supported on a network.
    - Requires C(net_name) or C(net_id) to be specified.
    type: bool
    version_added: '2.9'
    version_added_collection: ansible.builtin

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

enable_my_meraki:
    description: '- 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 C(disable_my_meraki).

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

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)).
      - Mutually exclusive of C(enable_my_meraki). - Will be deprecated in Ansible 2.13
      in favor of C(enable_my_meraki).

      '
    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

enable_remote_status_page:
    description:
    - Enables access to the device status page (U(http://device LAN IP)).
    - Can only be set if C(enable_my_meraki:) is set to C(yes).
    type: bool
    version_added: '2.9'
    version_added_collection: ansible.builtin

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

Outputs

data:
  contains:
    disableRemoteStatusPage:
      description: Disables access to the device status page.
      returned: success
      sample: true
      type: bool
    disable_my_meraki_com:
      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
    organization_id:
      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
    time_zone:
      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