cisco.meraki.meraki_content_filtering (1.4.0) — module

Edit Meraki MX content filtering policies

Authors: Kevin Breit (@kbreit)

preview | supported by community

Install collection

Install with ansible-galaxy collection install cisco.meraki:==1.4.0


Add to requirements.yml

  collections:
    - name: cisco.meraki
      version: 1.4.0

Description

Allows for setting policy on content filtering.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Set single allowed URL pattern
    meraki_content_filtering:
      auth_key: abc123
      org_name: YourOrg
      net_name: YourMXNet
      allowed_urls:
        - "http://www.ansible.com/*"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Set blocked URL category
    meraki_content_filtering:
      auth_key: abc123
      org_name: YourOrg
      net_name: YourMXNet
      state: present
      category_list_size: full list
      blocked_categories:
        - "Adult and Pornography"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Remove match patterns and categories
    meraki_content_filtering:
      auth_key: abc123
      org_name: YourOrg
      net_name: YourMXNet
      state: present
      category_list_size: full list
      allowed_urls: []
      blocked_urls: []

Inputs

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

state:
    choices:
    - present
    - query
    default: present
    description:
    - States that a policy should be created or modified.
    type: str

net_id:
    description:
    - ID number of a network.
    type: str

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

subset:
    choices:
    - categories
    - policy
    description:
    - Display only certain facts.
    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:
    - network
    description:
    - Name of a network.
    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:
    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

allowed_urls:
    description:
    - List of URL patterns which should be allowed.
    elements: str
    type: list

blocked_urls:
    description:
    - List of URL patterns which should be blocked.
    elements: str
    type: list

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

blocked_categories:
    description:
    - List of content categories which should be blocked.
    - Use the C(meraki_content_filtering_facts) module for a full list of categories.
    elements: str
    type: list

category_list_size:
    choices:
    - top sites
    - full list
    description:
    - Determines whether a network filters fo rall URLs in a category or only the list
      of top blocked sites.
    type: str

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:
    allowed_url_patterns:
      description: Explicitly permitted URL patterns
      returned: query for policy
      sample:
      - http://www.ansible.com
      type: list
    blocked_url_categories:
      contains:
        id:
          description: Unique ID of category to filter
          returned: query for policy
          sample:
          - meraki:contentFiltering/category/1
          type: list
        name:
          description: Name of category to filter
          returned: query for policy
          sample:
          - Real Estate
          type: list
      description: List of blocked URL categories
      returned: query for policy
      type: complex
    blocked_url_patterns:
      description: Explicitly denied URL patterns
      returned: query for policy
      sample:
      - http://www.ansible.net
      type: list
    categories:
      contains:
        id:
          description: Unique ID of content filtering category.
          returned: query for categories
          sample: meraki:contentFiltering/category/1
          type: str
        name:
          description: Name of content filtering category.
          returned: query for categories
          sample: Real Estate
          type: str
      description: List of available content filtering categories.
      returned: query for categories
      type: complex
    url_cateogory_list_size:
      description: Size of categories to cache on MX appliance
      returned: query for policy
      sample: topSites
      type: str
  description: Information about the created or manipulated object.
  returned: info
  type: complex