ansible.builtin.meraki_admin (v2.9.24) — module

Manage administrators 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 administrators within Meraki.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query information about all administrators associated to the organization
  meraki_admin:
    auth_key: abc12345
    org_name: YourOrg
    state: query
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query information about a single administrator by name
  meraki_admin:
    auth_key: abc12345
    org_id: 12345
    state: query
    name: Jane Doe
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query information about a single administrator by email
  meraki_admin:
    auth_key: abc12345
    org_name: YourOrg
    state: query
    email: jane@doe.com
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create new administrator with organization access
  meraki_admin:
    auth_key: abc12345
    org_name: YourOrg
    state: present
    name: Jane Doe
    org_access: read-only
    email: jane@doe.com
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create new administrator with organization access
  meraki_admin:
    auth_key: abc12345
    org_name: YourOrg
    state: present
    name: Jane Doe
    org_access: read-only
    email: jane@doe.com
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a new administrator with organization access
  meraki_admin:
    auth_key: abc12345
    org_name: YourOrg
    state: present
    name: Jane Doe
    org_access: read-only
    email: jane@doe.com
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Revoke access to an organization for an administrator
  meraki_admin:
    auth_key: abc12345
    org_name: YourOrg
    state: absent
    email: jane@doe.com
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a new administrator with full access to two tags
  meraki_admin:
    auth_key: abc12345
    org_name: YourOrg
    state: present
    name: Jane Doe
    orgAccess: read-only
    email: jane@doe.com
    tags:
        - tag: tenant
          access: full
        - tag: corporate
          access: read-only
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a new administrator with full access to a network
  meraki_admin:
    auth_key: abc12345
    org_name: YourOrg
    state: present
    name: Jane Doe
    orgAccess: read-only
    email: jane@doe.com
    networks:
        - id: N_12345
          access: full

Inputs

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

name:
    description:
    - Name of the dashboard administrator.
    - Required when creating a new administrator.
    type: str

tags:
    description:
    - Tags the administrator has privileges on.
    - When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
    - If C(none) is specified, C(network) or C(tags) must be specified.
    suboptions:
      access:
        description:
        - The privilege of the dashboard administrator for the tag.
        type: str
      tag:
        description:
        - Object tag which privileges should be assigned.
        type: str

email:
    description:
    - Email address for the dashboard administrator.
    - Email cannot be updated.
    - Required when creating or editing an administrator.
    type: str

state:
    choices:
    - absent
    - present
    - query
    description:
    - Create or modify, or delete an organization
    - If C(state) is C(absent), name takes priority over email if both are specified.
    required: true
    type: str

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

networks:
    description:
    - List of networks the administrator has privileges on.
    - When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
    suboptions:
      access:
        description:
        - The privilege of the dashboard administrator on the network.
        - Valid options are C(full), C(read-only), or C(none).
        type: str
      id:
        description:
        - Network ID for which administrator should have privileges assigned.
        type: str

org_name:
    aliases:
    - organization
    description:
    - Name of organization.
    - Used when C(name) should refer to another object.
    - When creating a new administrator, C(org_name), C(network), or C(tags) must be specified.
    type: str

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

org_access:
    aliases:
    - orgAccess
    choices:
    - full
    - none
    - read-only
    description:
    - Privileges assigned to the administrator in the organization.
    type: str

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

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:
    account_status:
      description: Status of account.
      returned: success
      sample: ok
      type: str
    email:
      description: Email address of administrator.
      returned: success
      sample: your@email.com
      type: str
    has_api_key:
      description: Defines whether administrator has an API assigned to their account.
      returned: success
      sample: false
      type: bool
    id:
      description: Unique identification number of administrator.
      returned: success
      sample: 1234567890
      type: str
    last_active:
      description: Date and time of time the administrator was active within Dashboard.
      returned: success
      sample: 2019-01-28 14:58:56 -0800
      type: str
    name:
      description: Given name of administrator.
      returned: success
      sample: John Doe
      type: str
    networks:
      contains:
        access:
          description: Access level of administrator. Options are 'full', 'read-only',
            or 'none'.
          returned: when network permissions are set
          sample: read-only
          type: str
        id:
          description: The network ID.
          returned: when network permissions are set
          sample: N_0123456789
          type: str
      description: List of networks administrator has access on.
      returned: success
      type: complex
    org_access:
      description: The privilege of the dashboard administrator on the organization.
        Options are 'full', 'read-only', or 'none'.
      returned: success
      sample: full
      type: str
    tags:
      contains:
        access:
          description: Access level of administrator. Options are 'full', 'read-only',
            or 'none'.
          returned: when tag permissions are set
          sample: full
          type: str
        tag:
          description: Tag name.
          returned: when tag permissions are set
          sample: production
          type: str
      description: Tags the administrator has access on.
      returned: success
      type: complex
    two_factor_auth_enabled:
      description: Enabled state of two-factor authentication for administrator.
      returned: success
      sample: false
      type: bool
  description: List of administrators.
  returned: success
  type: complex