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

Manage webhooks configured in the Meraki cloud

| "added in version" 2.9 of ansible.builtin"

Authors: Kevin Breit (@kbreit)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.24

Description

Configure and query information about webhooks within the Meraki cloud.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create webhook
  meraki_webhook:
    auth_key: abc123
    state: present
    org_name: YourOrg
    net_name: YourNet
    name: Test_Hook
    url: https://webhook.url/
    shared_secret: shhhdonttellanyone
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query one webhook
  meraki_webhook:
    auth_key: abc123
    state: query
    org_name: YourOrg
    net_name: YourNet
    name: Test_Hook
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Query all webhooks
  meraki_webhook:
    auth_key: abc123
    state: query
    org_name: YourOrg
    net_name: YourNet
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete webhook
  meraki_webhook:
    auth_key: abc123
    state: absent
    org_name: YourOrg
    net_name: YourNet
    name: Test_Hook
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Test webhook
  meraki_webhook:
    auth_key: abc123
    state: present
    org_name: YourOrg
    net_name: YourNet
    test: test
    url: https://webhook.url/abc123
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get webhook status
  meraki_webhook:
    auth_key: abc123
    state: present
    org_name: YourOrg
    net_name: YourNet
    test: status
    test_id: abc123531234
  delegate_to: localhost

Inputs

    
url:
    description:
    - URL to access when calling webhook.
    type: str

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 webhook.
    type: str

test:
    choices:
    - test
    - status
    description:
    - Indicates whether to test or query status.
    type: str

state:
    choices:
    - absent
    - present
    - query
    default: query
    description:
    - Specifies whether object should be queried, created/modified, or removed.
    type: str

net_id:
    description:
    - ID of network which configuration is applied to.
    type: str

org_id:
    description:
    - ID of organization.
    type: str

test_id:
    description:
    - ID of webhook test query.
    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:
    - network
    description:
    - Name of network which configuration is applied to.
    type: str

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

webhook_id:
    description:
    - Unique ID of webhook.
    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

shared_secret:
    description:
    - Secret password to use when accessing webhook.
    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:
    id:
      description: Unique ID of webhook.
      returned: success
      sample: aHR0cHM6Ly93ZWJob22LnvpdGUvOGViNWI3NmYtYjE2Ny00Y2I4LTlmYzQtND32Mj3F5NzIaMjQ0
      type: str
    name:
      description: Descriptive name of webhook.
      returned: success
      sample: Test_Hook
      type: str
    networkId:
      description: ID of network containing webhook object.
      returned: success
      sample: N_12345
      type: str
    shared_secret:
      description: Password for webhook.
      returned: success
      sample: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
      type: str
    status:
      description: Status of webhook test.
      returned: success, when testing webhook
      sample: enqueued
      type: str
    url:
      description: URL of webhook endpoint.
      returned: success
      sample: https://webhook.url/abc123
      type: str
  description: List of administrators.
  returned: success
  type: complex