| 1 |
#!/usr/bin/python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
# |
| 4 |
# Ansible module to manage CheckPoint Firewall (c) 2019 |
| 5 |
# |
| 6 |
# Ansible is free software: you can redistribute it and/or modify |
| 7 |
# it under the terms of the GNU General Public License as published by |
| 8 |
# the Free Software Foundation, either version 3 of the License, or |
| 9 |
# (at your option) any later version. |
| 10 |
# |
| 11 |
# Ansible is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
# GNU General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU General Public License |
| 17 |
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
# |
| 19 |
|
| 20 |
from __future__ import absolute_import, division, print_function |
| 21 |
|
| 22 |
__metaclass__ = type |
| 23 |
|
| 24 |
ANSIBLE_METADATA = { |
| 25 |
"metadata_version": "1.1", |
| 26 |
"status": ["preview"], |
| 27 |
"supported_by": "community", |
| 28 |
} |
| 29 |
|
| 30 |
DOCUMENTATION = """ |
| 31 |
--- |
| 32 |
module: cp_mgmt_simple_cluster |
| 33 |
short_description: Manages simple-cluster objects on Checkpoint over Web Services API |
| 34 |
description: |
| 35 |
- Manages simple-cluster objects on Checkpoint devices including creating, updating and removing objects. |
| 36 |
- All operations are performed over Web Services API. |
| 37 |
- Available from R80.40 management version. |
| 38 |
version_added: "3.0.0" |
| 39 |
author: "Eden Brillant (@chkp-edenbr)" |
| 40 |
options: |
| 41 |
name: |
| 42 |
description: |
| 43 |
- Object name. |
| 44 |
type: str |
| 45 |
required: True |
| 46 |
ip_address: |
| 47 |
description: |
| 48 |
- IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| 49 |
type: str |
| 50 |
ipv4_address: |
| 51 |
description: |
| 52 |
- IPv4 address. |
| 53 |
type: str |
| 54 |
ipv6_address: |
| 55 |
description: |
| 56 |
- IPv6 address. |
| 57 |
type: str |
| 58 |
anti_bot: |
| 59 |
description: |
| 60 |
- Anti-Bot blade enabled. |
| 61 |
type: bool |
| 62 |
anti_virus: |
| 63 |
description: |
| 64 |
- Anti-Virus blade enabled. |
| 65 |
type: bool |
| 66 |
application_control: |
| 67 |
description: |
| 68 |
- Application Control blade enabled. |
| 69 |
type: bool |
| 70 |
cluster_mode: |
| 71 |
description: |
| 72 |
- Cluster mode. |
| 73 |
type: str |
| 74 |
choices: ['cluster-xl-ha', 'cluster-ls-multicast', 'cluster-ls-unicast', 'opsec-ha', 'opsec-ls'] |
| 75 |
content_awareness: |
| 76 |
description: |
| 77 |
- Content Awareness blade enabled. |
| 78 |
type: bool |
| 79 |
enable_https_inspection: |
| 80 |
description: |
| 81 |
- Enable HTTPS Inspection after defining an outbound inspection certificate. <br>To define the outbound certificate use outbound inspection |
| 82 |
certificate API. |
| 83 |
type: bool |
| 84 |
firewall: |
| 85 |
description: |
| 86 |
- Firewall blade enabled. |
| 87 |
type: bool |
| 88 |
firewall_settings: |
| 89 |
description: |
| 90 |
- N/A |
| 91 |
type: dict |
| 92 |
suboptions: |
| 93 |
auto_calculate_connections_hash_table_size_and_memory_pool: |
| 94 |
description: |
| 95 |
- N/A |
| 96 |
type: bool |
| 97 |
auto_maximum_limit_for_concurrent_connections: |
| 98 |
description: |
| 99 |
- N/A |
| 100 |
type: bool |
| 101 |
connections_hash_size: |
| 102 |
description: |
| 103 |
- N/A |
| 104 |
type: int |
| 105 |
maximum_limit_for_concurrent_connections: |
| 106 |
description: |
| 107 |
- N/A |
| 108 |
type: int |
| 109 |
maximum_memory_pool_size: |
| 110 |
description: |
| 111 |
- N/A |
| 112 |
type: int |
| 113 |
memory_pool_size: |
| 114 |
description: |
| 115 |
- N/A |
| 116 |
type: int |
| 117 |
hardware: |
| 118 |
description: |
| 119 |
- Cluster platform hardware. |
| 120 |
type: str |
| 121 |
interfaces: |
| 122 |
description: |
| 123 |
- N/A |
| 124 |
type: list |
| 125 |
elements: dict |
| 126 |
suboptions: |
| 127 |
name: |
| 128 |
description: |
| 129 |
- Object name. |
| 130 |
type: str |
| 131 |
interface_type: |
| 132 |
description: |
| 133 |
- Cluster interface type. |
| 134 |
type: str |
| 135 |
choices: ['cluster', 'sync', 'cluster + sync', 'private'] |
| 136 |
ip_address: |
| 137 |
description: |
| 138 |
- IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| 139 |
type: str |
| 140 |
ipv4_address: |
| 141 |
description: |
| 142 |
- IPv4 address. |
| 143 |
type: str |
| 144 |
ipv6_address: |
| 145 |
description: |
| 146 |
- IPv6 address. |
| 147 |
type: str |
| 148 |
network_mask: |
| 149 |
description: |
| 150 |
- IPv4 or IPv6 network mask. If both masks are required use ipv4-network-mask and ipv6-network-mask fields explicitly. Instead of |
| 151 |
providing mask itself it is possible to specify IPv4 or IPv6 mask length in mask-length field. If both masks length are required use |
| 152 |
ipv4-mask-length and ipv6-mask-length fields explicitly. |
| 153 |
type: str |
| 154 |
ipv4_network_mask: |
| 155 |
description: |
| 156 |
- IPv4 network address. |
| 157 |
type: str |
| 158 |
ipv6_network_mask: |
| 159 |
description: |
| 160 |
- IPv6 network address. |
| 161 |
type: str |
| 162 |
mask_length: |
| 163 |
description: |
| 164 |
- IPv4 or IPv6 network mask length. |
| 165 |
type: str |
| 166 |
ipv4_mask_length: |
| 167 |
description: |
| 168 |
- IPv4 network mask length. |
| 169 |
type: str |
| 170 |
ipv6_mask_length: |
| 171 |
description: |
| 172 |
- IPv6 network mask length. |
| 173 |
type: str |
| 174 |
anti_spoofing: |
| 175 |
description: |
| 176 |
- N/A |
| 177 |
type: bool |
| 178 |
anti_spoofing_settings: |
| 179 |
description: |
| 180 |
- N/A |
| 181 |
type: dict |
| 182 |
suboptions: |
| 183 |
action: |
| 184 |
description: |
| 185 |
- If packets will be rejected (the Prevent option) or whether the packets will be monitored (the Detect option). |
| 186 |
type: str |
| 187 |
choices: ['prevent', 'detect'] |
| 188 |
exclude_packets: |
| 189 |
description: |
| 190 |
- Don't check packets from excluded network. |
| 191 |
- Available from R81.10 management version. |
| 192 |
type: bool |
| 193 |
excluded_network_name: |
| 194 |
description: |
| 195 |
- Excluded network name. |
| 196 |
- Available from R81.10 management version. |
| 197 |
type: str |
| 198 |
excluded_network_uid: |
| 199 |
description: |
| 200 |
- Excluded network UID. |
| 201 |
- Available from R81.10 management version. |
| 202 |
type: str |
| 203 |
spoof_tracking: |
| 204 |
description: |
| 205 |
- Spoof tracking. |
| 206 |
- Available from R81.10 management version. |
| 207 |
type: str |
| 208 |
choices: ['none', 'log', 'alert'] |
| 209 |
multicast_address: |
| 210 |
description: |
| 211 |
- Multicast IP Address. |
| 212 |
type: str |
| 213 |
multicast_address_type: |
| 214 |
description: |
| 215 |
- Multicast Address Type. |
| 216 |
type: str |
| 217 |
choices: ['manual', 'default'] |
| 218 |
security_zone: |
| 219 |
description: |
| 220 |
- N/A |
| 221 |
type: bool |
| 222 |
security_zone_settings: |
| 223 |
description: |
| 224 |
- N/A |
| 225 |
type: dict |
| 226 |
suboptions: |
| 227 |
auto_calculated: |
| 228 |
description: |
| 229 |
- Security Zone is calculated according to where the interface leads to. |
| 230 |
type: bool |
| 231 |
specific_zone: |
| 232 |
description: |
| 233 |
- Security Zone specified manually. |
| 234 |
type: str |
| 235 |
tags: |
| 236 |
description: |
| 237 |
- Collection of tag identifiers. |
| 238 |
type: list |
| 239 |
elements: str |
| 240 |
topology: |
| 241 |
description: |
| 242 |
- N/A |
| 243 |
type: str |
| 244 |
choices: ['automatic', 'external', 'internal'] |
| 245 |
topology_settings: |
| 246 |
description: |
| 247 |
- N/A |
| 248 |
type: dict |
| 249 |
suboptions: |
| 250 |
interface_leads_to_dmz: |
| 251 |
description: |
| 252 |
- Whether this interface leads to demilitarized zone (perimeter network). |
| 253 |
type: bool |
| 254 |
ip_address_behind_this_interface: |
| 255 |
description: |
| 256 |
- Network settings behind this interface. |
| 257 |
type: str |
| 258 |
choices: ['not defined', 'network defined by the interface ip and net mask', 'network defined by routing', 'specific'] |
| 259 |
specific_network: |
| 260 |
description: |
| 261 |
- Network behind this interface. |
| 262 |
type: str |
| 263 |
color: |
| 264 |
description: |
| 265 |
- Color of the object. Should be one of existing colors. |
| 266 |
type: str |
| 267 |
choices: ['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green', 'khaki', 'orchid', 'dark orange', |
| 268 |
'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown', 'forest green', 'gold', 'dark gold', 'gray', 'dark gray', |
| 269 |
'light green', 'lemon chiffon', 'coral', 'sea green', 'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', |
| 270 |
'orange', 'red', 'sienna', 'yellow'] |
| 271 |
comments: |
| 272 |
description: |
| 273 |
- Comments string. |
| 274 |
type: str |
| 275 |
details_level: |
| 276 |
description: |
| 277 |
- The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed |
| 278 |
representation of the object. |
| 279 |
type: str |
| 280 |
choices: ['uid', 'standard', 'full'] |
| 281 |
ignore_warnings: |
| 282 |
description: |
| 283 |
- Apply changes ignoring warnings. |
| 284 |
type: bool |
| 285 |
ignore_errors: |
| 286 |
description: |
| 287 |
- Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| 288 |
type: bool |
| 289 |
ips: |
| 290 |
description: |
| 291 |
- Intrusion Prevention System blade enabled. |
| 292 |
type: bool |
| 293 |
ips_settings: |
| 294 |
description: |
| 295 |
- Cluster IPS settings. |
| 296 |
- Available from R82 JHF management version. |
| 297 |
type: dict |
| 298 |
version_added: "6.5.0" |
| 299 |
suboptions: |
| 300 |
bypass_all_under_load: |
| 301 |
description: |
| 302 |
- Disable/enable all IPS protections until CPU and memory levels are back to normal. |
| 303 |
type: bool |
| 304 |
bypass_track_method: |
| 305 |
description: |
| 306 |
- Track options when all IPS protections are disabled until CPU/memory levels are back to normal. |
| 307 |
type: str |
| 308 |
choices: ['none', 'log', 'popup alert', 'mail alert', 'snmp trap alert', 'user defined alert no.1', 'user defined alert no.2', |
| 309 |
'user defined alert no.3'] |
| 310 |
activation_mode: |
| 311 |
description: |
| 312 |
- Defines whether the IPS blade operates in Detect Only mode or enforces the configured IPS Policy. |
| 313 |
type: str |
| 314 |
choices: ['according-to-policy', 'detect-only'] |
| 315 |
cpu_usage_low_threshold: |
| 316 |
description: |
| 317 |
- CPU usage low threshold percentage (1-99). |
| 318 |
type: int |
| 319 |
cpu_usage_high_threshold: |
| 320 |
description: |
| 321 |
- CPU usage high threshold percentage (1-99). |
| 322 |
type: int |
| 323 |
memory_usage_low_threshold: |
| 324 |
description: |
| 325 |
- Memory usage low threshold percentage (1-99). |
| 326 |
type: int |
| 327 |
memory_usage_high_threshold: |
| 328 |
description: |
| 329 |
- Memory usage high threshold percentage (1-99). |
| 330 |
type: int |
| 331 |
send_threat_cloud_info: |
| 332 |
description: |
| 333 |
- Help improve Check Point Threat Prevention product by sending anonymous information. |
| 334 |
type: bool |
| 335 |
reject_on_cluster_fail_over: |
| 336 |
description: |
| 337 |
- Define the IPS connections during fail over reject packets or accept packets. |
| 338 |
type: bool |
| 339 |
members: |
| 340 |
description: |
| 341 |
- Cluster members list. Only new cluster member can be added. Adding existing gateway is not supported. |
| 342 |
type: list |
| 343 |
elements: dict |
| 344 |
suboptions: |
| 345 |
name: |
| 346 |
description: |
| 347 |
- Object name. |
| 348 |
type: str |
| 349 |
interfaces: |
| 350 |
description: |
| 351 |
- Cluster Member network interfaces. |
| 352 |
type: list |
| 353 |
elements: dict |
| 354 |
suboptions: |
| 355 |
name: |
| 356 |
description: |
| 357 |
- Object name. |
| 358 |
type: str |
| 359 |
anti_spoofing: |
| 360 |
description: |
| 361 |
- N/A |
| 362 |
type: bool |
| 363 |
anti_spoofing_settings: |
| 364 |
description: |
| 365 |
- N/A |
| 366 |
type: dict |
| 367 |
suboptions: |
| 368 |
action: |
| 369 |
description: |
| 370 |
- If packets will be rejected (the Prevent option) or whether the packets will be monitored (the Detect option). |
| 371 |
type: str |
| 372 |
choices: ['prevent', 'detect'] |
| 373 |
exclude_packets: |
| 374 |
description: |
| 375 |
- Don't check packets from excluded network. |
| 376 |
- Available from R81.10 management version. |
| 377 |
type: bool |
| 378 |
excluded_network_name: |
| 379 |
description: |
| 380 |
- Excluded network name. |
| 381 |
- Available from R81.10 management version. |
| 382 |
type: str |
| 383 |
excluded_network_uid: |
| 384 |
description: |
| 385 |
- Excluded network UID. |
| 386 |
- Available from R81.10 management version. |
| 387 |
type: str |
| 388 |
spoof_tracking: |
| 389 |
description: |
| 390 |
- Spoof tracking. |
| 391 |
- Available from R81.10 management version. |
| 392 |
type: str |
| 393 |
choices: ['none', 'log', 'alert'] |
| 394 |
ip_address: |
| 395 |
description: |
| 396 |
- IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| 397 |
type: str |
| 398 |
ipv4_address: |
| 399 |
description: |
| 400 |
- IPv4 address. |
| 401 |
type: str |
| 402 |
ipv6_address: |
| 403 |
description: |
| 404 |
- IPv6 address. |
| 405 |
type: str |
| 406 |
network_mask: |
| 407 |
description: |
| 408 |
- IPv4 or IPv6 network mask. If both masks are required use ipv4-network-mask and ipv6-network-mask fields explicitly. Instead |
| 409 |
of providing mask itself it is possible to specify IPv4 or IPv6 mask length in mask-length field. If both masks length are required use |
| 410 |
ipv4-mask-length and ipv6-mask-length fields explicitly. |
| 411 |
type: str |
| 412 |
ipv4_network_mask: |
| 413 |
description: |
| 414 |
- IPv4 network address. |
| 415 |
type: str |
| 416 |
ipv6_network_mask: |
| 417 |
description: |
| 418 |
- IPv6 network address. |
| 419 |
type: str |
| 420 |
mask_length: |
| 421 |
description: |
| 422 |
- IPv4 or IPv6 network mask length. |
| 423 |
type: str |
| 424 |
ipv4_mask_length: |
| 425 |
description: |
| 426 |
- IPv4 network mask length. |
| 427 |
type: str |
| 428 |
ipv6_mask_length: |
| 429 |
description: |
| 430 |
- IPv6 network mask length. |
| 431 |
type: str |
| 432 |
security_zone: |
| 433 |
description: |
| 434 |
- N/A |
| 435 |
type: bool |
| 436 |
security_zone_settings: |
| 437 |
description: |
| 438 |
- N/A |
| 439 |
type: dict |
| 440 |
suboptions: |
| 441 |
auto_calculated: |
| 442 |
description: |
| 443 |
- Security Zone is calculated according to where the interface leads to. |
| 444 |
type: bool |
| 445 |
specific_zone: |
| 446 |
description: |
| 447 |
- Security Zone specified manually. |
| 448 |
type: str |
| 449 |
tags: |
| 450 |
description: |
| 451 |
- Collection of tag identifiers. |
| 452 |
type: list |
| 453 |
elements: str |
| 454 |
topology: |
| 455 |
description: |
| 456 |
- N/A |
| 457 |
type: str |
| 458 |
choices: ['automatic', 'external', 'internal'] |
| 459 |
topology_settings: |
| 460 |
description: |
| 461 |
- N/A |
| 462 |
type: dict |
| 463 |
suboptions: |
| 464 |
interface_leads_to_dmz: |
| 465 |
description: |
| 466 |
- Whether this interface leads to demilitarized zone (perimeter network). |
| 467 |
type: bool |
| 468 |
ip_address_behind_this_interface: |
| 469 |
description: |
| 470 |
- Network settings behind this interface. |
| 471 |
type: str |
| 472 |
choices: ['not defined', 'network defined by the interface ip and net mask', 'network defined by routing', 'specific'] |
| 473 |
specific_network: |
| 474 |
description: |
| 475 |
- Network behind this interface. |
| 476 |
type: str |
| 477 |
color: |
| 478 |
description: |
| 479 |
- Color of the object. Should be one of existing colors. |
| 480 |
type: str |
| 481 |
choices: ['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green', 'khaki', 'orchid', 'dark orange', |
| 482 |
'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown', 'forest green', 'gold', 'dark gold', 'gray', 'dark gray', |
| 483 |
'light green', 'lemon chiffon', 'coral', 'sea green', 'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', |
| 484 |
'orange', 'red', 'sienna', 'yellow'] |
| 485 |
comments: |
| 486 |
description: |
| 487 |
- Comments string. |
| 488 |
type: str |
| 489 |
details_level: |
| 490 |
description: |
| 491 |
- The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully |
| 492 |
detailed representation of the object. |
| 493 |
type: str |
| 494 |
choices: ['uid', 'standard', 'full'] |
| 495 |
ignore_warnings: |
| 496 |
description: |
| 497 |
- Apply changes ignoring warnings. |
| 498 |
type: bool |
| 499 |
ignore_errors: |
| 500 |
description: |
| 501 |
- Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings |
| 502 |
will also be ignored. |
| 503 |
type: bool |
| 504 |
ip_address: |
| 505 |
description: |
| 506 |
- IPv4 or IPv6 address. If both addresses are required use ipv4-address and ipv6-address fields explicitly. |
| 507 |
type: str |
| 508 |
ipv4_address: |
| 509 |
description: |
| 510 |
- IPv4 address. |
| 511 |
type: str |
| 512 |
ipv6_address: |
| 513 |
description: |
| 514 |
- IPv6 address. |
| 515 |
type: str |
| 516 |
one_time_password: |
| 517 |
description: |
| 518 |
- N/A |
| 519 |
type: str |
| 520 |
tags: |
| 521 |
description: |
| 522 |
- Collection of tag identifiers. |
| 523 |
type: list |
| 524 |
elements: str |
| 525 |
color: |
| 526 |
description: |
| 527 |
- Color of the object. Should be one of existing colors. |
| 528 |
type: str |
| 529 |
choices: ['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green', 'khaki', 'orchid', 'dark orange', |
| 530 |
'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown', 'forest green', 'gold', 'dark gold', 'gray', 'dark gray', |
| 531 |
'light green', 'lemon chiffon', 'coral', 'sea green', 'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', |
| 532 |
'orange', 'red', 'sienna', 'yellow'] |
| 533 |
comments: |
| 534 |
description: |
| 535 |
- Comments string. |
| 536 |
type: str |
| 537 |
details_level: |
| 538 |
description: |
| 539 |
- The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed |
| 540 |
representation of the object. |
| 541 |
type: str |
| 542 |
choices: ['uid', 'standard', 'full'] |
| 543 |
ignore_warnings: |
| 544 |
description: |
| 545 |
- Apply changes ignoring warnings. |
| 546 |
type: bool |
| 547 |
ignore_errors: |
| 548 |
description: |
| 549 |
- Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| 550 |
type: bool |
| 551 |
os_name: |
| 552 |
description: |
| 553 |
- Cluster platform operating system. |
| 554 |
type: str |
| 555 |
platform_portal_settings: |
| 556 |
description: |
| 557 |
- Platform portal settings. |
| 558 |
- Available from R81 JHF management version. |
| 559 |
type: dict |
| 560 |
suboptions: |
| 561 |
portal_web_settings: |
| 562 |
description: |
| 563 |
- Configuration of the portal web settings. |
| 564 |
type: dict |
| 565 |
suboptions: |
| 566 |
aliases: |
| 567 |
description: |
| 568 |
- List of URL aliases that are redirected to the main portal URL. |
| 569 |
type: list |
| 570 |
elements: str |
| 571 |
ip_address: |
| 572 |
description: |
| 573 |
- Optional, IP address for the web portal to use, if your DNS server fails to resolve the main portal URL. |
| 574 |
Note, If your DNS server resolves the main portal URL, this IP address is ignored. |
| 575 |
type: str |
| 576 |
main_url: |
| 577 |
description: |
| 578 |
- The main URL for the web portal. |
| 579 |
type: str |
| 580 |
certificate_settings: |
| 581 |
description: |
| 582 |
- Configuration of the portal certificate settings. |
| 583 |
type: dict |
| 584 |
suboptions: |
| 585 |
base64_certificate: |
| 586 |
description: |
| 587 |
- The certificate file encoded in Base64 with padding. This file must be in the *.p12 format. |
| 588 |
type: str |
| 589 |
base64_password: |
| 590 |
description: |
| 591 |
- Password (encoded in Base64 with padding) for the certificate file. |
| 592 |
type: str |
| 593 |
accessibility: |
| 594 |
description: |
| 595 |
- Configuration of the portal access settings. |
| 596 |
type: dict |
| 597 |
suboptions: |
| 598 |
allow_access_from: |
| 599 |
description: |
| 600 |
- Allowed access to the web portal (based on interfaces, or security policy). |
| 601 |
type: str |
| 602 |
choices: ['rule_base', 'internal_interfaces', 'all_interfaces'] |
| 603 |
internal_access_settings: |
| 604 |
description: |
| 605 |
- Configuration of the additional portal access settings for internal interfaces only. |
| 606 |
type: dict |
| 607 |
suboptions: |
| 608 |
undefined: |
| 609 |
description: |
| 610 |
- Controls portal access settings for internal interfaces, whose topology is set to 'Undefined'. |
| 611 |
type: bool |
| 612 |
dmz: |
| 613 |
description: |
| 614 |
- Controls portal access settings for internal interfaces, whose topology is set to 'DMZ'. |
| 615 |
type: bool |
| 616 |
vpn: |
| 617 |
description: |
| 618 |
- Controls portal access settings for interfaces that are part of a VPN Encryption Domain. |
| 619 |
type: bool |
| 620 |
send_alerts_to_server: |
| 621 |
description: |
| 622 |
- Server(s) to send alerts to. |
| 623 |
type: list |
| 624 |
elements: str |
| 625 |
send_logs_to_backup_server: |
| 626 |
description: |
| 627 |
- Backup server(s) to send logs to. |
| 628 |
type: list |
| 629 |
elements: str |
| 630 |
send_logs_to_server: |
| 631 |
description: |
| 632 |
- Server(s) to send logs to. |
| 633 |
type: list |
| 634 |
elements: str |
| 635 |
tags: |
| 636 |
description: |
| 637 |
- Collection of tag identifiers. |
| 638 |
type: list |
| 639 |
elements: str |
| 640 |
threat_emulation: |
| 641 |
description: |
| 642 |
- Threat Emulation blade enabled. |
| 643 |
type: bool |
| 644 |
threat_extraction: |
| 645 |
description: |
| 646 |
- Threat Extraction blade enabled. |
| 647 |
- Available from R81.10 management version. |
| 648 |
type: bool |
| 649 |
threat_prevention_mode: |
| 650 |
description: |
| 651 |
- The mode of Threat Prevention to use. When using Autonomous Threat Prevention, disabling the Threat Prevention blades is not allowed. |
| 652 |
- Available from R81.10 management version. |
| 653 |
type: str |
| 654 |
choices: ['autonomous', 'custom'] |
| 655 |
url_filtering: |
| 656 |
description: |
| 657 |
- URL Filtering blade enabled. |
| 658 |
type: bool |
| 659 |
usercheck_portal_settings: |
| 660 |
description: |
| 661 |
- UserCheck portal settings. |
| 662 |
- Available from R81 JHF management version. |
| 663 |
type: dict |
| 664 |
suboptions: |
| 665 |
enabled: |
| 666 |
description: |
| 667 |
- State of the web portal (enabled or disabled). The supported blades are, {'Application Control', 'URL Filtering', 'Data Loss |
| 668 |
Prevention', 'Anti Virus', 'Anti Bot', 'Threat Emulation', 'Threat Extraction', 'Data Awareness'}. |
| 669 |
type: bool |
| 670 |
portal_web_settings: |
| 671 |
description: |
| 672 |
- Configuration of the portal web settings. |
| 673 |
type: dict |
| 674 |
suboptions: |
| 675 |
aliases: |
| 676 |
description: |
| 677 |
- List of URL aliases that are redirected to the main portal URL. |
| 678 |
type: list |
| 679 |
elements: str |
| 680 |
ip_address: |
| 681 |
description: |
| 682 |
- Optional, IP address for the web portal to use, if your DNS server fails to resolve the main portal URL. |
| 683 |
Note, If your DNS server resolves the main portal URL, this IP address is ignored. |
| 684 |
type: str |
| 685 |
main_url: |
| 686 |
description: |
| 687 |
- The main URL for the web portal. |
| 688 |
type: str |
| 689 |
certificate_settings: |
| 690 |
description: |
| 691 |
- Configuration of the portal certificate settings. |
| 692 |
type: dict |
| 693 |
suboptions: |
| 694 |
base64_certificate: |
| 695 |
description: |
| 696 |
- The certificate file encoded in Base64 with padding. This file must be in the *.p12 format. |
| 697 |
type: str |
| 698 |
base64_password: |
| 699 |
description: |
| 700 |
- Password (encoded in Base64 with padding) for the certificate file. |
| 701 |
type: str |
| 702 |
accessibility: |
| 703 |
description: |
| 704 |
- Configuration of the portal access settings. |
| 705 |
type: dict |
| 706 |
suboptions: |
| 707 |
allow_access_from: |
| 708 |
description: |
| 709 |
- Allowed access to the web portal (based on interfaces, or security policy). |
| 710 |
type: str |
| 711 |
choices: ['rule_base', 'internal_interfaces', 'all_interfaces'] |
| 712 |
internal_access_settings: |
| 713 |
description: |
| 714 |
- Configuration of the additional portal access settings for internal interfaces only. |
| 715 |
type: dict |
| 716 |
suboptions: |
| 717 |
undefined: |
| 718 |
description: |
| 719 |
- Controls portal access settings for internal interfaces, whose topology is set to 'Undefined'. |
| 720 |
type: bool |
| 721 |
dmz: |
| 722 |
description: |
| 723 |
- Controls portal access settings for internal interfaces, whose topology is set to 'DMZ'. |
| 724 |
type: bool |
| 725 |
vpn: |
| 726 |
description: |
| 727 |
- Controls portal access settings for interfaces that are part of a VPN Encryption Domain. |
| 728 |
type: bool |
| 729 |
cluster_version: |
| 730 |
description: |
| 731 |
- Cluster platform version. |
| 732 |
type: str |
| 733 |
vpn: |
| 734 |
description: |
| 735 |
- VPN blade enabled. |
| 736 |
type: bool |
| 737 |
vpn_settings: |
| 738 |
description: |
| 739 |
- Gateway VPN settings. |
| 740 |
type: dict |
| 741 |
suboptions: |
| 742 |
authentication: |
| 743 |
description: |
| 744 |
- Authentication. |
| 745 |
- Available from R81 management version. |
| 746 |
type: dict |
| 747 |
suboptions: |
| 748 |
authentication_clients: |
| 749 |
description: |
| 750 |
- Collection of VPN Authentication clients identified by the name or UID. |
| 751 |
type: list |
| 752 |
elements: str |
| 753 |
link_selection: |
| 754 |
description: |
| 755 |
- Link Selection. |
| 756 |
- Available from R81 management version. |
| 757 |
type: dict |
| 758 |
suboptions: |
| 759 |
ip_selection: |
| 760 |
description: |
| 761 |
- N/A |
| 762 |
type: str |
| 763 |
choices: ['use-main-address', 'use-selected-address-from-topology', 'use-statically-nated-ip', |
| 764 |
'calculated-ip-based-on-topology', 'dns-resolving-from-hostname', 'dns-resolving-from-gateway-and-domain-name', |
| 765 |
'use-probing-with-high-availability', 'use-probing-with-load-sharing', 'use-one-time-probing'] |
| 766 |
dns_resolving_hostname: |
| 767 |
description: |
| 768 |
- DNS Resolving Hostname. Must be set when "ip-selection" was selected to be "dns-resolving-from-hostname". |
| 769 |
type: str |
| 770 |
ip_address: |
| 771 |
description: |
| 772 |
- IP Address. Must be set when "ip-selection" was selected to be "use-selected-address-from-topology" or "use-statically-nated-ip". |
| 773 |
type: str |
| 774 |
maximum_concurrent_ike_negotiations: |
| 775 |
description: |
| 776 |
- N/A |
| 777 |
type: int |
| 778 |
maximum_concurrent_tunnels: |
| 779 |
description: |
| 780 |
- N/A |
| 781 |
type: int |
| 782 |
office_mode: |
| 783 |
description: |
| 784 |
- Office Mode. Notation Wide Impact - Office Mode apply IPSec VPN Software Blade clients and to the Mobile Access Software Blade clients. |
| 785 |
- Available from R81 management version. |
| 786 |
type: dict |
| 787 |
suboptions: |
| 788 |
mode: |
| 789 |
description: |
| 790 |
- Office Mode Permissions.When selected to be "off", all the other definitions are irrelevant. |
| 791 |
type: str |
| 792 |
choices: ['off', 'specific-group', 'all-users'] |
| 793 |
group: |
| 794 |
description: |
| 795 |
- Group. Identified by name or UID. Must be set when "office-mode-permissions" was selected to be "group". |
| 796 |
type: str |
| 797 |
allocate_ip_address_from: |
| 798 |
description: |
| 799 |
- Allocate IP address Method. |
| 800 |
Allocate IP address by sequentially trying the given methods until success. |
| 801 |
type: dict |
| 802 |
suboptions: |
| 803 |
radius_server: |
| 804 |
description: |
| 805 |
- Radius server used to authenticate the user. |
| 806 |
type: bool |
| 807 |
use_allocate_method: |
| 808 |
description: |
| 809 |
- Use Allocate Method. |
| 810 |
type: bool |
| 811 |
allocate_method: |
| 812 |
description: |
| 813 |
- Using either Manual (IP Pool) or Automatic (DHCP). |
| 814 |
Must be set when "use-allocate-method" is true. |
| 815 |
type: str |
| 816 |
choices: ['manual', 'automatic'] |
| 817 |
manual_network: |
| 818 |
description: |
| 819 |
- Manual Network. Identified by name or UID. |
| 820 |
Must be set when "allocate-method" was selected to be "manual". |
| 821 |
type: str |
| 822 |
dhcp_server: |
| 823 |
description: |
| 824 |
- DHCP Server. Identified by name or UID. |
| 825 |
Must be set when "allocate-method" was selected to be "automatic". |
| 826 |
type: str |
| 827 |
virtual_ip_address: |
| 828 |
description: |
| 829 |
- Virtual IPV4 address for DHCP server replies. |
| 830 |
Must be set when "allocate-method" was selected to be "automatic". |
| 831 |
type: str |
| 832 |
dhcp_mac_address: |
| 833 |
description: |
| 834 |
- Calculated MAC address for DHCP allocation. |
| 835 |
Must be set when "allocate-method" was selected to be "automatic". |
| 836 |
type: str |
| 837 |
choices: ['per-machine', 'per-user'] |
| 838 |
optional_parameters: |
| 839 |
description: |
| 840 |
- This configuration applies to all Office Mode methods except Automatic (using DHCP) and ipassignment.conf entries which contain this data. |
| 841 |
type: dict |
| 842 |
suboptions: |
| 843 |
use_primary_dns_server: |
| 844 |
description: |
| 845 |
- Use Primary DNS Server. |
| 846 |
type: bool |
| 847 |
primary_dns_server: |
| 848 |
description: |
| 849 |
- Primary DNS Server. Identified by name or UID. |
| 850 |
Must be set when "use-primary-dns-server" is true and can not be set when "use-primary-dns-server" is false. |
| 851 |
type: str |
| 852 |
use_first_backup_dns_server: |
| 853 |
description: |
| 854 |
- Use First Backup DNS Server. |
| 855 |
type: bool |
| 856 |
first_backup_dns_server: |
| 857 |
description: |
| 858 |
- First Backup DNS Server. Identified by name or UID. |
| 859 |
Must be set when "use-first-backup-dns-server" is true and can not be set when "use-first-backup-dns-server" is false. |
| 860 |
type: str |
| 861 |
use_second_backup_dns_server: |
| 862 |
description: |
| 863 |
- Use Second Backup DNS Server. |
| 864 |
type: bool |
| 865 |
second_backup_dns_server: |
| 866 |
description: |
| 867 |
- Second Backup DNS Server. Identified by name or UID. |
| 868 |
Must be set when "use-second-backup-dns-server" is true and can not be set when "use-second-backup-dns-server" is false. |
| 869 |
type: str |
| 870 |
dns_suffixes: |
| 871 |
description: |
| 872 |
- DNS Suffixes. |
| 873 |
type: str |
| 874 |
use_primary_wins_server: |
| 875 |
description: |
| 876 |
- Use Primary WINS Server. |
| 877 |
type: bool |
| 878 |
primary_wins_server: |
| 879 |
description: |
| 880 |
- Primary WINS Server. Identified by name or UID. |
| 881 |
Must be set when "use-primary-wins-server" is true and can not be set when "use-primary-wins-server" is false. |
| 882 |
type: str |
| 883 |
use_first_backup_wins_server: |
| 884 |
description: |
| 885 |
- Use First Backup WINS Server. |
| 886 |
type: bool |
| 887 |
first_backup_wins_server: |
| 888 |
description: |
| 889 |
- First Backup WINS Server. Identified by name or UID. |
| 890 |
Must be set when "use-first-backup-wins-server" is true and can not be set when "use-first-backup-wins-server" is false. |
| 891 |
type: str |
| 892 |
use_second_backup_wins_server: |
| 893 |
description: |
| 894 |
- Use Second Backup WINS Server. |
| 895 |
type: bool |
| 896 |
second_backup_wins_server: |
| 897 |
description: |
| 898 |
- Second Backup WINS Server. Identified by name or UID. |
| 899 |
Must be set when "use-second-backup-wins-server" is true and can not be set when "use-second-backup-wins-server" is false. |
| 900 |
type: str |
| 901 |
ip_lease_duration: |
| 902 |
description: |
| 903 |
- IP Lease Duration in Minutes. The value must be in the range 2-32767. |
| 904 |
type: int |
| 905 |
support_multiple_interfaces: |
| 906 |
description: |
| 907 |
- Support connectivity enhancement for gateways with multiple external interfaces. |
| 908 |
type: bool |
| 909 |
perform_anti_spoofing: |
| 910 |
description: |
| 911 |
- Perform Anti-Spoofing on Office Mode addresses. |
| 912 |
type: bool |
| 913 |
anti_spoofing_additional_addresses: |
| 914 |
description: |
| 915 |
- Additional IP Addresses for Anti-Spoofing. Identified by name or UID. |
| 916 |
Must be set when "perform-anti-spoofings" is true. |
| 917 |
type: str |
| 918 |
remote_access: |
| 919 |
description: |
| 920 |
- Remote Access. |
| 921 |
- Available from R81 management version. |
| 922 |
type: dict |
| 923 |
suboptions: |
| 924 |
support_l2tp: |
| 925 |
description: |
| 926 |
- Support L2TP (relevant only when office mode is active). |
| 927 |
type: bool |
| 928 |
l2tp_auth_method: |
| 929 |
description: |
| 930 |
- L2TP Authentication Method. |
| 931 |
Must be set when "support-l2tp" is true. |
| 932 |
type: str |
| 933 |
choices: ['certificate', 'md5'] |
| 934 |
l2tp_certificate: |
| 935 |
description: |
| 936 |
- L2TP Certificate. |
| 937 |
Must be set when "l2tp-auth-method" was selected to be "certificate". |
| 938 |
Insert "defaultCert" when you want to use the default certificate. |
| 939 |
type: str |
| 940 |
allow_vpn_clients_to_route_traffic: |
| 941 |
description: |
| 942 |
- Allow VPN clients to route traffic. |
| 943 |
type: bool |
| 944 |
support_nat_traversal_mechanism: |
| 945 |
description: |
| 946 |
- Support NAT traversal mechanism (UDP encapsulation). |
| 947 |
type: bool |
| 948 |
nat_traversal_service: |
| 949 |
description: |
| 950 |
- Allocated NAT traversal UDP service. Identified by name or UID. |
| 951 |
Must be set when "support-nat-traversal-mechanism" is true. |
| 952 |
type: str |
| 953 |
support_visitor_mode: |
| 954 |
description: |
| 955 |
- Support Visitor Mode. |
| 956 |
type: bool |
| 957 |
visitor_mode_service: |
| 958 |
description: |
| 959 |
- TCP Service for Visitor Mode. Identified by name or UID. |
| 960 |
Must be set when "support-visitor-mode" is true. |
| 961 |
type: str |
| 962 |
visitor_mode_interface: |
| 963 |
description: |
| 964 |
- Interface for Visitor Mode. |
| 965 |
Must be set when "support-visitor-mode" is true. |
| 966 |
Insert IPV4 Address of existing interface or "All IPs" when you want all interfaces. |
| 967 |
type: str |
| 968 |
vpn_domain: |
| 969 |
description: |
| 970 |
- Gateway VPN domain identified by the name or UID. |
| 971 |
type: str |
| 972 |
vpn_domain_type: |
| 973 |
description: |
| 974 |
- Gateway VPN domain type. |
| 975 |
type: str |
| 976 |
choices: ['manual', 'addresses_behind_gw'] |
| 977 |
show_portals_certificate: |
| 978 |
description: |
| 979 |
- Indicates whether to show the portals certificate value in the reply. |
| 980 |
- Available from R81 JHF management version. |
| 981 |
type: bool |
| 982 |
color: |
| 983 |
description: |
| 984 |
- Color of the object. Should be one of existing colors. |
| 985 |
type: str |
| 986 |
choices: ['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green', 'khaki', 'orchid', 'dark orange', 'dark sea green', |
| 987 |
'pink', 'turquoise', 'dark blue', 'firebrick', 'brown', 'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', |
| 988 |
'coral', 'sea green', 'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna', 'yellow'] |
| 989 |
comments: |
| 990 |
description: |
| 991 |
- Comments string. |
| 992 |
type: str |
| 993 |
details_level: |
| 994 |
description: |
| 995 |
- The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed |
| 996 |
representation of the object. |
| 997 |
type: str |
| 998 |
choices: ['uid', 'standard', 'full'] |
| 999 |
groups: |
| 1000 |
description: |
| 1001 |
- Collection of group identifiers. |
| 1002 |
type: list |
| 1003 |
elements: str |
| 1004 |
ignore_warnings: |
| 1005 |
description: |
| 1006 |
- Apply changes ignoring warnings. |
| 1007 |
type: bool |
| 1008 |
ignore_errors: |
| 1009 |
description: |
| 1010 |
- Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| 1011 |
type: bool |
| 1012 |
extends_documentation_fragment: check_point.mgmt.checkpoint_objects |
| 1013 |
""" |
| 1014 |
|
| 1015 |
EXAMPLES = """ |
| 1016 |
- name: add-simple-cluster |
| 1017 |
cp_mgmt_simple_cluster: |
| 1018 |
cluster_mode: cluster-xl-ha |
| 1019 |
color: yellow |
| 1020 |
firewall: true |
| 1021 |
interfaces: |
| 1022 |
- anti_spoofing: true |
| 1023 |
interface_type: cluster |
| 1024 |
ip_address: 17.23.5.1 |
| 1025 |
name: eth0 |
| 1026 |
network_mask: 255.255.255.0 |
| 1027 |
topology: EXTERNAL |
| 1028 |
- interface_type: sync |
| 1029 |
name: eth1 |
| 1030 |
topology: INTERNAL |
| 1031 |
topology_settings: |
| 1032 |
interface_leads_to_dmz: false |
| 1033 |
ip_address_behind_this_interface: network defined by the interface ip and net mask |
| 1034 |
- anti_spoofing: true |
| 1035 |
interface_type: cluster |
| 1036 |
ip_address: 192.168.1.1 |
| 1037 |
name: eth2 |
| 1038 |
network_mask: 255.255.255.0 |
| 1039 |
topology: INTERNAL |
| 1040 |
topology_settings: |
| 1041 |
interface_leads_to_dmz: false |
| 1042 |
ip_address_behind_this_interface: network defined by the interface ip and net mask |
| 1043 |
ip_address: 17.23.5.1 |
| 1044 |
members: |
| 1045 |
- interfaces: |
| 1046 |
- ip_address: 17.23.5.2 |
| 1047 |
name: eth0 |
| 1048 |
network_mask: 255.255.255.0 |
| 1049 |
- ip_address: 1.1.2.4 |
| 1050 |
name: eth1 |
| 1051 |
network_mask: 255.255.255.0 |
| 1052 |
- ip_address: 192.168.1.2 |
| 1053 |
name: eth2 |
| 1054 |
network_mask: 255.255.255.0 |
| 1055 |
ip_address: 17.23.5.2 |
| 1056 |
name: member1 |
| 1057 |
one_time_password: abcd |
| 1058 |
- interfaces: |
| 1059 |
- ip_address: 17.23.5.3 |
| 1060 |
name: eth0 |
| 1061 |
network_mask: 255.255.255.0 |
| 1062 |
- ip_address: 1.1.2.5 |
| 1063 |
name: eth1 |
| 1064 |
network_mask: 255.255.255.0 |
| 1065 |
- ip_address: 192.168.1.3 |
| 1066 |
name: eth2 |
| 1067 |
network_mask: 255.255.255.0 |
| 1068 |
ip_address: 17.23.5.3 |
| 1069 |
name: member2 |
| 1070 |
one_time_password: abcd |
| 1071 |
name: cluster1 |
| 1072 |
os_name: Gaia |
| 1073 |
state: present |
| 1074 |
cluster_version: R80.30 |
| 1075 |
|
| 1076 |
- name: set-simple-cluster |
| 1077 |
cp_mgmt_simple_cluster: |
| 1078 |
name: cluster1 |
| 1079 |
state: present |
| 1080 |
|
| 1081 |
- name: delete-simple-cluster |
| 1082 |
cp_mgmt_simple_cluster: |
| 1083 |
name: cluster1 |
| 1084 |
state: absent |
| 1085 |
""" |
| 1086 |
|
| 1087 |
RETURN = """ |
| 1088 |
cp_mgmt_simple_cluster: |
| 1089 |
description: The checkpoint object created or updated. |
| 1090 |
returned: always, except when deleting the object. |
| 1091 |
type: dict |
| 1092 |
""" |
| 1093 |
|
| 1094 |
from ansible.module_utils.basic import AnsibleModule |
| 1095 |
from ansible_collections.check_point.mgmt.plugins.module_utils.checkpoint import ( |
| 1096 |
checkpoint_argument_spec_for_objects, |
| 1097 |
api_call, |
| 1098 |
) |
| 1099 |
|
| 1100 |
|
| 1101 |
def main(): |
| 1102 |
argument_spec = dict( |
| 1103 |
name=dict(type="str", required=True), |
| 1104 |
ip_address=dict(type="str"), |
| 1105 |
ipv4_address=dict(type="str"), |
| 1106 |
ipv6_address=dict(type="str"), |
| 1107 |
anti_bot=dict(type="bool"), |
| 1108 |
anti_virus=dict(type="bool"), |
| 1109 |
application_control=dict(type="bool"), |
| 1110 |
cluster_mode=dict( |
| 1111 |
type="str", |
| 1112 |
choices=[ |
| 1113 |
"cluster-xl-ha", |
| 1114 |
"cluster-ls-multicast", |
| 1115 |
"cluster-ls-unicast", |
| 1116 |
"opsec-ha", |
| 1117 |
"opsec-ls", |
| 1118 |
], |
| 1119 |
), |
| 1120 |
content_awareness=dict(type="bool"), |
| 1121 |
enable_https_inspection=dict(type='bool'), |
| 1122 |
firewall=dict(type="bool"), |
| 1123 |
firewall_settings=dict( |
| 1124 |
type="dict", |
| 1125 |
options=dict( |
| 1126 |
auto_calculate_connections_hash_table_size_and_memory_pool=dict( |
| 1127 |
type="bool" |
| 1128 |
), |
| 1129 |
auto_maximum_limit_for_concurrent_connections=dict( |
| 1130 |
type="bool" |
| 1131 |
), |
| 1132 |
connections_hash_size=dict(type="int"), |
| 1133 |
maximum_limit_for_concurrent_connections=dict(type="int"), |
| 1134 |
maximum_memory_pool_size=dict(type="int"), |
| 1135 |
memory_pool_size=dict(type="int"), |
| 1136 |
), |
| 1137 |
), |
| 1138 |
hardware=dict(type="str"), |
| 1139 |
interfaces=dict( |
| 1140 |
type="list", |
| 1141 |
elements="dict", |
| 1142 |
options=dict( |
| 1143 |
name=dict(type="str"), |
| 1144 |
interface_type=dict( |
| 1145 |
type="str", |
| 1146 |
choices=["cluster", "sync", "cluster + sync", "private"], |
| 1147 |
), |
| 1148 |
ip_address=dict(type="str"), |
| 1149 |
ipv4_address=dict(type="str"), |
| 1150 |
ipv6_address=dict(type="str"), |
| 1151 |
network_mask=dict(type="str"), |
| 1152 |
ipv4_network_mask=dict(type="str"), |
| 1153 |
ipv6_network_mask=dict(type="str"), |
| 1154 |
mask_length=dict(type="str"), |
| 1155 |
ipv4_mask_length=dict(type="str"), |
| 1156 |
ipv6_mask_length=dict(type="str"), |
| 1157 |
anti_spoofing=dict(type="bool"), |
| 1158 |
anti_spoofing_settings=dict( |
| 1159 |
type="dict", |
| 1160 |
options=dict( |
| 1161 |
action=dict(type="str", choices=["prevent", "detect"]), |
| 1162 |
exclude_packets=dict(type="bool"), |
| 1163 |
excluded_network_name=dict(type="str"), |
| 1164 |
excluded_network_uid=dict(type="str"), |
| 1165 |
spoof_tracking=dict( |
| 1166 |
type="str", choices=["none", "log", "alert"] |
| 1167 |
), |
| 1168 |
), |
| 1169 |
), |
| 1170 |
multicast_address=dict(type="str"), |
| 1171 |
multicast_address_type=dict( |
| 1172 |
type="str", choices=["manual", "default"] |
| 1173 |
), |
| 1174 |
security_zone=dict(type="bool"), |
| 1175 |
security_zone_settings=dict( |
| 1176 |
type="dict", |
| 1177 |
options=dict( |
| 1178 |
auto_calculated=dict(type="bool"), |
| 1179 |
specific_zone=dict(type="str"), |
| 1180 |
), |
| 1181 |
), |
| 1182 |
tags=dict(type="list", elements="str"), |
| 1183 |
topology=dict( |
| 1184 |
type="str", choices=["automatic", "external", "internal"] |
| 1185 |
), |
| 1186 |
topology_settings=dict( |
| 1187 |
type="dict", |
| 1188 |
options=dict( |
| 1189 |
interface_leads_to_dmz=dict(type="bool"), |
| 1190 |
ip_address_behind_this_interface=dict( |
| 1191 |
type="str", |
| 1192 |
choices=[ |
| 1193 |
"not defined", |
| 1194 |
"network defined by the interface ip and net mask", |
| 1195 |
"network defined by routing", |
| 1196 |
"specific", |
| 1197 |
], |
| 1198 |
), |
| 1199 |
specific_network=dict(type="str"), |
| 1200 |
), |
| 1201 |
), |
| 1202 |
color=dict( |
| 1203 |
type="str", |
| 1204 |
choices=[ |
| 1205 |
"aquamarine", |
| 1206 |
"black", |
| 1207 |
"blue", |
| 1208 |
"crete blue", |
| 1209 |
"burlywood", |
| 1210 |
"cyan", |
| 1211 |
"dark green", |
| 1212 |
"khaki", |
| 1213 |
"orchid", |
| 1214 |
"dark orange", |
| 1215 |
"dark sea green", |
| 1216 |
"pink", |
| 1217 |
"turquoise", |
| 1218 |
"dark blue", |
| 1219 |
"firebrick", |
| 1220 |
"brown", |
| 1221 |
"forest green", |
| 1222 |
"gold", |
| 1223 |
"dark gold", |
| 1224 |
"gray", |
| 1225 |
"dark gray", |
| 1226 |
"light green", |
| 1227 |
"lemon chiffon", |
| 1228 |
"coral", |
| 1229 |
"sea green", |
| 1230 |
"sky blue", |
| 1231 |
"magenta", |
| 1232 |
"purple", |
| 1233 |
"slate blue", |
| 1234 |
"violet red", |
| 1235 |
"navy blue", |
| 1236 |
"olive", |
| 1237 |
"orange", |
| 1238 |
"red", |
| 1239 |
"sienna", |
| 1240 |
"yellow", |
| 1241 |
], |
| 1242 |
), |
| 1243 |
comments=dict(type="str"), |
| 1244 |
details_level=dict( |
| 1245 |
type="str", choices=["uid", "standard", "full"] |
| 1246 |
), |
| 1247 |
ignore_warnings=dict(type="bool"), |
| 1248 |
ignore_errors=dict(type="bool"), |
| 1249 |
), |
| 1250 |
), |
| 1251 |
ips=dict(type="bool"), |
| 1252 |
ips_settings=dict( |
| 1253 |
type="dict", |
| 1254 |
options=dict( |
| 1255 |
bypass_all_under_load=dict(type="bool"), |
| 1256 |
bypass_track_method=dict( |
| 1257 |
type="str", |
| 1258 |
choices=[ |
| 1259 |
"none", |
| 1260 |
"log", |
| 1261 |
"popup alert", |
| 1262 |
"mail alert", |
| 1263 |
"snmp trap alert", |
| 1264 |
"user defined alert no.1", |
| 1265 |
"user defined alert no.2", |
| 1266 |
"user defined alert no.3", |
| 1267 |
], |
| 1268 |
), |
| 1269 |
activation_mode=dict( |
| 1270 |
type="str", |
| 1271 |
choices=["according-to-policy", "detect-only"], |
| 1272 |
), |
| 1273 |
cpu_usage_low_threshold=dict(type="int"), |
| 1274 |
cpu_usage_high_threshold=dict(type="int"), |
| 1275 |
memory_usage_low_threshold=dict(type="int"), |
| 1276 |
memory_usage_high_threshold=dict(type="int"), |
| 1277 |
send_threat_cloud_info=dict(type="bool"), |
| 1278 |
reject_on_cluster_fail_over=dict(type="bool"), |
| 1279 |
), |
| 1280 |
), |
| 1281 |
members=dict( |
| 1282 |
type="list", |
| 1283 |
elements="dict", |
| 1284 |
options=dict( |
| 1285 |
name=dict(type="str"), |
| 1286 |
interfaces=dict( |
| 1287 |
type="list", |
| 1288 |
elements="dict", |
| 1289 |
options=dict( |
| 1290 |
name=dict(type="str"), |
| 1291 |
anti_spoofing=dict(type="bool"), |
| 1292 |
anti_spoofing_settings=dict( |
| 1293 |
type="dict", |
| 1294 |
options=dict( |
| 1295 |
action=dict( |
| 1296 |
type="str", choices=["prevent", "detect"] |
| 1297 |
), |
| 1298 |
exclude_packets=dict(type="bool"), |
| 1299 |
excluded_network_name=dict(type="str"), |
| 1300 |
excluded_network_uid=dict(type="str"), |
| 1301 |
spoof_tracking=dict( |
| 1302 |
type="str", |
| 1303 |
choices=["none", "log", "alert"], |
| 1304 |
), |
| 1305 |
), |
| 1306 |
), |
| 1307 |
ip_address=dict(type="str"), |
| 1308 |
ipv4_address=dict(type="str"), |
| 1309 |
ipv6_address=dict(type="str"), |
| 1310 |
network_mask=dict(type="str"), |
| 1311 |
ipv4_network_mask=dict(type="str"), |
| 1312 |
ipv6_network_mask=dict(type="str"), |
| 1313 |
mask_length=dict(type="str"), |
| 1314 |
ipv4_mask_length=dict(type="str"), |
| 1315 |
ipv6_mask_length=dict(type="str"), |
| 1316 |
security_zone=dict(type="bool"), |
| 1317 |
security_zone_settings=dict( |
| 1318 |
type="dict", |
| 1319 |
options=dict( |
| 1320 |
auto_calculated=dict(type="bool"), |
| 1321 |
specific_zone=dict(type="str"), |
| 1322 |
), |
| 1323 |
), |
| 1324 |
tags=dict(type="list", elements="str"), |
| 1325 |
topology=dict( |
| 1326 |
type="str", |
| 1327 |
choices=["automatic", "external", "internal"], |
| 1328 |
), |
| 1329 |
topology_settings=dict( |
| 1330 |
type="dict", |
| 1331 |
options=dict( |
| 1332 |
interface_leads_to_dmz=dict(type="bool"), |
| 1333 |
ip_address_behind_this_interface=dict( |
| 1334 |
type="str", |
| 1335 |
choices=[ |
| 1336 |
"not defined", |
| 1337 |
"network defined by the interface ip and net mask", |
| 1338 |
"network defined by routing", |
| 1339 |
"specific", |
| 1340 |
], |
| 1341 |
), |
| 1342 |
specific_network=dict(type="str"), |
| 1343 |
), |
| 1344 |
), |
| 1345 |
color=dict( |
| 1346 |
type="str", |
| 1347 |
choices=[ |
| 1348 |
"aquamarine", |
| 1349 |
"black", |
| 1350 |
"blue", |
| 1351 |
"crete blue", |
| 1352 |
"burlywood", |
| 1353 |
"cyan", |
| 1354 |
"dark green", |
| 1355 |
"khaki", |
| 1356 |
"orchid", |
| 1357 |
"dark orange", |
| 1358 |
"dark sea green", |
| 1359 |
"pink", |
| 1360 |
"turquoise", |
| 1361 |
"dark blue", |
| 1362 |
"firebrick", |
| 1363 |
"brown", |
| 1364 |
"forest green", |
| 1365 |
"gold", |
| 1366 |
"dark gold", |
| 1367 |
"gray", |
| 1368 |
"dark gray", |
| 1369 |
"light green", |
| 1370 |
"lemon chiffon", |
| 1371 |
"coral", |
| 1372 |
"sea green", |
| 1373 |
"sky blue", |
| 1374 |
"magenta", |
| 1375 |
"purple", |
| 1376 |
"slate blue", |
| 1377 |
"violet red", |
| 1378 |
"navy blue", |
| 1379 |
"olive", |
| 1380 |
"orange", |
| 1381 |
"red", |
| 1382 |
"sienna", |
| 1383 |
"yellow", |
| 1384 |
], |
| 1385 |
), |
| 1386 |
comments=dict(type="str"), |
| 1387 |
details_level=dict( |
| 1388 |
type="str", choices=["uid", "standard", "full"] |
| 1389 |
), |
| 1390 |
ignore_warnings=dict(type="bool"), |
| 1391 |
ignore_errors=dict(type="bool"), |
| 1392 |
), |
| 1393 |
), |
| 1394 |
ip_address=dict(type="str"), |
| 1395 |
ipv4_address=dict(type="str"), |
| 1396 |
ipv6_address=dict(type="str"), |
| 1397 |
one_time_password=dict(type="str", no_log=True), |
| 1398 |
tags=dict(type="list", elements="str"), |
| 1399 |
color=dict( |
| 1400 |
type="str", |
| 1401 |
choices=[ |
| 1402 |
"aquamarine", |
| 1403 |
"black", |
| 1404 |
"blue", |
| 1405 |
"crete blue", |
| 1406 |
"burlywood", |
| 1407 |
"cyan", |
| 1408 |
"dark green", |
| 1409 |
"khaki", |
| 1410 |
"orchid", |
| 1411 |
"dark orange", |
| 1412 |
"dark sea green", |
| 1413 |
"pink", |
| 1414 |
"turquoise", |
| 1415 |
"dark blue", |
| 1416 |
"firebrick", |
| 1417 |
"brown", |
| 1418 |
"forest green", |
| 1419 |
"gold", |
| 1420 |
"dark gold", |
| 1421 |
"gray", |
| 1422 |
"dark gray", |
| 1423 |
"light green", |
| 1424 |
"lemon chiffon", |
| 1425 |
"coral", |
| 1426 |
"sea green", |
| 1427 |
"sky blue", |
| 1428 |
"magenta", |
| 1429 |
"purple", |
| 1430 |
"slate blue", |
| 1431 |
"violet red", |
| 1432 |
"navy blue", |
| 1433 |
"olive", |
| 1434 |
"orange", |
| 1435 |
"red", |
| 1436 |
"sienna", |
| 1437 |
"yellow", |
| 1438 |
], |
| 1439 |
), |
| 1440 |
comments=dict(type="str"), |
| 1441 |
details_level=dict( |
| 1442 |
type="str", choices=["uid", "standard", "full"] |
| 1443 |
), |
| 1444 |
ignore_warnings=dict(type="bool"), |
| 1445 |
ignore_errors=dict(type="bool"), |
| 1446 |
), |
| 1447 |
), |
| 1448 |
os_name=dict(type="str"), |
| 1449 |
platform_portal_settings=dict( |
| 1450 |
type="dict", |
| 1451 |
options=dict( |
| 1452 |
portal_web_settings=dict( |
| 1453 |
type="dict", |
| 1454 |
options=dict( |
| 1455 |
aliases=dict(type="list", elements="str"), |
| 1456 |
ip_address=dict(type="str"), |
| 1457 |
main_url=dict(type="str"), |
| 1458 |
), |
| 1459 |
), |
| 1460 |
certificate_settings=dict( |
| 1461 |
type="dict", |
| 1462 |
options=dict( |
| 1463 |
base64_certificate=dict(type="str"), |
| 1464 |
base64_password=dict(type="str", no_log=True), |
| 1465 |
), |
| 1466 |
), |
| 1467 |
accessibility=dict( |
| 1468 |
type="dict", |
| 1469 |
options=dict( |
| 1470 |
allow_access_from=dict( |
| 1471 |
type="str", |
| 1472 |
choices=[ |
| 1473 |
"rule_base", |
| 1474 |
"internal_interfaces", |
| 1475 |
"all_interfaces", |
| 1476 |
], |
| 1477 |
), |
| 1478 |
internal_access_settings=dict( |
| 1479 |
type="dict", |
| 1480 |
options=dict( |
| 1481 |
undefined=dict(type="bool"), |
| 1482 |
dmz=dict(type="bool"), |
| 1483 |
vpn=dict(type="bool"), |
| 1484 |
), |
| 1485 |
), |
| 1486 |
), |
| 1487 |
), |
| 1488 |
), |
| 1489 |
), |
| 1490 |
send_alerts_to_server=dict(type="list", elements="str"), |
| 1491 |
send_logs_to_backup_server=dict(type="list", elements="str"), |
| 1492 |
send_logs_to_server=dict(type="list", elements="str"), |
| 1493 |
tags=dict(type="list", elements="str"), |
| 1494 |
threat_emulation=dict(type="bool"), |
| 1495 |
threat_extraction=dict(type="bool"), |
| 1496 |
threat_prevention_mode=dict( |
| 1497 |
type="str", choices=["autonomous", "custom"] |
| 1498 |
), |
| 1499 |
url_filtering=dict(type="bool"), |
| 1500 |
usercheck_portal_settings=dict( |
| 1501 |
type="dict", |
| 1502 |
options=dict( |
| 1503 |
enabled=dict(type="bool"), |
| 1504 |
portal_web_settings=dict( |
| 1505 |
type="dict", |
| 1506 |
options=dict( |
| 1507 |
aliases=dict(type="list", elements="str"), |
| 1508 |
ip_address=dict(type="str"), |
| 1509 |
main_url=dict(type="str"), |
| 1510 |
), |
| 1511 |
), |
| 1512 |
certificate_settings=dict( |
| 1513 |
type="dict", |
| 1514 |
options=dict( |
| 1515 |
base64_certificate=dict(type="str"), |
| 1516 |
base64_password=dict(type="str", no_log=True), |
| 1517 |
), |
| 1518 |
), |
| 1519 |
accessibility=dict( |
| 1520 |
type="dict", |
| 1521 |
options=dict( |
| 1522 |
allow_access_from=dict( |
| 1523 |
type="str", |
| 1524 |
choices=[ |
| 1525 |
"rule_base", |
| 1526 |
"internal_interfaces", |
| 1527 |
"all_interfaces", |
| 1528 |
], |
| 1529 |
), |
| 1530 |
internal_access_settings=dict( |
| 1531 |
type="dict", |
| 1532 |
options=dict( |
| 1533 |
undefined=dict(type="bool"), |
| 1534 |
dmz=dict(type="bool"), |
| 1535 |
vpn=dict(type="bool"), |
| 1536 |
), |
| 1537 |
), |
| 1538 |
), |
| 1539 |
), |
| 1540 |
), |
| 1541 |
), |
| 1542 |
cluster_version=dict(type="str"), |
| 1543 |
vpn=dict(type="bool"), |
| 1544 |
vpn_settings=dict( |
| 1545 |
type="dict", |
| 1546 |
options=dict( |
| 1547 |
authentication=dict( |
| 1548 |
type="dict", |
| 1549 |
options=dict( |
| 1550 |
authentication_clients=dict( |
| 1551 |
type="list", elements="str" |
| 1552 |
) |
| 1553 |
), |
| 1554 |
), |
| 1555 |
link_selection=dict( |
| 1556 |
type="dict", |
| 1557 |
options=dict( |
| 1558 |
ip_selection=dict( |
| 1559 |
type="str", |
| 1560 |
choices=[ |
| 1561 |
"use-main-address", |
| 1562 |
"use-selected-address-from-topology", |
| 1563 |
"use-statically-nated-ip", |
| 1564 |
"calculated-ip-based-on-topology", |
| 1565 |
"dns-resolving-from-hostname", |
| 1566 |
"dns-resolving-from-gateway-and-domain-name", |
| 1567 |
"use-probing-with-high-availability", |
| 1568 |
"use-probing-with-load-sharing", |
| 1569 |
"use-one-time-probing", |
| 1570 |
], |
| 1571 |
), |
| 1572 |
dns_resolving_hostname=dict(type="str"), |
| 1573 |
ip_address=dict(type="str"), |
| 1574 |
), |
| 1575 |
), |
| 1576 |
maximum_concurrent_ike_negotiations=dict(type="int"), |
| 1577 |
maximum_concurrent_tunnels=dict(type="int"), |
| 1578 |
office_mode=dict( |
| 1579 |
type="dict", |
| 1580 |
options=dict( |
| 1581 |
mode=dict( |
| 1582 |
type="str", |
| 1583 |
choices=["off", "specific-group", "all-users"], |
| 1584 |
), |
| 1585 |
group=dict(type="str"), |
| 1586 |
allocate_ip_address_from=dict( |
| 1587 |
type="dict", |
| 1588 |
options=dict( |
| 1589 |
radius_server=dict(type="bool"), |
| 1590 |
use_allocate_method=dict(type="bool"), |
| 1591 |
allocate_method=dict( |
| 1592 |
type="str", choices=["manual", "automatic"] |
| 1593 |
), |
| 1594 |
manual_network=dict(type="str"), |
| 1595 |
dhcp_server=dict(type="str"), |
| 1596 |
virtual_ip_address=dict(type="str"), |
| 1597 |
dhcp_mac_address=dict( |
| 1598 |
type="str", |
| 1599 |
choices=["per-machine", "per-user"], |
| 1600 |
), |
| 1601 |
optional_parameters=dict( |
| 1602 |
type="dict", |
| 1603 |
options=dict( |
| 1604 |
use_primary_dns_server=dict( |
| 1605 |
type="bool" |
| 1606 |
), |
| 1607 |
primary_dns_server=dict(type="str"), |
| 1608 |
use_first_backup_dns_server=dict( |
| 1609 |
type="bool" |
| 1610 |
), |
| 1611 |
first_backup_dns_server=dict( |
| 1612 |
type="str" |
| 1613 |
), |
| 1614 |
use_second_backup_dns_server=dict( |
| 1615 |
type="bool" |
| 1616 |
), |
| 1617 |
second_backup_dns_server=dict( |
| 1618 |
type="str" |
| 1619 |
), |
| 1620 |
dns_suffixes=dict(type="str"), |
| 1621 |
use_primary_wins_server=dict( |
| 1622 |
type="bool" |
| 1623 |
), |
| 1624 |
primary_wins_server=dict(type="str"), |
| 1625 |
use_first_backup_wins_server=dict( |
| 1626 |
type="bool" |
| 1627 |
), |
| 1628 |
first_backup_wins_server=dict( |
| 1629 |
type="str" |
| 1630 |
), |
| 1631 |
use_second_backup_wins_server=dict( |
| 1632 |
type="bool" |
| 1633 |
), |
| 1634 |
second_backup_wins_server=dict( |
| 1635 |
type="str" |
| 1636 |
), |
| 1637 |
ip_lease_duration=dict(type="int"), |
| 1638 |
), |
| 1639 |
), |
| 1640 |
), |
| 1641 |
), |
| 1642 |
support_multiple_interfaces=dict(type="bool"), |
| 1643 |
perform_anti_spoofing=dict(type="bool"), |
| 1644 |
anti_spoofing_additional_addresses=dict(type="str"), |
| 1645 |
), |
| 1646 |
), |
| 1647 |
remote_access=dict( |
| 1648 |
type="dict", |
| 1649 |
options=dict( |
| 1650 |
support_l2tp=dict(type="bool"), |
| 1651 |
l2tp_auth_method=dict( |
| 1652 |
type="str", choices=["certificate", "md5"] |
| 1653 |
), |
| 1654 |
l2tp_certificate=dict(type="str"), |
| 1655 |
allow_vpn_clients_to_route_traffic=dict(type="bool"), |
| 1656 |
support_nat_traversal_mechanism=dict(type="bool"), |
| 1657 |
nat_traversal_service=dict(type="str"), |
| 1658 |
support_visitor_mode=dict(type="bool"), |
| 1659 |
visitor_mode_service=dict(type="str"), |
| 1660 |
visitor_mode_interface=dict(type="str"), |
| 1661 |
), |
| 1662 |
), |
| 1663 |
vpn_domain=dict(type="str"), |
| 1664 |
vpn_domain_type=dict( |
| 1665 |
type="str", choices=["manual", "addresses_behind_gw"] |
| 1666 |
), |
| 1667 |
), |
| 1668 |
), |
| 1669 |
show_portals_certificate=dict(type="bool"), |
| 1670 |
color=dict( |
| 1671 |
type="str", |
| 1672 |
choices=[ |
| 1673 |
"aquamarine", |
| 1674 |
"black", |
| 1675 |
"blue", |
| 1676 |
"crete blue", |
| 1677 |
"burlywood", |
| 1678 |
"cyan", |
| 1679 |
"dark green", |
| 1680 |
"khaki", |
| 1681 |
"orchid", |
| 1682 |
"dark orange", |
| 1683 |
"dark sea green", |
| 1684 |
"pink", |
| 1685 |
"turquoise", |
| 1686 |
"dark blue", |
| 1687 |
"firebrick", |
| 1688 |
"brown", |
| 1689 |
"forest green", |
| 1690 |
"gold", |
| 1691 |
"dark gold", |
| 1692 |
"gray", |
| 1693 |
"dark gray", |
| 1694 |
"light green", |
| 1695 |
"lemon chiffon", |
| 1696 |
"coral", |
| 1697 |
"sea green", |
| 1698 |
"sky blue", |
| 1699 |
"magenta", |
| 1700 |
"purple", |
| 1701 |
"slate blue", |
| 1702 |
"violet red", |
| 1703 |
"navy blue", |
| 1704 |
"olive", |
| 1705 |
"orange", |
| 1706 |
"red", |
| 1707 |
"sienna", |
| 1708 |
"yellow", |
| 1709 |
], |
| 1710 |
), |
| 1711 |
comments=dict(type="str"), |
| 1712 |
details_level=dict(type="str", choices=["uid", "standard", "full"]), |
| 1713 |
groups=dict(type="list", elements="str"), |
| 1714 |
ignore_warnings=dict(type="bool"), |
| 1715 |
ignore_errors=dict(type="bool"), |
| 1716 |
) |
| 1717 |
argument_spec.update(checkpoint_argument_spec_for_objects) |
| 1718 |
|
| 1719 |
module = AnsibleModule( |
| 1720 |
argument_spec=argument_spec, supports_check_mode=True |
| 1721 |
) |
| 1722 |
api_call_object = "simple-cluster" |
| 1723 |
|
| 1724 |
result = api_call(module, api_call_object) |
| 1725 |
module.exit_json(**result) |
| 1726 |
|
| 1727 |
|
| 1728 |
if __name__ == "__main__": |
| 1729 |
main() |