| 1 |
|
| 2 |
from __future__ import absolute_import, division, print_function |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
__metaclass__ = type |
| 7 |
|
| 8 |
ANSIBLE_METADATA = {'status': ['preview'], |
| 9 |
'supported_by': 'community', |
| 10 |
'metadata_version': '1.1'} |
| 11 |
|
| 12 |
DOCUMENTATION = ''' |
| 13 |
--- |
| 14 |
module: fmgr_pkg_footer_policy6 |
| 15 |
short_description: Configure IPv6 policies. |
| 16 |
version_added: "2.0.0" |
| 17 |
extends_documentation_fragment: |
| 18 |
- fortinet.fortimanager.general |
| 19 |
- fortinet.fortimanager.general.full_crud |
| 20 |
options: |
| 21 |
revision_note: |
| 22 |
description: The change note that can be specified when an object is created or updated. |
| 23 |
type: str |
| 24 |
pkg: |
| 25 |
description: The parameter (pkg) in requested url. |
| 26 |
type: str |
| 27 |
required: true |
| 28 |
pkg_footer_policy6: |
| 29 |
description: The top level parameters set. |
| 30 |
required: false |
| 31 |
type: dict |
| 32 |
suboptions: |
| 33 |
action: |
| 34 |
type: str |
| 35 |
description: Action. |
| 36 |
choices: ['deny', 'accept', 'ipsec', 'ssl-vpn'] |
| 37 |
anti_replay: |
| 38 |
aliases: ['anti-replay'] |
| 39 |
type: str |
| 40 |
description: Anti replay. |
| 41 |
choices: ['disable', 'enable'] |
| 42 |
app_category: |
| 43 |
aliases: ['app-category'] |
| 44 |
type: raw |
| 45 |
description: (list or str) App category. |
| 46 |
app_group: |
| 47 |
aliases: ['app-group'] |
| 48 |
type: raw |
| 49 |
description: (list or str) App group. |
| 50 |
application: |
| 51 |
type: raw |
| 52 |
description: (list) Application. |
| 53 |
application_charts: |
| 54 |
aliases: ['application-charts'] |
| 55 |
type: list |
| 56 |
elements: str |
| 57 |
description: Application charts. |
| 58 |
choices: ['top10-app', 'top10-p2p-user', 'top10-media-user'] |
| 59 |
application_list: |
| 60 |
aliases: ['application-list'] |
| 61 |
type: raw |
| 62 |
description: (list or str) Application list. |
| 63 |
auto_asic_offload: |
| 64 |
aliases: ['auto-asic-offload'] |
| 65 |
type: str |
| 66 |
description: Auto asic offload. |
| 67 |
choices: ['disable', 'enable'] |
| 68 |
av_profile: |
| 69 |
aliases: ['av-profile'] |
| 70 |
type: raw |
| 71 |
description: (list or str) Av profile. |
| 72 |
casi_profile: |
| 73 |
aliases: ['casi-profile'] |
| 74 |
type: raw |
| 75 |
description: (list or str) Casi profile. |
| 76 |
cifs_profile: |
| 77 |
aliases: ['cifs-profile'] |
| 78 |
type: raw |
| 79 |
description: (list or str) Cifs profile. |
| 80 |
comments: |
| 81 |
type: str |
| 82 |
description: Comments. |
| 83 |
custom_log_fields: |
| 84 |
aliases: ['custom-log-fields'] |
| 85 |
type: raw |
| 86 |
description: (list or str) Custom log fields. |
| 87 |
deep_inspection_options: |
| 88 |
aliases: ['deep-inspection-options'] |
| 89 |
type: raw |
| 90 |
description: (list or str) Deep inspection options. |
| 91 |
device_detection_portal: |
| 92 |
aliases: ['device-detection-portal'] |
| 93 |
type: str |
| 94 |
description: Device detection portal. |
| 95 |
choices: ['disable', 'enable'] |
| 96 |
devices: |
| 97 |
type: raw |
| 98 |
description: (list or str) Devices. |
| 99 |
diffserv_forward: |
| 100 |
aliases: ['diffserv-forward'] |
| 101 |
type: str |
| 102 |
description: Diffserv forward. |
| 103 |
choices: ['disable', 'enable'] |
| 104 |
diffserv_reverse: |
| 105 |
aliases: ['diffserv-reverse'] |
| 106 |
type: str |
| 107 |
description: Diffserv reverse. |
| 108 |
choices: ['disable', 'enable'] |
| 109 |
diffservcode_forward: |
| 110 |
aliases: ['diffservcode-forward'] |
| 111 |
type: str |
| 112 |
description: Diffservcode forward. |
| 113 |
diffservcode_rev: |
| 114 |
aliases: ['diffservcode-rev'] |
| 115 |
type: str |
| 116 |
description: Diffservcode rev. |
| 117 |
dlp_sensor: |
| 118 |
aliases: ['dlp-sensor'] |
| 119 |
type: raw |
| 120 |
description: (list or str) Dlp sensor. |
| 121 |
dnsfilter_profile: |
| 122 |
aliases: ['dnsfilter-profile'] |
| 123 |
type: raw |
| 124 |
description: (list or str) Dnsfilter profile. |
| 125 |
dscp_match: |
| 126 |
aliases: ['dscp-match'] |
| 127 |
type: str |
| 128 |
description: Dscp match. |
| 129 |
choices: ['disable', 'enable'] |
| 130 |
dscp_negate: |
| 131 |
aliases: ['dscp-negate'] |
| 132 |
type: str |
| 133 |
description: Dscp negate. |
| 134 |
choices: ['disable', 'enable'] |
| 135 |
dscp_value: |
| 136 |
aliases: ['dscp-value'] |
| 137 |
type: str |
| 138 |
description: Dscp value. |
| 139 |
dsri: |
| 140 |
type: str |
| 141 |
description: Dsri. |
| 142 |
choices: ['disable', 'enable'] |
| 143 |
dstaddr: |
| 144 |
type: raw |
| 145 |
description: (list or str) Dstaddr. |
| 146 |
dstaddr_negate: |
| 147 |
aliases: ['dstaddr-negate'] |
| 148 |
type: str |
| 149 |
description: Dstaddr negate. |
| 150 |
choices: ['disable', 'enable'] |
| 151 |
dstintf: |
| 152 |
type: raw |
| 153 |
description: (list or str) Dstintf. |
| 154 |
dynamic_profile: |
| 155 |
aliases: ['dynamic-profile'] |
| 156 |
type: str |
| 157 |
description: Dynamic profile. |
| 158 |
choices: ['disable', 'enable'] |
| 159 |
dynamic_profile_access: |
| 160 |
aliases: ['dynamic-profile-access'] |
| 161 |
type: list |
| 162 |
elements: str |
| 163 |
description: Dynamic profile access. |
| 164 |
choices: ['imap', 'smtp', 'pop3', 'http', 'ftp', 'im', 'nntp', 'imaps', 'smtps', |
| 165 |
'pop3s', 'https', 'ftps'] |
| 166 |
dynamic_profile_group: |
| 167 |
aliases: ['dynamic-profile-group'] |
| 168 |
type: raw |
| 169 |
description: (list or str) Dynamic profile group. |
| 170 |
email_collection_portal: |
| 171 |
aliases: ['email-collection-portal'] |
| 172 |
type: str |
| 173 |
description: Email collection portal. |
| 174 |
choices: ['disable', 'enable'] |
| 175 |
emailfilter_profile: |
| 176 |
aliases: ['emailfilter-profile'] |
| 177 |
type: raw |
| 178 |
description: (list or str) Emailfilter profile. |
| 179 |
firewall_session_dirty: |
| 180 |
aliases: ['firewall-session-dirty'] |
| 181 |
type: str |
| 182 |
description: Firewall session dirty. |
| 183 |
choices: ['check-all', 'check-new'] |
| 184 |
fixedport: |
| 185 |
type: str |
| 186 |
description: Fixedport. |
| 187 |
choices: ['disable', 'enable'] |
| 188 |
fsae: |
| 189 |
type: str |
| 190 |
description: Fsae. |
| 191 |
choices: ['disable', 'enable'] |
| 192 |
global_label: |
| 193 |
aliases: ['global-label'] |
| 194 |
type: str |
| 195 |
description: Global label. |
| 196 |
groups: |
| 197 |
type: raw |
| 198 |
description: (list or str) Groups. |
| 199 |
http_policy_redirect: |
| 200 |
aliases: ['http-policy-redirect'] |
| 201 |
type: str |
| 202 |
description: Http policy redirect. |
| 203 |
choices: ['disable', 'enable'] |
| 204 |
icap_profile: |
| 205 |
aliases: ['icap-profile'] |
| 206 |
type: raw |
| 207 |
description: (list or str) Icap profile. |
| 208 |
identity_based: |
| 209 |
aliases: ['identity-based'] |
| 210 |
type: str |
| 211 |
description: Identity based. |
| 212 |
choices: ['disable', 'enable'] |
| 213 |
identity_based_policy6: |
| 214 |
aliases: ['identity-based-policy6'] |
| 215 |
type: list |
| 216 |
elements: dict |
| 217 |
description: Identity based policy6. |
| 218 |
suboptions: |
| 219 |
action: |
| 220 |
type: str |
| 221 |
description: Action. |
| 222 |
choices: ['deny', 'accept'] |
| 223 |
application_list: |
| 224 |
aliases: ['application-list'] |
| 225 |
type: str |
| 226 |
description: Application list. |
| 227 |
av_profile: |
| 228 |
aliases: ['av-profile'] |
| 229 |
type: str |
| 230 |
description: Av profile. |
| 231 |
deep_inspection_options: |
| 232 |
aliases: ['deep-inspection-options'] |
| 233 |
type: str |
| 234 |
description: Deep inspection options. |
| 235 |
devices: |
| 236 |
type: str |
| 237 |
description: Devices. |
| 238 |
dlp_sensor: |
| 239 |
aliases: ['dlp-sensor'] |
| 240 |
type: str |
| 241 |
description: Dlp sensor. |
| 242 |
endpoint_compliance: |
| 243 |
aliases: ['endpoint-compliance'] |
| 244 |
type: str |
| 245 |
description: Endpoint compliance. |
| 246 |
choices: ['disable', 'enable'] |
| 247 |
groups: |
| 248 |
type: str |
| 249 |
description: Groups. |
| 250 |
icap_profile: |
| 251 |
aliases: ['icap-profile'] |
| 252 |
type: str |
| 253 |
description: Icap profile. |
| 254 |
id: |
| 255 |
type: int |
| 256 |
description: Id. |
| 257 |
ips_sensor: |
| 258 |
aliases: ['ips-sensor'] |
| 259 |
type: str |
| 260 |
description: Ips sensor. |
| 261 |
logtraffic: |
| 262 |
type: str |
| 263 |
description: Logtraffic. |
| 264 |
choices: ['disable', 'enable', 'all', 'utm'] |
| 265 |
mms_profile: |
| 266 |
aliases: ['mms-profile'] |
| 267 |
type: str |
| 268 |
description: Mms profile. |
| 269 |
per_ip_shaper: |
| 270 |
aliases: ['per-ip-shaper'] |
| 271 |
type: str |
| 272 |
description: Per ip shaper. |
| 273 |
profile_group: |
| 274 |
aliases: ['profile-group'] |
| 275 |
type: str |
| 276 |
description: Profile group. |
| 277 |
profile_protocol_options: |
| 278 |
aliases: ['profile-protocol-options'] |
| 279 |
type: str |
| 280 |
description: Profile protocol options. |
| 281 |
profile_type: |
| 282 |
aliases: ['profile-type'] |
| 283 |
type: str |
| 284 |
description: Profile type. |
| 285 |
choices: ['single', 'group'] |
| 286 |
replacemsg_group: |
| 287 |
aliases: ['replacemsg-group'] |
| 288 |
type: str |
| 289 |
description: Replacemsg group. |
| 290 |
schedule: |
| 291 |
type: str |
| 292 |
description: Schedule. |
| 293 |
send_deny_packet: |
| 294 |
aliases: ['send-deny-packet'] |
| 295 |
type: str |
| 296 |
description: Send deny packet. |
| 297 |
choices: ['disable', 'enable'] |
| 298 |
service: |
| 299 |
type: str |
| 300 |
description: Service. |
| 301 |
service_negate: |
| 302 |
aliases: ['service-negate'] |
| 303 |
type: str |
| 304 |
description: Service negate. |
| 305 |
choices: ['disable', 'enable'] |
| 306 |
spamfilter_profile: |
| 307 |
aliases: ['spamfilter-profile'] |
| 308 |
type: str |
| 309 |
description: Spamfilter profile. |
| 310 |
sslvpn_portal: |
| 311 |
aliases: ['sslvpn-portal'] |
| 312 |
type: str |
| 313 |
description: Sslvpn portal. |
| 314 |
sslvpn_realm: |
| 315 |
aliases: ['sslvpn-realm'] |
| 316 |
type: str |
| 317 |
description: Sslvpn realm. |
| 318 |
traffic_shaper: |
| 319 |
aliases: ['traffic-shaper'] |
| 320 |
type: str |
| 321 |
description: Traffic shaper. |
| 322 |
traffic_shaper_reverse: |
| 323 |
aliases: ['traffic-shaper-reverse'] |
| 324 |
type: str |
| 325 |
description: Traffic shaper reverse. |
| 326 |
utm_status: |
| 327 |
aliases: ['utm-status'] |
| 328 |
type: str |
| 329 |
description: Utm status. |
| 330 |
choices: ['disable', 'enable'] |
| 331 |
voip_profile: |
| 332 |
aliases: ['voip-profile'] |
| 333 |
type: str |
| 334 |
description: Voip profile. |
| 335 |
webfilter_profile: |
| 336 |
aliases: ['webfilter-profile'] |
| 337 |
type: str |
| 338 |
description: Webfilter profile. |
| 339 |
identity_from: |
| 340 |
aliases: ['identity-from'] |
| 341 |
type: str |
| 342 |
description: Identity from. |
| 343 |
choices: ['auth', 'device'] |
| 344 |
inbound: |
| 345 |
type: str |
| 346 |
description: Inbound. |
| 347 |
choices: ['disable', 'enable'] |
| 348 |
inspection_mode: |
| 349 |
aliases: ['inspection-mode'] |
| 350 |
type: str |
| 351 |
description: Inspection mode. |
| 352 |
choices: ['proxy', 'flow'] |
| 353 |
ippool: |
| 354 |
type: str |
| 355 |
description: Ippool. |
| 356 |
choices: ['disable', 'enable'] |
| 357 |
ips_sensor: |
| 358 |
aliases: ['ips-sensor'] |
| 359 |
type: raw |
| 360 |
description: (list or str) Ips sensor. |
| 361 |
label: |
| 362 |
type: str |
| 363 |
description: Label. |
| 364 |
logtraffic: |
| 365 |
type: str |
| 366 |
description: Logtraffic. |
| 367 |
choices: ['disable', 'enable', 'all', 'utm'] |
| 368 |
logtraffic_start: |
| 369 |
aliases: ['logtraffic-start'] |
| 370 |
type: str |
| 371 |
description: Logtraffic start. |
| 372 |
choices: ['disable', 'enable'] |
| 373 |
mms_profile: |
| 374 |
aliases: ['mms-profile'] |
| 375 |
type: raw |
| 376 |
description: (list or str) Mms profile. |
| 377 |
name: |
| 378 |
type: str |
| 379 |
description: Name. |
| 380 |
nat: |
| 381 |
type: str |
| 382 |
description: Nat. |
| 383 |
choices: ['disable', 'enable'] |
| 384 |
natinbound: |
| 385 |
type: str |
| 386 |
description: Natinbound. |
| 387 |
choices: ['disable', 'enable'] |
| 388 |
natoutbound: |
| 389 |
type: str |
| 390 |
description: Natoutbound. |
| 391 |
choices: ['disable', 'enable'] |
| 392 |
np_accelation: |
| 393 |
aliases: ['np-accelation'] |
| 394 |
type: str |
| 395 |
description: Np accelation. |
| 396 |
choices: ['disable', 'enable'] |
| 397 |
np_acceleration: |
| 398 |
aliases: ['np-acceleration'] |
| 399 |
type: str |
| 400 |
description: Np acceleration. |
| 401 |
choices: ['disable', 'enable'] |
| 402 |
outbound: |
| 403 |
type: str |
| 404 |
description: Outbound. |
| 405 |
choices: ['disable', 'enable'] |
| 406 |
per_ip_shaper: |
| 407 |
aliases: ['per-ip-shaper'] |
| 408 |
type: raw |
| 409 |
description: (list or str) Per ip shaper. |
| 410 |
policyid: |
| 411 |
type: int |
| 412 |
description: Policyid. |
| 413 |
required: true |
| 414 |
poolname: |
| 415 |
type: raw |
| 416 |
description: (list or str) Poolname. |
| 417 |
profile_group: |
| 418 |
aliases: ['profile-group'] |
| 419 |
type: raw |
| 420 |
description: (list or str) Profile group. |
| 421 |
profile_protocol_options: |
| 422 |
aliases: ['profile-protocol-options'] |
| 423 |
type: raw |
| 424 |
description: (list or str) Profile protocol options. |
| 425 |
profile_type: |
| 426 |
aliases: ['profile-type'] |
| 427 |
type: str |
| 428 |
description: Profile type. |
| 429 |
choices: ['single', 'group'] |
| 430 |
replacemsg_group: |
| 431 |
aliases: ['replacemsg-group'] |
| 432 |
type: raw |
| 433 |
description: (list or str) Replacemsg group. |
| 434 |
replacemsg_override_group: |
| 435 |
aliases: ['replacemsg-override-group'] |
| 436 |
type: raw |
| 437 |
description: (list or str) Replacemsg override group. |
| 438 |
rsso: |
| 439 |
type: str |
| 440 |
description: Rsso. |
| 441 |
choices: ['disable', 'enable'] |
| 442 |
schedule: |
| 443 |
type: raw |
| 444 |
description: (list or str) Schedule. |
| 445 |
send_deny_packet: |
| 446 |
aliases: ['send-deny-packet'] |
| 447 |
type: str |
| 448 |
description: Send deny packet. |
| 449 |
choices: ['disable', 'enable'] |
| 450 |
service: |
| 451 |
type: raw |
| 452 |
description: (list or str) Service. |
| 453 |
service_negate: |
| 454 |
aliases: ['service-negate'] |
| 455 |
type: str |
| 456 |
description: Service negate. |
| 457 |
choices: ['disable', 'enable'] |
| 458 |
session_ttl: |
| 459 |
aliases: ['session-ttl'] |
| 460 |
type: raw |
| 461 |
description: (int or str) Session ttl. |
| 462 |
spamfilter_profile: |
| 463 |
aliases: ['spamfilter-profile'] |
| 464 |
type: raw |
| 465 |
description: (list or str) Spamfilter profile. |
| 466 |
srcaddr: |
| 467 |
type: raw |
| 468 |
description: (list or str) Srcaddr. |
| 469 |
srcaddr_negate: |
| 470 |
aliases: ['srcaddr-negate'] |
| 471 |
type: str |
| 472 |
description: Srcaddr negate. |
| 473 |
choices: ['disable', 'enable'] |
| 474 |
srcintf: |
| 475 |
type: raw |
| 476 |
description: (list or str) Srcintf. |
| 477 |
ssh_filter_profile: |
| 478 |
aliases: ['ssh-filter-profile'] |
| 479 |
type: raw |
| 480 |
description: (list or str) Ssh filter profile. |
| 481 |
ssh_policy_redirect: |
| 482 |
aliases: ['ssh-policy-redirect'] |
| 483 |
type: str |
| 484 |
description: Ssh policy redirect. |
| 485 |
choices: ['disable', 'enable'] |
| 486 |
ssl_mirror: |
| 487 |
aliases: ['ssl-mirror'] |
| 488 |
type: str |
| 489 |
description: Ssl mirror. |
| 490 |
choices: ['disable', 'enable'] |
| 491 |
ssl_mirror_intf: |
| 492 |
aliases: ['ssl-mirror-intf'] |
| 493 |
type: raw |
| 494 |
description: (list or str) Ssl mirror intf. |
| 495 |
ssl_ssh_profile: |
| 496 |
aliases: ['ssl-ssh-profile'] |
| 497 |
type: raw |
| 498 |
description: (list or str) Ssl ssh profile. |
| 499 |
sslvpn_auth: |
| 500 |
aliases: ['sslvpn-auth'] |
| 501 |
type: str |
| 502 |
description: Sslvpn auth. |
| 503 |
choices: ['any', 'local', 'radius', 'ldap', 'tacacs+'] |
| 504 |
sslvpn_ccert: |
| 505 |
aliases: ['sslvpn-ccert'] |
| 506 |
type: str |
| 507 |
description: Sslvpn ccert. |
| 508 |
choices: ['disable', 'enable'] |
| 509 |
sslvpn_cipher: |
| 510 |
aliases: ['sslvpn-cipher'] |
| 511 |
type: str |
| 512 |
description: Sslvpn cipher. |
| 513 |
choices: ['any', 'high', 'medium'] |
| 514 |
status: |
| 515 |
type: str |
| 516 |
description: Status. |
| 517 |
choices: ['disable', 'enable'] |
| 518 |
tags: |
| 519 |
type: raw |
| 520 |
description: (list or str) Tags. |
| 521 |
tcp_mss_receiver: |
| 522 |
aliases: ['tcp-mss-receiver'] |
| 523 |
type: int |
| 524 |
description: Tcp mss receiver. |
| 525 |
tcp_mss_sender: |
| 526 |
aliases: ['tcp-mss-sender'] |
| 527 |
type: int |
| 528 |
description: Tcp mss sender. |
| 529 |
tcp_session_without_syn: |
| 530 |
aliases: ['tcp-session-without-syn'] |
| 531 |
type: str |
| 532 |
description: Tcp session without syn. |
| 533 |
choices: ['all', 'data-only', 'disable'] |
| 534 |
timeout_send_rst: |
| 535 |
aliases: ['timeout-send-rst'] |
| 536 |
type: str |
| 537 |
description: Timeout send rst. |
| 538 |
choices: ['disable', 'enable'] |
| 539 |
tos: |
| 540 |
type: str |
| 541 |
description: Tos. |
| 542 |
tos_mask: |
| 543 |
aliases: ['tos-mask'] |
| 544 |
type: str |
| 545 |
description: Tos mask. |
| 546 |
tos_negate: |
| 547 |
aliases: ['tos-negate'] |
| 548 |
type: str |
| 549 |
description: Tos negate. |
| 550 |
choices: ['disable', 'enable'] |
| 551 |
traffic_shaper: |
| 552 |
aliases: ['traffic-shaper'] |
| 553 |
type: raw |
| 554 |
description: (list or str) Traffic shaper. |
| 555 |
traffic_shaper_reverse: |
| 556 |
aliases: ['traffic-shaper-reverse'] |
| 557 |
type: raw |
| 558 |
description: (list or str) Traffic shaper reverse. |
| 559 |
url_category: |
| 560 |
aliases: ['url-category'] |
| 561 |
type: raw |
| 562 |
description: (list or str) Url category. |
| 563 |
users: |
| 564 |
type: raw |
| 565 |
description: (list or str) Users. |
| 566 |
utm_inspection_mode: |
| 567 |
aliases: ['utm-inspection-mode'] |
| 568 |
type: str |
| 569 |
description: Utm inspection mode. |
| 570 |
choices: ['proxy', 'flow'] |
| 571 |
utm_status: |
| 572 |
aliases: ['utm-status'] |
| 573 |
type: str |
| 574 |
description: Utm status. |
| 575 |
choices: ['disable', 'enable'] |
| 576 |
uuid: |
| 577 |
type: str |
| 578 |
description: Uuid. |
| 579 |
vlan_cos_fwd: |
| 580 |
aliases: ['vlan-cos-fwd'] |
| 581 |
type: int |
| 582 |
description: Vlan cos fwd. |
| 583 |
vlan_cos_rev: |
| 584 |
aliases: ['vlan-cos-rev'] |
| 585 |
type: int |
| 586 |
description: Vlan cos rev. |
| 587 |
vlan_filter: |
| 588 |
aliases: ['vlan-filter'] |
| 589 |
type: str |
| 590 |
description: Vlan filter. |
| 591 |
voip_profile: |
| 592 |
aliases: ['voip-profile'] |
| 593 |
type: raw |
| 594 |
description: (list or str) Voip profile. |
| 595 |
vpntunnel: |
| 596 |
type: raw |
| 597 |
description: (list or str) Vpntunnel. |
| 598 |
webfilter_profile: |
| 599 |
aliases: ['webfilter-profile'] |
| 600 |
type: raw |
| 601 |
description: (list or str) Webfilter profile. |
| 602 |
waf_profile: |
| 603 |
aliases: ['waf-profile'] |
| 604 |
type: raw |
| 605 |
description: (list or str) Waf profile. |
| 606 |
webcache: |
| 607 |
type: str |
| 608 |
description: Webcache. |
| 609 |
choices: ['disable', 'enable'] |
| 610 |
webcache_https: |
| 611 |
aliases: ['webcache-https'] |
| 612 |
type: str |
| 613 |
description: Webcache https. |
| 614 |
choices: ['disable', 'enable'] |
| 615 |
webproxy_forward_server: |
| 616 |
aliases: ['webproxy-forward-server'] |
| 617 |
type: raw |
| 618 |
description: (list or str) Webproxy forward server. |
| 619 |
webproxy_profile: |
| 620 |
aliases: ['webproxy-profile'] |
| 621 |
type: raw |
| 622 |
description: (list or str) Webproxy profile. |
| 623 |
fsso_groups: |
| 624 |
aliases: ['fsso-groups'] |
| 625 |
type: raw |
| 626 |
description: (list or str) Fsso groups. |
| 627 |
decrypted_traffic_mirror: |
| 628 |
aliases: ['decrypted-traffic-mirror'] |
| 629 |
type: raw |
| 630 |
description: (list or str) Decrypted traffic mirror. |
| 631 |
file_filter_profile: |
| 632 |
aliases: ['file-filter-profile'] |
| 633 |
type: raw |
| 634 |
description: (list or str) File filter profile. |
| 635 |
cgn_log_server_grp: |
| 636 |
aliases: ['cgn-log-server-grp'] |
| 637 |
type: str |
| 638 |
description: NP log server group name |
| 639 |
policy_offload: |
| 640 |
aliases: ['policy-offload'] |
| 641 |
type: str |
| 642 |
description: Enable/disable offloading policy configuration to CP processors. |
| 643 |
choices: ['disable', 'enable'] |
| 644 |
_policy_block: |
| 645 |
type: int |
| 646 |
description: Assigned policy block. |
| 647 |
''' |
| 648 |
|
| 649 |
EXAMPLES = ''' |
| 650 |
- name: Example playbook |
| 651 |
hosts: fortimanagers |
| 652 |
gather_facts: false |
| 653 |
connection: httpapi |
| 654 |
vars: |
| 655 |
ansible_httpapi_use_ssl: true |
| 656 |
ansible_httpapi_validate_certs: false |
| 657 |
ansible_httpapi_port: 443 |
| 658 |
tasks: |
| 659 |
- name: Configure IPv6 footer policies. |
| 660 |
fortinet.fortimanager.fmgr_pkg_footer_policy6: |
| 661 |
bypass_validation: false |
| 662 |
pkg: ansible |
| 663 |
state: present |
| 664 |
pkg_footer_policy6: |
| 665 |
action: accept # <value in [deny, accept, ipsec, ...]> |
| 666 |
comments: ansible-comment |
| 667 |
dstaddr: gall |
| 668 |
dstintf: any |
| 669 |
name: ansible-test-footer |
| 670 |
policyid: 1074741836 # must larger than 2^30(1074741824), since header/footer policy is a special policy |
| 671 |
schedule: galways |
| 672 |
service: gALL |
| 673 |
srcaddr: gall |
| 674 |
srcintf: any |
| 675 |
status: disable |
| 676 |
|
| 677 |
- name: Gathering fortimanager facts |
| 678 |
hosts: fortimanagers |
| 679 |
gather_facts: false |
| 680 |
connection: httpapi |
| 681 |
vars: |
| 682 |
ansible_httpapi_use_ssl: true |
| 683 |
ansible_httpapi_validate_certs: false |
| 684 |
ansible_httpapi_port: 443 |
| 685 |
tasks: |
| 686 |
- name: Retrieve all the IPv6 footer policies |
| 687 |
fortinet.fortimanager.fmgr_fact: |
| 688 |
facts: |
| 689 |
selector: "pkg_footer_policy6" |
| 690 |
params: |
| 691 |
pkg: "ansible" |
| 692 |
policy6: "your_value" |
| 693 |
''' |
| 694 |
|
| 695 |
RETURN = ''' |
| 696 |
meta: |
| 697 |
description: The result of the request. |
| 698 |
type: dict |
| 699 |
returned: always |
| 700 |
contains: |
| 701 |
request_url: |
| 702 |
description: The full url requested. |
| 703 |
returned: always |
| 704 |
type: str |
| 705 |
sample: /sys/login/user |
| 706 |
response_code: |
| 707 |
description: The status of api request. |
| 708 |
returned: always |
| 709 |
type: int |
| 710 |
sample: 0 |
| 711 |
response_data: |
| 712 |
description: The api response. |
| 713 |
type: list |
| 714 |
returned: always |
| 715 |
response_message: |
| 716 |
description: The descriptive message of the api response. |
| 717 |
type: str |
| 718 |
returned: always |
| 719 |
sample: OK. |
| 720 |
system_information: |
| 721 |
description: The information of the target system. |
| 722 |
type: dict |
| 723 |
returned: always |
| 724 |
rc: |
| 725 |
description: The status the request. |
| 726 |
type: int |
| 727 |
returned: always |
| 728 |
sample: 0 |
| 729 |
version_check_warning: |
| 730 |
description: Warning if the parameters used in the playbook are not supported by the current FortiManager version. |
| 731 |
type: list |
| 732 |
returned: complex |
| 733 |
''' |
| 734 |
from ansible.module_utils.basic import AnsibleModule |
| 735 |
from ansible.module_utils.connection import Connection |
| 736 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass |
| 737 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec |
| 738 |
|
| 739 |
|
| 740 |
def main(): |
| 741 |
urls_list = [ |
| 742 |
'/pm/config/global/pkg/{pkg}/global/footer/policy6' |
| 743 |
] |
| 744 |
module_arg_spec = { |
| 745 |
'pkg': {'required': True, 'type': 'str'}, |
| 746 |
'revision_note': {'type': 'str'}, |
| 747 |
'pkg_footer_policy6': { |
| 748 |
'type': 'dict', 'v_range': [['6.0.0', '']], |
| 749 |
'options': { |
| 750 |
'action': {'choices': ['deny', 'accept', 'ipsec', 'ssl-vpn'], 'type': 'str'}, |
| 751 |
'anti-replay': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 752 |
'app-category': {'type': 'raw'}, |
| 753 |
'app-group': {'type': 'raw'}, |
| 754 |
'application': {'type': 'raw'}, |
| 755 |
'application-charts': {'type': 'list', 'choices': ['top10-app', 'top10-p2p-user', 'top10-media-user'], 'elements': 'str'}, |
| 756 |
'application-list': {'type': 'raw'}, |
| 757 |
'auto-asic-offload': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 758 |
'av-profile': {'type': 'raw'}, |
| 759 |
'casi-profile': {'type': 'raw'}, |
| 760 |
'cifs-profile': {'type': 'raw'}, |
| 761 |
'comments': {'type': 'str'}, |
| 762 |
'custom-log-fields': {'type': 'raw'}, |
| 763 |
'deep-inspection-options': {'type': 'raw'}, |
| 764 |
'device-detection-portal': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 765 |
'devices': {'type': 'raw'}, |
| 766 |
'diffserv-forward': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 767 |
'diffserv-reverse': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 768 |
'diffservcode-forward': {'type': 'str'}, |
| 769 |
'diffservcode-rev': {'type': 'str'}, |
| 770 |
'dlp-sensor': {'type': 'raw'}, |
| 771 |
'dnsfilter-profile': {'type': 'raw'}, |
| 772 |
'dscp-match': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 773 |
'dscp-negate': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 774 |
'dscp-value': {'type': 'str'}, |
| 775 |
'dsri': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 776 |
'dstaddr': {'type': 'raw'}, |
| 777 |
'dstaddr-negate': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 778 |
'dstintf': {'type': 'raw'}, |
| 779 |
'dynamic-profile': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 780 |
'dynamic-profile-access': { |
| 781 |
'type': 'list', |
| 782 |
'choices': ['imap', 'smtp', 'pop3', 'http', 'ftp', 'im', 'nntp', 'imaps', 'smtps', 'pop3s', 'https', 'ftps'], |
| 783 |
'elements': 'str' |
| 784 |
}, |
| 785 |
'dynamic-profile-group': {'type': 'raw'}, |
| 786 |
'email-collection-portal': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 787 |
'emailfilter-profile': {'type': 'raw'}, |
| 788 |
'firewall-session-dirty': {'choices': ['check-all', 'check-new'], 'type': 'str'}, |
| 789 |
'fixedport': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 790 |
'fsae': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 791 |
'global-label': {'type': 'str'}, |
| 792 |
'groups': {'type': 'raw'}, |
| 793 |
'http-policy-redirect': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 794 |
'icap-profile': {'type': 'raw'}, |
| 795 |
'identity-based': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 796 |
'identity-based-policy6': { |
| 797 |
'v_range': [['6.0.0', '6.2.0']], |
| 798 |
'type': 'list', |
| 799 |
'options': { |
| 800 |
'action': {'v_range': [['6.0.0', '6.2.0']], 'choices': ['deny', 'accept'], 'type': 'str'}, |
| 801 |
'application-list': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 802 |
'av-profile': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 803 |
'deep-inspection-options': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 804 |
'devices': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 805 |
'dlp-sensor': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 806 |
'endpoint-compliance': {'v_range': [['6.0.0', '6.2.0']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 807 |
'groups': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 808 |
'icap-profile': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 809 |
'id': {'v_range': [['6.0.0', '6.2.0']], 'type': 'int'}, |
| 810 |
'ips-sensor': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 811 |
'logtraffic': {'v_range': [['6.0.0', '6.2.0']], 'choices': ['disable', 'enable', 'all', 'utm'], 'type': 'str'}, |
| 812 |
'mms-profile': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 813 |
'per-ip-shaper': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 814 |
'profile-group': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 815 |
'profile-protocol-options': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 816 |
'profile-type': {'v_range': [['6.0.0', '6.2.0']], 'choices': ['single', 'group'], 'type': 'str'}, |
| 817 |
'replacemsg-group': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 818 |
'schedule': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 819 |
'send-deny-packet': {'v_range': [['6.0.0', '6.2.0']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 820 |
'service': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 821 |
'service-negate': {'v_range': [['6.0.0', '6.2.0']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 822 |
'spamfilter-profile': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 823 |
'sslvpn-portal': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 824 |
'sslvpn-realm': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 825 |
'traffic-shaper': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 826 |
'traffic-shaper-reverse': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 827 |
'utm-status': {'v_range': [['6.0.0', '6.2.0']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 828 |
'voip-profile': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'}, |
| 829 |
'webfilter-profile': {'v_range': [['6.0.0', '6.2.0']], 'type': 'str'} |
| 830 |
}, |
| 831 |
'elements': 'dict' |
| 832 |
}, |
| 833 |
'identity-from': {'choices': ['auth', 'device'], 'type': 'str'}, |
| 834 |
'inbound': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 835 |
'inspection-mode': {'choices': ['proxy', 'flow'], 'type': 'str'}, |
| 836 |
'ippool': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 837 |
'ips-sensor': {'type': 'raw'}, |
| 838 |
'label': {'type': 'str'}, |
| 839 |
'logtraffic': {'choices': ['disable', 'enable', 'all', 'utm'], 'type': 'str'}, |
| 840 |
'logtraffic-start': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 841 |
'mms-profile': {'type': 'raw'}, |
| 842 |
'name': {'type': 'str'}, |
| 843 |
'nat': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 844 |
'natinbound': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 845 |
'natoutbound': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 846 |
'np-accelation': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 847 |
'np-acceleration': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 848 |
'outbound': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 849 |
'per-ip-shaper': {'type': 'raw'}, |
| 850 |
'policyid': {'required': True, 'type': 'int'}, |
| 851 |
'poolname': {'type': 'raw'}, |
| 852 |
'profile-group': {'type': 'raw'}, |
| 853 |
'profile-protocol-options': {'type': 'raw'}, |
| 854 |
'profile-type': {'choices': ['single', 'group'], 'type': 'str'}, |
| 855 |
'replacemsg-group': {'type': 'raw'}, |
| 856 |
'replacemsg-override-group': {'type': 'raw'}, |
| 857 |
'rsso': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 858 |
'schedule': {'type': 'raw'}, |
| 859 |
'send-deny-packet': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 860 |
'service': {'type': 'raw'}, |
| 861 |
'service-negate': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 862 |
'session-ttl': {'type': 'raw'}, |
| 863 |
'spamfilter-profile': {'type': 'raw'}, |
| 864 |
'srcaddr': {'type': 'raw'}, |
| 865 |
'srcaddr-negate': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 866 |
'srcintf': {'type': 'raw'}, |
| 867 |
'ssh-filter-profile': {'type': 'raw'}, |
| 868 |
'ssh-policy-redirect': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 869 |
'ssl-mirror': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 870 |
'ssl-mirror-intf': {'type': 'raw'}, |
| 871 |
'ssl-ssh-profile': {'type': 'raw'}, |
| 872 |
'sslvpn-auth': {'choices': ['any', 'local', 'radius', 'ldap', 'tacacs+'], 'type': 'str'}, |
| 873 |
'sslvpn-ccert': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 874 |
'sslvpn-cipher': {'choices': ['any', 'high', 'medium'], 'type': 'str'}, |
| 875 |
'status': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 876 |
'tags': {'type': 'raw'}, |
| 877 |
'tcp-mss-receiver': {'type': 'int'}, |
| 878 |
'tcp-mss-sender': {'type': 'int'}, |
| 879 |
'tcp-session-without-syn': {'choices': ['all', 'data-only', 'disable'], 'type': 'str'}, |
| 880 |
'timeout-send-rst': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 881 |
'tos': {'type': 'str'}, |
| 882 |
'tos-mask': {'type': 'str'}, |
| 883 |
'tos-negate': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 884 |
'traffic-shaper': {'type': 'raw'}, |
| 885 |
'traffic-shaper-reverse': {'type': 'raw'}, |
| 886 |
'url-category': {'type': 'raw'}, |
| 887 |
'users': {'type': 'raw'}, |
| 888 |
'utm-inspection-mode': {'choices': ['proxy', 'flow'], 'type': 'str'}, |
| 889 |
'utm-status': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 890 |
'uuid': {'type': 'str'}, |
| 891 |
'vlan-cos-fwd': {'type': 'int'}, |
| 892 |
'vlan-cos-rev': {'type': 'int'}, |
| 893 |
'vlan-filter': {'type': 'str'}, |
| 894 |
'voip-profile': {'type': 'raw'}, |
| 895 |
'vpntunnel': {'type': 'raw'}, |
| 896 |
'webfilter-profile': {'type': 'raw'}, |
| 897 |
'waf-profile': {'v_range': [['6.2.1', '']], 'type': 'raw'}, |
| 898 |
'webcache': {'v_range': [['6.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 899 |
'webcache-https': {'v_range': [['6.2.1', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 900 |
'webproxy-forward-server': {'v_range': [['6.2.1', '']], 'type': 'raw'}, |
| 901 |
'webproxy-profile': {'v_range': [['6.2.1', '']], 'type': 'raw'}, |
| 902 |
'fsso-groups': {'v_range': [['6.2.3', '']], 'type': 'raw'}, |
| 903 |
'decrypted-traffic-mirror': {'v_range': [['6.4.0', '']], 'type': 'raw'}, |
| 904 |
'file-filter-profile': {'v_range': [['6.4.1', '']], 'type': 'raw'}, |
| 905 |
'cgn-log-server-grp': {'v_range': [['6.2.7', '6.2.13'], ['6.4.3', '']], 'type': 'str'}, |
| 906 |
'policy-offload': {'v_range': [['6.2.7', '6.2.13'], ['6.4.3', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 907 |
'_policy_block': {'v_range': [['7.2.2', '']], 'type': 'int'} |
| 908 |
} |
| 909 |
} |
| 910 |
} |
| 911 |
|
| 912 |
module_option_spec = get_module_arg_spec('full crud') |
| 913 |
module_arg_spec.update(module_option_spec) |
| 914 |
check_galaxy_version(module_arg_spec) |
| 915 |
module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'pkg_footer_policy6'), |
| 916 |
supports_check_mode=True) |
| 917 |
if not module._socket_path: |
| 918 |
module.fail_json(msg='MUST RUN IN HTTPAPI MODE') |
| 919 |
connection = Connection(module._socket_path) |
| 920 |
fmgr = NAPIManager('full crud', module_arg_spec, urls_list, |
| 921 |
'policyid', 'data', module, connection) |
| 922 |
params_validation_blob = [ |
| 923 |
{ |
| 924 |
'attribute_path': ['pkg_footer_policy6', 'policyid'], |
| 925 |
'lambda': 'int($) >= 1073741824', |
| 926 |
'fail_action': 'warn', |
| 927 |
'hint_message': 'policyid should be larger than 2^30, i.e. 1073741824, otherwise it will be ignored.' |
| 928 |
} |
| 929 |
] |
| 930 |
|
| 931 |
fmgr.validate_parameters(params_validation_blob) |
| 932 |
fmgr.process_crud() |
| 933 |
module.exit_json(meta=module.params) |
| 934 |
|
| 935 |
|
| 936 |
if __name__ == '__main__': |
| 937 |
main() |