| 1 |
#!/usr/bin/python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
# Copyright (c) 2021, Cisco Systems |
| 5 |
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 6 |
|
| 7 |
DOCUMENTATION = r""" |
| 8 |
module: networks_group_policies |
| 9 |
short_description: Resource module for networks _grouppolicies |
| 10 |
description: |
| 11 |
- Manage operations create, update and delete of the resource networks _grouppolicies. |
| 12 |
- Create a group policy. |
| 13 |
- Delete a group policy. |
| 14 |
- Update a group policy. |
| 15 |
version_added: '1.0.0' |
| 16 |
extends_documentation_fragment: |
| 17 |
- cisco.meraki.module |
| 18 |
author: Francisco Munoz (@fmunoz) |
| 19 |
options: |
| 20 |
bandwidth: |
| 21 |
description: The bandwidth settings for clients bound to your group policy. |
| 22 |
suboptions: |
| 23 |
bandwidthLimits: |
| 24 |
description: The bandwidth limits object, specifying upload and download speed |
| 25 |
for clients bound to the group policy. These are only enforced if 'settings' |
| 26 |
is set to 'custom'. |
| 27 |
suboptions: |
| 28 |
limitDown: |
| 29 |
description: The maximum download limit (integer, in Kbps). Null indicates |
| 30 |
no limit. |
| 31 |
type: int |
| 32 |
limitUp: |
| 33 |
description: The maximum upload limit (integer, in Kbps). Null indicates |
| 34 |
no limit. |
| 35 |
type: int |
| 36 |
type: dict |
| 37 |
settings: |
| 38 |
description: How bandwidth limits are enforced. Can be 'network default', |
| 39 |
'ignore' or 'custom'. |
| 40 |
type: str |
| 41 |
type: dict |
| 42 |
bonjourForwarding: |
| 43 |
description: The Bonjour settings for your group policy. Only valid if your network |
| 44 |
has a wireless configuration. |
| 45 |
suboptions: |
| 46 |
rules: |
| 47 |
description: A list of the Bonjour forwarding rules for your group policy. |
| 48 |
If 'settings' is set to 'custom', at least one rule must be specified. |
| 49 |
elements: dict |
| 50 |
suboptions: |
| 51 |
description: |
| 52 |
description: A description for your Bonjour forwarding rule. Optional. |
| 53 |
type: str |
| 54 |
services: |
| 55 |
description: A list of Bonjour services. At least one service must be |
| 56 |
specified. Available services are 'All Services', 'AFP', 'AirPlay', |
| 57 |
'Apple screen share', 'BitTorrent', 'Chromecast', 'FTP', 'iChat', 'iTunes', |
| 58 |
'Printers', 'Samba', 'Scanners', 'Spotify' and 'SSH'. |
| 59 |
elements: str |
| 60 |
type: list |
| 61 |
vlanId: |
| 62 |
description: The ID of the service VLAN. Required. |
| 63 |
type: str |
| 64 |
type: list |
| 65 |
settings: |
| 66 |
description: How Bonjour rules are applied. Can be 'network default', 'ignore' |
| 67 |
or 'custom'. |
| 68 |
type: str |
| 69 |
type: dict |
| 70 |
contentFiltering: |
| 71 |
description: The content filtering settings for your group policy. |
| 72 |
suboptions: |
| 73 |
allowedUrlPatterns: |
| 74 |
description: Settings for allowed URL patterns. |
| 75 |
suboptions: |
| 76 |
patterns: |
| 77 |
description: A list of URL patterns that are allowed. |
| 78 |
elements: str |
| 79 |
type: list |
| 80 |
settings: |
| 81 |
description: How URL patterns are applied. Can be 'network default', 'append' |
| 82 |
or 'override'. |
| 83 |
type: str |
| 84 |
type: dict |
| 85 |
blockedUrlCategories: |
| 86 |
description: Settings for blocked URL categories. |
| 87 |
suboptions: |
| 88 |
categories: |
| 89 |
description: A list of URL categories to block. |
| 90 |
elements: str |
| 91 |
type: list |
| 92 |
settings: |
| 93 |
description: How URL categories are applied. Can be 'network default', |
| 94 |
'append' or 'override'. |
| 95 |
type: str |
| 96 |
type: dict |
| 97 |
blockedUrlPatterns: |
| 98 |
description: Settings for blocked URL patterns. |
| 99 |
suboptions: |
| 100 |
patterns: |
| 101 |
description: A list of URL patterns that are blocked. |
| 102 |
elements: str |
| 103 |
type: list |
| 104 |
settings: |
| 105 |
description: How URL patterns are applied. Can be 'network default', 'append' |
| 106 |
or 'override'. |
| 107 |
type: str |
| 108 |
type: dict |
| 109 |
type: dict |
| 110 |
firewallAndTrafficShaping: |
| 111 |
description: The firewall and traffic shaping rules and settings for your policy. |
| 112 |
suboptions: |
| 113 |
l3FirewallRules: |
| 114 |
description: An ordered array of the L3 firewall rules. |
| 115 |
elements: dict |
| 116 |
suboptions: |
| 117 |
comment: |
| 118 |
description: Description of the rule (optional). |
| 119 |
type: str |
| 120 |
destCidr: |
| 121 |
description: Destination IP address (in IP or CIDR notation), a fully-qualified |
| 122 |
domain name (FQDN, if your network supports it) or 'any'. |
| 123 |
type: str |
| 124 |
destPort: |
| 125 |
description: Destination port (integer in the range 1-65535), a port range |
| 126 |
(e.g. 8080-9090), or 'any'. |
| 127 |
type: str |
| 128 |
policy: |
| 129 |
description: '''allow'' or ''deny'' traffic specified by this rule.' |
| 130 |
type: str |
| 131 |
protocol: |
| 132 |
description: The type of protocol (must be 'tcp', 'udp', 'icmp', 'icmp6' |
| 133 |
or 'any'). |
| 134 |
type: str |
| 135 |
type: list |
| 136 |
l7FirewallRules: |
| 137 |
description: An ordered array of L7 firewall rules. |
| 138 |
elements: dict |
| 139 |
suboptions: |
| 140 |
policy: |
| 141 |
description: The policy applied to matching traffic. Must be 'deny'. |
| 142 |
type: str |
| 143 |
type: |
| 144 |
description: Type of the L7 Rule. Must be 'application', 'applicationCategory', |
| 145 |
'host', 'port' or 'ipRange'. |
| 146 |
type: str |
| 147 |
value: |
| 148 |
description: The 'value' of what you want to block. If 'type' is 'host', |
| 149 |
'port' or 'ipRange', 'value' must be a string matching either a hostname |
| 150 |
(e.g. Somewhere.com), a port (e.g. 8080), or an IP range (e.g. 192.1.0.0/16). |
| 151 |
If 'type' is 'application' or 'applicationCategory', then 'value' must |
| 152 |
be an object with an ID for the application. |
| 153 |
type: str |
| 154 |
type: list |
| 155 |
settings: |
| 156 |
description: How firewall and traffic shaping rules are enforced. Can be 'network |
| 157 |
default', 'ignore' or 'custom'. |
| 158 |
type: str |
| 159 |
trafficShapingRules: |
| 160 |
description: An array of traffic shaping rules. Rules are applied in the order |
| 161 |
that they are specified in. An empty list (or null) means no rules. Note |
| 162 |
that you are allowed a maximum of 8 rules. |
| 163 |
elements: dict |
| 164 |
suboptions: |
| 165 |
definitions: |
| 166 |
description: A list of objects describing the definitions of your traffic |
| 167 |
shaping rule. At least one definition is required. |
| 168 |
elements: dict |
| 169 |
suboptions: |
| 170 |
type: |
| 171 |
description: The type of definition. Can be one of 'application', |
| 172 |
'applicationCategory', 'host', 'port', 'ipRange' or 'localNet'. |
| 173 |
type: str |
| 174 |
value: |
| 175 |
description: If "type" is 'host', 'port', 'ipRange' or 'localNet', |
| 176 |
then "value" must be a string, matching either a hostname (e.g. |
| 177 |
"somesite.com"), a port (e.g. 8080), or an IP range ("192.1.0.0", |
| 178 |
"192.1.0.0/16", or "10.1.0.0/16 80"). 'localNet' also supports CIDR |
| 179 |
notation, excluding custom ports. If "type" is 'application' or |
| 180 |
'applicationCategory', then "value" must be an object with the structure |
| 181 |
{ "id" "meraki layer7/..." }, where "id" is the application category |
| 182 |
or application ID (for a list of IDs for your network, use the trafficShaping/applicationCategories |
| 183 |
endpoint). |
| 184 |
type: str |
| 185 |
type: list |
| 186 |
dscpTagValue: |
| 187 |
description: The DSCP tag applied by your rule. Null means 'Do not change |
| 188 |
DSCP tag'. For a list of possible tag values, use the trafficShaping/dscpTaggingOptions |
| 189 |
endpoint. |
| 190 |
type: int |
| 191 |
pcpTagValue: |
| 192 |
description: The PCP tag applied by your rule. Can be 0 (lowest priority) |
| 193 |
through 7 (highest priority). Null means 'Do not set PCP tag'. |
| 194 |
type: int |
| 195 |
perClientBandwidthLimits: |
| 196 |
description: An object describing the bandwidth settings for your rule. |
| 197 |
suboptions: |
| 198 |
bandwidthLimits: |
| 199 |
description: The bandwidth limits object, specifying the upload ('limitUp') |
| 200 |
and download ('limitDown') speed in Kbps. These are only enforced |
| 201 |
if 'settings' is set to 'custom'. |
| 202 |
suboptions: |
| 203 |
limitDown: |
| 204 |
description: The maximum download limit (integer, in Kbps). |
| 205 |
type: int |
| 206 |
limitUp: |
| 207 |
description: The maximum upload limit (integer, in Kbps). |
| 208 |
type: int |
| 209 |
type: dict |
| 210 |
settings: |
| 211 |
description: How bandwidth limits are applied by your rule. Can be |
| 212 |
one of 'network default', 'ignore' or 'custom'. |
| 213 |
type: str |
| 214 |
type: dict |
| 215 |
priority: |
| 216 |
description: A string, indicating the priority level for packets bound |
| 217 |
to your rule. Can be 'low', 'normal' or 'high'. |
| 218 |
type: str |
| 219 |
type: list |
| 220 |
type: dict |
| 221 |
force: |
| 222 |
description: Force query parameter. If true, the system deletes the GP even if |
| 223 |
there are active clients using the GP. After deletion, active clients that were |
| 224 |
assigned to that Group Policy will be left without any policy applied. Default |
| 225 |
is false. |
| 226 |
type: bool |
| 227 |
groupPolicyId: |
| 228 |
description: GroupPolicyId path parameter. Group policy ID. |
| 229 |
type: str |
| 230 |
name: |
| 231 |
description: The name for your group policy. Required. |
| 232 |
type: str |
| 233 |
networkId: |
| 234 |
description: NetworkId path parameter. Network ID. |
| 235 |
type: str |
| 236 |
scheduling: |
| 237 |
description: The schedule for the group policy. Schedules are applied to days |
| 238 |
of the week. |
| 239 |
suboptions: |
| 240 |
enabled: |
| 241 |
description: Whether scheduling is enabled (true) or disabled (false). Defaults |
| 242 |
to false. If true, the schedule objects for each day of the week (monday |
| 243 |
- sunday) are parsed. |
| 244 |
type: bool |
| 245 |
friday: |
| 246 |
description: The schedule object for Friday. |
| 247 |
suboptions: |
| 248 |
active: |
| 249 |
description: Whether the schedule is active (true) or inactive (false) |
| 250 |
during the time specified between 'from' and 'to'. Defaults to true. |
| 251 |
type: bool |
| 252 |
from: |
| 253 |
description: The time, from '00 00' to '24 00'. Must be less than the |
| 254 |
time specified in 'to'. Defaults to '00 00'. Only 30 minute increments |
| 255 |
are allowed. |
| 256 |
type: str |
| 257 |
to: |
| 258 |
description: The time, from '00 00' to '24 00'. Must be greater than the |
| 259 |
time specified in 'from'. Defaults to '24 00'. Only 30 minute increments |
| 260 |
are allowed. |
| 261 |
type: str |
| 262 |
type: dict |
| 263 |
monday: |
| 264 |
description: The schedule object for Monday. |
| 265 |
suboptions: |
| 266 |
active: |
| 267 |
description: Whether the schedule is active (true) or inactive (false) |
| 268 |
during the time specified between 'from' and 'to'. Defaults to true. |
| 269 |
type: bool |
| 270 |
from: |
| 271 |
description: The time, from '00 00' to '24 00'. Must be less than the |
| 272 |
time specified in 'to'. Defaults to '00 00'. Only 30 minute increments |
| 273 |
are allowed. |
| 274 |
type: str |
| 275 |
to: |
| 276 |
description: The time, from '00 00' to '24 00'. Must be greater than the |
| 277 |
time specified in 'from'. Defaults to '24 00'. Only 30 minute increments |
| 278 |
are allowed. |
| 279 |
type: str |
| 280 |
type: dict |
| 281 |
saturday: |
| 282 |
description: The schedule object for Saturday. |
| 283 |
suboptions: |
| 284 |
active: |
| 285 |
description: Whether the schedule is active (true) or inactive (false) |
| 286 |
during the time specified between 'from' and 'to'. Defaults to true. |
| 287 |
type: bool |
| 288 |
from: |
| 289 |
description: The time, from '00 00' to '24 00'. Must be less than the |
| 290 |
time specified in 'to'. Defaults to '00 00'. Only 30 minute increments |
| 291 |
are allowed. |
| 292 |
type: str |
| 293 |
to: |
| 294 |
description: The time, from '00 00' to '24 00'. Must be greater than the |
| 295 |
time specified in 'from'. Defaults to '24 00'. Only 30 minute increments |
| 296 |
are allowed. |
| 297 |
type: str |
| 298 |
type: dict |
| 299 |
sunday: |
| 300 |
description: The schedule object for Sunday. |
| 301 |
suboptions: |
| 302 |
active: |
| 303 |
description: Whether the schedule is active (true) or inactive (false) |
| 304 |
during the time specified between 'from' and 'to'. Defaults to true. |
| 305 |
type: bool |
| 306 |
from: |
| 307 |
description: The time, from '00 00' to '24 00'. Must be less than the |
| 308 |
time specified in 'to'. Defaults to '00 00'. Only 30 minute increments |
| 309 |
are allowed. |
| 310 |
type: str |
| 311 |
to: |
| 312 |
description: The time, from '00 00' to '24 00'. Must be greater than the |
| 313 |
time specified in 'from'. Defaults to '24 00'. Only 30 minute increments |
| 314 |
are allowed. |
| 315 |
type: str |
| 316 |
type: dict |
| 317 |
thursday: |
| 318 |
description: The schedule object for Thursday. |
| 319 |
suboptions: |
| 320 |
active: |
| 321 |
description: Whether the schedule is active (true) or inactive (false) |
| 322 |
during the time specified between 'from' and 'to'. Defaults to true. |
| 323 |
type: bool |
| 324 |
from: |
| 325 |
description: The time, from '00 00' to '24 00'. Must be less than the |
| 326 |
time specified in 'to'. Defaults to '00 00'. Only 30 minute increments |
| 327 |
are allowed. |
| 328 |
type: str |
| 329 |
to: |
| 330 |
description: The time, from '00 00' to '24 00'. Must be greater than the |
| 331 |
time specified in 'from'. Defaults to '24 00'. Only 30 minute increments |
| 332 |
are allowed. |
| 333 |
type: str |
| 334 |
type: dict |
| 335 |
tuesday: |
| 336 |
description: The schedule object for Tuesday. |
| 337 |
suboptions: |
| 338 |
active: |
| 339 |
description: Whether the schedule is active (true) or inactive (false) |
| 340 |
during the time specified between 'from' and 'to'. Defaults to true. |
| 341 |
type: bool |
| 342 |
from: |
| 343 |
description: The time, from '00 00' to '24 00'. Must be less than the |
| 344 |
time specified in 'to'. Defaults to '00 00'. Only 30 minute increments |
| 345 |
are allowed. |
| 346 |
type: str |
| 347 |
to: |
| 348 |
description: The time, from '00 00' to '24 00'. Must be greater than the |
| 349 |
time specified in 'from'. Defaults to '24 00'. Only 30 minute increments |
| 350 |
are allowed. |
| 351 |
type: str |
| 352 |
type: dict |
| 353 |
wednesday: |
| 354 |
description: The schedule object for Wednesday. |
| 355 |
suboptions: |
| 356 |
active: |
| 357 |
description: Whether the schedule is active (true) or inactive (false) |
| 358 |
during the time specified between 'from' and 'to'. Defaults to true. |
| 359 |
type: bool |
| 360 |
from: |
| 361 |
description: The time, from '00 00' to '24 00'. Must be less than the |
| 362 |
time specified in 'to'. Defaults to '00 00'. Only 30 minute increments |
| 363 |
are allowed. |
| 364 |
type: str |
| 365 |
to: |
| 366 |
description: The time, from '00 00' to '24 00'. Must be greater than the |
| 367 |
time specified in 'from'. Defaults to '24 00'. Only 30 minute increments |
| 368 |
are allowed. |
| 369 |
type: str |
| 370 |
type: dict |
| 371 |
type: dict |
| 372 |
splashAuthSettings: |
| 373 |
description: Whether clients bound to your policy will bypass splash authorization |
| 374 |
or behave according to the network's rules. Can be one of 'network default' |
| 375 |
or 'bypass'. Only available if your network has a wireless configuration. |
| 376 |
type: str |
| 377 |
vlanTagging: |
| 378 |
description: The VLAN tagging settings for your group policy. Only available if |
| 379 |
your network has a wireless configuration. |
| 380 |
suboptions: |
| 381 |
settings: |
| 382 |
description: How VLAN tagging is applied. Can be 'network default', 'ignore' |
| 383 |
or 'custom'. |
| 384 |
type: str |
| 385 |
vlanId: |
| 386 |
description: The ID of the vlan you want to tag. This only applies if 'settings' |
| 387 |
is set to 'custom'. |
| 388 |
type: str |
| 389 |
type: dict |
| 390 |
requirements: |
| 391 |
- meraki >= 2.4.9 |
| 392 |
- python >= 3.5 |
| 393 |
seealso: |
| 394 |
- name: Cisco Meraki documentation for networks createNetworkGroupPolicy |
| 395 |
description: Complete reference of the createNetworkGroupPolicy API. |
| 396 |
link: https://developer.cisco.com/meraki/api-v1/#!create-network-group-policy |
| 397 |
- name: Cisco Meraki documentation for networks deleteNetworkGroupPolicy |
| 398 |
description: Complete reference of the deleteNetworkGroupPolicy API. |
| 399 |
link: https://developer.cisco.com/meraki/api-v1/#!delete-network-group-policy |
| 400 |
- name: Cisco Meraki documentation for networks updateNetworkGroupPolicy |
| 401 |
description: Complete reference of the updateNetworkGroupPolicy API. |
| 402 |
link: https://developer.cisco.com/meraki/api-v1/#!update-network-group-policy |
| 403 |
notes: |
| 404 |
- SDK Method used are |
| 405 |
networks.Networks.create_network_group_policy, |
| 406 |
networks.Networks.delete_network_group_policy, |
| 407 |
networks.Networks.update_network_group_policy, |
| 408 |
- Paths used are |
| 409 |
post /networks/{networkId}/groupPolicies, |
| 410 |
delete /networks/{networkId}/groupPolicies/{groupPolicyId}, |
| 411 |
put /networks/{networkId}/groupPolicies/{groupPolicyId}, |
| 412 |
""" |
| 413 |
|
| 414 |
EXAMPLES = r""" |
| 415 |
- name: Create |
| 416 |
cisco.meraki.networks_group_policies: |
| 417 |
meraki_api_key: "{{ meraki_api_key }}" |
| 418 |
meraki_base_url: "{{ meraki_base_url }}" |
| 419 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 420 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 421 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 422 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 423 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 424 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 425 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 426 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 427 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 428 |
meraki_output_log: "{{ meraki_output_log }}" |
| 429 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 430 |
meraki_log_path: "{{ meraki_log_path }}" |
| 431 |
meraki_print_console: "{{ meraki_print_console }}" |
| 432 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 433 |
meraki_simulate: "{{ meraki_simulate }}" |
| 434 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 435 |
meraki_caller: "{{ meraki_caller }}" |
| 436 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 437 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 438 |
state: present |
| 439 |
bandwidth: |
| 440 |
bandwidthLimits: |
| 441 |
limitDown: 1000000 |
| 442 |
limitUp: 1000000 |
| 443 |
settings: custom |
| 444 |
bonjourForwarding: |
| 445 |
rules: |
| 446 |
- description: A simple bonjour rule |
| 447 |
services: |
| 448 |
- All Services |
| 449 |
vlanId: '1' |
| 450 |
settings: custom |
| 451 |
contentFiltering: |
| 452 |
allowedUrlPatterns: |
| 453 |
patterns: [] |
| 454 |
settings: network default |
| 455 |
blockedUrlCategories: |
| 456 |
categories: |
| 457 |
- meraki:contentFiltering/category/1 |
| 458 |
- meraki:contentFiltering/category/7 |
| 459 |
settings: override |
| 460 |
blockedUrlPatterns: |
| 461 |
patterns: |
| 462 |
- http://www.example.com |
| 463 |
- http://www.betting.com |
| 464 |
settings: append |
| 465 |
firewallAndTrafficShaping: |
| 466 |
l3FirewallRules: |
| 467 |
- comment: Allow TCP traffic to subnet with HTTP servers. |
| 468 |
destCidr: 192.168.1.0/24 |
| 469 |
destPort: '443' |
| 470 |
policy: allow |
| 471 |
protocol: tcp |
| 472 |
l7FirewallRules: |
| 473 |
- policy: deny |
| 474 |
type: host |
| 475 |
value: google.com |
| 476 |
settings: custom |
| 477 |
trafficShapingRules: |
| 478 |
- definitions: |
| 479 |
- type: host |
| 480 |
value: google.com |
| 481 |
dscpTagValue: 0 |
| 482 |
pcpTagValue: 0 |
| 483 |
perClientBandwidthLimits: |
| 484 |
bandwidthLimits: |
| 485 |
limitDown: 1000000 |
| 486 |
limitUp: 1000000 |
| 487 |
settings: custom |
| 488 |
priority: normal |
| 489 |
name: No video streaming |
| 490 |
networkId: string |
| 491 |
scheduling: |
| 492 |
enabled: true |
| 493 |
friday: |
| 494 |
active: true |
| 495 |
from: '9:00' |
| 496 |
to: '17:00' |
| 497 |
monday: |
| 498 |
active: true |
| 499 |
from: '9:00' |
| 500 |
to: '17:00' |
| 501 |
saturday: |
| 502 |
active: true |
| 503 |
from: '9:00' |
| 504 |
to: '17:00' |
| 505 |
sunday: |
| 506 |
active: true |
| 507 |
from: '9:00' |
| 508 |
to: '17:00' |
| 509 |
thursday: |
| 510 |
active: true |
| 511 |
from: '9:00' |
| 512 |
to: '17:00' |
| 513 |
tuesday: |
| 514 |
active: true |
| 515 |
from: '9:00' |
| 516 |
to: '17:00' |
| 517 |
wednesday: |
| 518 |
active: true |
| 519 |
from: '9:00' |
| 520 |
to: '17:00' |
| 521 |
splashAuthSettings: bypass |
| 522 |
vlanTagging: |
| 523 |
settings: custom |
| 524 |
vlanId: '1' |
| 525 |
- name: Update by id |
| 526 |
cisco.meraki.networks_group_policies: |
| 527 |
meraki_api_key: "{{ meraki_api_key }}" |
| 528 |
meraki_base_url: "{{ meraki_base_url }}" |
| 529 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 530 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 531 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 532 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 533 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 534 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 535 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 536 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 537 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 538 |
meraki_output_log: "{{ meraki_output_log }}" |
| 539 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 540 |
meraki_log_path: "{{ meraki_log_path }}" |
| 541 |
meraki_print_console: "{{ meraki_print_console }}" |
| 542 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 543 |
meraki_simulate: "{{ meraki_simulate }}" |
| 544 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 545 |
meraki_caller: "{{ meraki_caller }}" |
| 546 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 547 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 548 |
state: present |
| 549 |
bandwidth: |
| 550 |
bandwidthLimits: |
| 551 |
limitDown: 1000000 |
| 552 |
limitUp: 1000000 |
| 553 |
settings: custom |
| 554 |
bonjourForwarding: |
| 555 |
rules: |
| 556 |
- description: A simple bonjour rule |
| 557 |
services: |
| 558 |
- All Services |
| 559 |
vlanId: '1' |
| 560 |
settings: custom |
| 561 |
contentFiltering: |
| 562 |
allowedUrlPatterns: |
| 563 |
patterns: [] |
| 564 |
settings: network default |
| 565 |
blockedUrlCategories: |
| 566 |
categories: |
| 567 |
- meraki:contentFiltering/category/1 |
| 568 |
- meraki:contentFiltering/category/7 |
| 569 |
settings: override |
| 570 |
blockedUrlPatterns: |
| 571 |
patterns: |
| 572 |
- http://www.example.com |
| 573 |
- http://www.betting.com |
| 574 |
settings: append |
| 575 |
firewallAndTrafficShaping: |
| 576 |
l3FirewallRules: |
| 577 |
- comment: Allow TCP traffic to subnet with HTTP servers. |
| 578 |
destCidr: 192.168.1.0/24 |
| 579 |
destPort: '443' |
| 580 |
policy: allow |
| 581 |
protocol: tcp |
| 582 |
l7FirewallRules: |
| 583 |
- policy: deny |
| 584 |
type: host |
| 585 |
value: google.com |
| 586 |
settings: custom |
| 587 |
trafficShapingRules: |
| 588 |
- definitions: |
| 589 |
- type: host |
| 590 |
value: google.com |
| 591 |
dscpTagValue: 0 |
| 592 |
pcpTagValue: 0 |
| 593 |
perClientBandwidthLimits: |
| 594 |
bandwidthLimits: |
| 595 |
limitDown: 1000000 |
| 596 |
limitUp: 1000000 |
| 597 |
settings: custom |
| 598 |
priority: normal |
| 599 |
groupPolicyId: string |
| 600 |
name: No video streaming |
| 601 |
networkId: string |
| 602 |
scheduling: |
| 603 |
enabled: true |
| 604 |
friday: |
| 605 |
active: true |
| 606 |
from: '9:00' |
| 607 |
to: '17:00' |
| 608 |
monday: |
| 609 |
active: true |
| 610 |
from: '9:00' |
| 611 |
to: '17:00' |
| 612 |
saturday: |
| 613 |
active: true |
| 614 |
from: '9:00' |
| 615 |
to: '17:00' |
| 616 |
sunday: |
| 617 |
active: true |
| 618 |
from: '9:00' |
| 619 |
to: '17:00' |
| 620 |
thursday: |
| 621 |
active: true |
| 622 |
from: '9:00' |
| 623 |
to: '17:00' |
| 624 |
tuesday: |
| 625 |
active: true |
| 626 |
from: '9:00' |
| 627 |
to: '17:00' |
| 628 |
wednesday: |
| 629 |
active: true |
| 630 |
from: '9:00' |
| 631 |
to: '17:00' |
| 632 |
splashAuthSettings: bypass |
| 633 |
vlanTagging: |
| 634 |
settings: custom |
| 635 |
vlanId: '1' |
| 636 |
- name: Delete by id |
| 637 |
cisco.meraki.networks_group_policies: |
| 638 |
meraki_api_key: "{{ meraki_api_key }}" |
| 639 |
meraki_base_url: "{{ meraki_base_url }}" |
| 640 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 641 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 642 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 643 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 644 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 645 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 646 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 647 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 648 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 649 |
meraki_output_log: "{{ meraki_output_log }}" |
| 650 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 651 |
meraki_log_path: "{{ meraki_log_path }}" |
| 652 |
meraki_print_console: "{{ meraki_print_console }}" |
| 653 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 654 |
meraki_simulate: "{{ meraki_simulate }}" |
| 655 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 656 |
meraki_caller: "{{ meraki_caller }}" |
| 657 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 658 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 659 |
state: absent |
| 660 |
force: true |
| 661 |
groupPolicyId: string |
| 662 |
networkId: string |
| 663 |
""" |
| 664 |
RETURN = r""" |
| 665 |
meraki_response: |
| 666 |
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK |
| 667 |
returned: always |
| 668 |
type: dict |
| 669 |
sample: > |
| 670 |
{ |
| 671 |
"groupPolicyId": "string", |
| 672 |
"scheduling": { |
| 673 |
"enabled": true, |
| 674 |
"monday": { |
| 675 |
"active": true, |
| 676 |
"from": "string", |
| 677 |
"to": "string" |
| 678 |
}, |
| 679 |
"tuesday": { |
| 680 |
"active": true, |
| 681 |
"from": "string", |
| 682 |
"to": "string" |
| 683 |
}, |
| 684 |
"wednesday": { |
| 685 |
"active": true, |
| 686 |
"from": "string", |
| 687 |
"to": "string" |
| 688 |
}, |
| 689 |
"thursday": { |
| 690 |
"active": true, |
| 691 |
"from": "string", |
| 692 |
"to": "string" |
| 693 |
}, |
| 694 |
"friday": { |
| 695 |
"active": true, |
| 696 |
"from": "string", |
| 697 |
"to": "string" |
| 698 |
}, |
| 699 |
"saturday": { |
| 700 |
"active": true, |
| 701 |
"from": "string", |
| 702 |
"to": "string" |
| 703 |
}, |
| 704 |
"sunday": { |
| 705 |
"active": true, |
| 706 |
"from": "string", |
| 707 |
"to": "string" |
| 708 |
} |
| 709 |
}, |
| 710 |
"bandwidth": { |
| 711 |
"settings": "string", |
| 712 |
"bandwidthLimits": { |
| 713 |
"limitUp": 0, |
| 714 |
"limitDown": 0 |
| 715 |
} |
| 716 |
}, |
| 717 |
"firewallAndTrafficShaping": { |
| 718 |
"settings": "string", |
| 719 |
"trafficShapingRules": [ |
| 720 |
{ |
| 721 |
"definitions": [ |
| 722 |
{ |
| 723 |
"type": "string", |
| 724 |
"value": "string" |
| 725 |
} |
| 726 |
], |
| 727 |
"perClientBandwidthLimits": { |
| 728 |
"settings": "string", |
| 729 |
"bandwidthLimits": { |
| 730 |
"limitUp": 0, |
| 731 |
"limitDown": 0 |
| 732 |
} |
| 733 |
}, |
| 734 |
"dscpTagValue": 0, |
| 735 |
"pcpTagValue": 0, |
| 736 |
"priority": "string" |
| 737 |
} |
| 738 |
], |
| 739 |
"l3FirewallRules": [ |
| 740 |
{ |
| 741 |
"comment": "string", |
| 742 |
"policy": "string", |
| 743 |
"protocol": "string", |
| 744 |
"destPort": "string", |
| 745 |
"destCidr": "string" |
| 746 |
} |
| 747 |
], |
| 748 |
"l7FirewallRules": [ |
| 749 |
{ |
| 750 |
"policy": "string", |
| 751 |
"type": "string", |
| 752 |
"value": "string" |
| 753 |
} |
| 754 |
] |
| 755 |
}, |
| 756 |
"contentFiltering": { |
| 757 |
"allowedUrlPatterns": { |
| 758 |
"settings": "string", |
| 759 |
"patterns": [ |
| 760 |
"string" |
| 761 |
] |
| 762 |
}, |
| 763 |
"blockedUrlPatterns": { |
| 764 |
"settings": "string", |
| 765 |
"patterns": [ |
| 766 |
"string" |
| 767 |
] |
| 768 |
}, |
| 769 |
"blockedUrlCategories": { |
| 770 |
"settings": "string", |
| 771 |
"categories": [ |
| 772 |
"string" |
| 773 |
] |
| 774 |
} |
| 775 |
}, |
| 776 |
"splashAuthSettings": "string", |
| 777 |
"vlanTagging": { |
| 778 |
"settings": "string", |
| 779 |
"vlanId": "string" |
| 780 |
}, |
| 781 |
"bonjourForwarding": { |
| 782 |
"settings": "string", |
| 783 |
"rules": [ |
| 784 |
{ |
| 785 |
"description": "string", |
| 786 |
"vlanId": "string", |
| 787 |
"services": [ |
| 788 |
"string" |
| 789 |
] |
| 790 |
} |
| 791 |
] |
| 792 |
} |
| 793 |
} |
| 794 |
""" |