| 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_firewall_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 |
adom: |
| 25 |
description: The parameter (adom) in requested url. |
| 26 |
type: str |
| 27 |
required: true |
| 28 |
pkg: |
| 29 |
description: The parameter (pkg) in requested url. |
| 30 |
type: str |
| 31 |
required: true |
| 32 |
pkg_firewall_policy6: |
| 33 |
description: The top level parameters set. |
| 34 |
required: false |
| 35 |
type: dict |
| 36 |
suboptions: |
| 37 |
action: |
| 38 |
type: str |
| 39 |
description: Policy action |
| 40 |
choices: ['deny', 'accept', 'ipsec', 'ssl-vpn'] |
| 41 |
app_category: |
| 42 |
aliases: ['app-category'] |
| 43 |
type: raw |
| 44 |
description: (list or str) Application category ID list. |
| 45 |
application: |
| 46 |
type: raw |
| 47 |
description: (list) Application ID list. |
| 48 |
application_list: |
| 49 |
aliases: ['application-list'] |
| 50 |
type: str |
| 51 |
description: Name of an existing Application list. |
| 52 |
auto_asic_offload: |
| 53 |
aliases: ['auto-asic-offload'] |
| 54 |
type: str |
| 55 |
description: Enable/disable policy traffic ASIC offloading. |
| 56 |
choices: ['disable', 'enable'] |
| 57 |
av_profile: |
| 58 |
aliases: ['av-profile'] |
| 59 |
type: str |
| 60 |
description: Name of an existing Antivirus profile. |
| 61 |
comments: |
| 62 |
type: str |
| 63 |
description: Comment. |
| 64 |
custom_log_fields: |
| 65 |
aliases: ['custom-log-fields'] |
| 66 |
type: raw |
| 67 |
description: (list or str) Log field index numbers to append custom log fields to log messages for this policy. |
| 68 |
devices: |
| 69 |
type: raw |
| 70 |
description: (list or str) Names of devices or device groups that can be matched by the policy. |
| 71 |
diffserv_forward: |
| 72 |
aliases: ['diffserv-forward'] |
| 73 |
type: str |
| 74 |
description: Enable to change packets DiffServ values to the specified diffservcode-forward value. |
| 75 |
choices: ['disable', 'enable'] |
| 76 |
diffserv_reverse: |
| 77 |
aliases: ['diffserv-reverse'] |
| 78 |
type: str |
| 79 |
description: Enable to change packets reverse |
| 80 |
choices: ['disable', 'enable'] |
| 81 |
diffservcode_forward: |
| 82 |
aliases: ['diffservcode-forward'] |
| 83 |
type: str |
| 84 |
description: Change packets DiffServ to this value. |
| 85 |
diffservcode_rev: |
| 86 |
aliases: ['diffservcode-rev'] |
| 87 |
type: str |
| 88 |
description: Change packets reverse |
| 89 |
dlp_sensor: |
| 90 |
aliases: ['dlp-sensor'] |
| 91 |
type: str |
| 92 |
description: Name of an existing DLP sensor. |
| 93 |
dscp_match: |
| 94 |
aliases: ['dscp-match'] |
| 95 |
type: str |
| 96 |
description: Enable DSCP check. |
| 97 |
choices: ['disable', 'enable'] |
| 98 |
dscp_negate: |
| 99 |
aliases: ['dscp-negate'] |
| 100 |
type: str |
| 101 |
description: Enable negated DSCP match. |
| 102 |
choices: ['disable', 'enable'] |
| 103 |
dscp_value: |
| 104 |
aliases: ['dscp-value'] |
| 105 |
type: str |
| 106 |
description: DSCP value. |
| 107 |
dsri: |
| 108 |
type: str |
| 109 |
description: Enable DSRI to ignore HTTP server responses. |
| 110 |
choices: ['disable', 'enable'] |
| 111 |
dstaddr: |
| 112 |
type: raw |
| 113 |
description: (list or str) Destination address and address group names. |
| 114 |
dstaddr_negate: |
| 115 |
aliases: ['dstaddr-negate'] |
| 116 |
type: str |
| 117 |
description: When enabled dstaddr specifies what the destination address must NOT be. |
| 118 |
choices: ['disable', 'enable'] |
| 119 |
dstintf: |
| 120 |
type: raw |
| 121 |
description: (list or str) Outgoing |
| 122 |
firewall_session_dirty: |
| 123 |
aliases: ['firewall-session-dirty'] |
| 124 |
type: str |
| 125 |
description: How to handle sessions if the configuration of this firewall policy changes. |
| 126 |
choices: ['check-all', 'check-new'] |
| 127 |
fixedport: |
| 128 |
type: str |
| 129 |
description: Enable to prevent source NAT from changing a sessions source port. |
| 130 |
choices: ['disable', 'enable'] |
| 131 |
global_label: |
| 132 |
aliases: ['global-label'] |
| 133 |
type: str |
| 134 |
description: Label for the policy that appears when the GUI is in Global View mode. |
| 135 |
groups: |
| 136 |
type: raw |
| 137 |
description: (list or str) Names of user groups that can authenticate with this policy. |
| 138 |
icap_profile: |
| 139 |
aliases: ['icap-profile'] |
| 140 |
type: str |
| 141 |
description: Name of an existing ICAP profile. |
| 142 |
inbound: |
| 143 |
type: str |
| 144 |
description: Policy-based IPsec VPN |
| 145 |
choices: ['disable', 'enable'] |
| 146 |
ippool: |
| 147 |
type: str |
| 148 |
description: Enable to use IP Pools for source NAT. |
| 149 |
choices: ['disable', 'enable'] |
| 150 |
ips_sensor: |
| 151 |
aliases: ['ips-sensor'] |
| 152 |
type: str |
| 153 |
description: Name of an existing IPS sensor. |
| 154 |
label: |
| 155 |
type: str |
| 156 |
description: Label for the policy that appears when the GUI is in Section View mode. |
| 157 |
logtraffic: |
| 158 |
type: str |
| 159 |
description: Enable or disable logging. |
| 160 |
choices: ['disable', 'enable', 'all', 'utm'] |
| 161 |
logtraffic_start: |
| 162 |
aliases: ['logtraffic-start'] |
| 163 |
type: str |
| 164 |
description: Record logs when a session starts and ends. |
| 165 |
choices: ['disable', 'enable'] |
| 166 |
mms_profile: |
| 167 |
aliases: ['mms-profile'] |
| 168 |
type: str |
| 169 |
description: Name of an existing MMS profile. |
| 170 |
name: |
| 171 |
type: str |
| 172 |
description: Policy name. |
| 173 |
nat: |
| 174 |
type: str |
| 175 |
description: Enable/disable source NAT. |
| 176 |
choices: ['disable', 'enable'] |
| 177 |
natinbound: |
| 178 |
type: str |
| 179 |
description: Policy-based IPsec VPN |
| 180 |
choices: ['disable', 'enable'] |
| 181 |
natoutbound: |
| 182 |
type: str |
| 183 |
description: Policy-based IPsec VPN |
| 184 |
choices: ['disable', 'enable'] |
| 185 |
np_accelation: |
| 186 |
aliases: ['np-accelation'] |
| 187 |
type: str |
| 188 |
description: Enable/disable UTM Network Processor acceleration. |
| 189 |
choices: ['disable', 'enable'] |
| 190 |
outbound: |
| 191 |
type: str |
| 192 |
description: Policy-based IPsec VPN |
| 193 |
choices: ['disable', 'enable'] |
| 194 |
per_ip_shaper: |
| 195 |
aliases: ['per-ip-shaper'] |
| 196 |
type: str |
| 197 |
description: Per-IP traffic shaper. |
| 198 |
policyid: |
| 199 |
type: int |
| 200 |
description: Policy ID. |
| 201 |
required: true |
| 202 |
poolname: |
| 203 |
type: raw |
| 204 |
description: (list or str) IP Pool names. |
| 205 |
profile_group: |
| 206 |
aliases: ['profile-group'] |
| 207 |
type: str |
| 208 |
description: Name of profile group. |
| 209 |
profile_protocol_options: |
| 210 |
aliases: ['profile-protocol-options'] |
| 211 |
type: str |
| 212 |
description: Name of an existing Protocol options profile. |
| 213 |
profile_type: |
| 214 |
aliases: ['profile-type'] |
| 215 |
type: str |
| 216 |
description: Determine whether the firewall policy allows security profile groups or single profiles only. |
| 217 |
choices: ['single', 'group'] |
| 218 |
replacemsg_override_group: |
| 219 |
aliases: ['replacemsg-override-group'] |
| 220 |
type: str |
| 221 |
description: Override the default replacement message group for this policy. |
| 222 |
rsso: |
| 223 |
type: str |
| 224 |
description: Enable/disable RADIUS single sign-on |
| 225 |
choices: ['disable', 'enable'] |
| 226 |
schedule: |
| 227 |
type: str |
| 228 |
description: Schedule name. |
| 229 |
send_deny_packet: |
| 230 |
aliases: ['send-deny-packet'] |
| 231 |
type: str |
| 232 |
description: Enable/disable return of deny-packet. |
| 233 |
choices: ['disable', 'enable'] |
| 234 |
service: |
| 235 |
type: raw |
| 236 |
description: (list or str) Service and service group names. |
| 237 |
service_negate: |
| 238 |
aliases: ['service-negate'] |
| 239 |
type: str |
| 240 |
description: When enabled service specifies what the service must NOT be. |
| 241 |
choices: ['disable', 'enable'] |
| 242 |
session_ttl: |
| 243 |
aliases: ['session-ttl'] |
| 244 |
type: raw |
| 245 |
description: (int or str) Session TTL in seconds for sessions accepted by this policy. |
| 246 |
spamfilter_profile: |
| 247 |
aliases: ['spamfilter-profile'] |
| 248 |
type: str |
| 249 |
description: Name of an existing Spam filter profile. |
| 250 |
srcaddr: |
| 251 |
type: raw |
| 252 |
description: (list or str) Source address and address group names. |
| 253 |
srcaddr_negate: |
| 254 |
aliases: ['srcaddr-negate'] |
| 255 |
type: str |
| 256 |
description: When enabled srcaddr specifies what the source address must NOT be. |
| 257 |
choices: ['disable', 'enable'] |
| 258 |
srcintf: |
| 259 |
type: raw |
| 260 |
description: (list or str) Incoming |
| 261 |
ssl_mirror: |
| 262 |
aliases: ['ssl-mirror'] |
| 263 |
type: str |
| 264 |
description: Enable to copy decrypted SSL traffic to a FortiGate interface |
| 265 |
choices: ['disable', 'enable'] |
| 266 |
ssl_mirror_intf: |
| 267 |
aliases: ['ssl-mirror-intf'] |
| 268 |
type: raw |
| 269 |
description: (list or str) SSL mirror interface name. |
| 270 |
ssl_ssh_profile: |
| 271 |
aliases: ['ssl-ssh-profile'] |
| 272 |
type: str |
| 273 |
description: Name of an existing SSL SSH profile. |
| 274 |
status: |
| 275 |
type: str |
| 276 |
description: Enable or disable this policy. |
| 277 |
choices: ['disable', 'enable'] |
| 278 |
tags: |
| 279 |
type: str |
| 280 |
description: Names of object-tags applied to this policy. |
| 281 |
tcp_mss_receiver: |
| 282 |
aliases: ['tcp-mss-receiver'] |
| 283 |
type: int |
| 284 |
description: Receiver TCP maximum segment size |
| 285 |
tcp_mss_sender: |
| 286 |
aliases: ['tcp-mss-sender'] |
| 287 |
type: int |
| 288 |
description: Sender TCP maximum segment size |
| 289 |
tcp_session_without_syn: |
| 290 |
aliases: ['tcp-session-without-syn'] |
| 291 |
type: str |
| 292 |
description: Enable/disable creation of TCP session without SYN flag. |
| 293 |
choices: ['all', 'data-only', 'disable'] |
| 294 |
timeout_send_rst: |
| 295 |
aliases: ['timeout-send-rst'] |
| 296 |
type: str |
| 297 |
description: Enable/disable sending RST packets when TCP sessions expire. |
| 298 |
choices: ['disable', 'enable'] |
| 299 |
traffic_shaper: |
| 300 |
aliases: ['traffic-shaper'] |
| 301 |
type: str |
| 302 |
description: Reverse traffic shaper. |
| 303 |
traffic_shaper_reverse: |
| 304 |
aliases: ['traffic-shaper-reverse'] |
| 305 |
type: str |
| 306 |
description: Reverse traffic shaper. |
| 307 |
url_category: |
| 308 |
aliases: ['url-category'] |
| 309 |
type: raw |
| 310 |
description: (list or str) URL category ID list. |
| 311 |
users: |
| 312 |
type: raw |
| 313 |
description: (list or str) Names of individual users that can authenticate with this policy. |
| 314 |
utm_status: |
| 315 |
aliases: ['utm-status'] |
| 316 |
type: str |
| 317 |
description: Enable AV/web/ips protection profile. |
| 318 |
choices: ['disable', 'enable'] |
| 319 |
uuid: |
| 320 |
type: str |
| 321 |
description: Universally Unique Identifier |
| 322 |
vlan_cos_fwd: |
| 323 |
aliases: ['vlan-cos-fwd'] |
| 324 |
type: int |
| 325 |
description: VLAN forward direction user priority |
| 326 |
vlan_cos_rev: |
| 327 |
aliases: ['vlan-cos-rev'] |
| 328 |
type: int |
| 329 |
description: VLAN reverse direction user priority |
| 330 |
voip_profile: |
| 331 |
aliases: ['voip-profile'] |
| 332 |
type: str |
| 333 |
description: Name of an existing VoIP profile. |
| 334 |
vpntunnel: |
| 335 |
type: str |
| 336 |
description: Policy-based IPsec VPN |
| 337 |
webfilter_profile: |
| 338 |
aliases: ['webfilter-profile'] |
| 339 |
type: str |
| 340 |
description: Name of an existing Web filter profile. |
| 341 |
anti_replay: |
| 342 |
aliases: ['anti-replay'] |
| 343 |
type: str |
| 344 |
description: Enable/disable anti-replay check. |
| 345 |
choices: ['disable', 'enable'] |
| 346 |
app_group: |
| 347 |
aliases: ['app-group'] |
| 348 |
type: raw |
| 349 |
description: (list or str) Application group names. |
| 350 |
cifs_profile: |
| 351 |
aliases: ['cifs-profile'] |
| 352 |
type: str |
| 353 |
description: Name of an existing CIFS profile. |
| 354 |
dnsfilter_profile: |
| 355 |
aliases: ['dnsfilter-profile'] |
| 356 |
type: str |
| 357 |
description: Name of an existing DNS filter profile. |
| 358 |
emailfilter_profile: |
| 359 |
aliases: ['emailfilter-profile'] |
| 360 |
type: str |
| 361 |
description: Name of an existing email filter profile. |
| 362 |
http_policy_redirect: |
| 363 |
aliases: ['http-policy-redirect'] |
| 364 |
type: str |
| 365 |
description: Redirect HTTP |
| 366 |
choices: ['disable', 'enable'] |
| 367 |
inspection_mode: |
| 368 |
aliases: ['inspection-mode'] |
| 369 |
type: str |
| 370 |
description: Policy inspection mode |
| 371 |
choices: ['proxy', 'flow'] |
| 372 |
np_acceleration: |
| 373 |
aliases: ['np-acceleration'] |
| 374 |
type: str |
| 375 |
description: Enable/disable UTM Network Processor acceleration. |
| 376 |
choices: ['disable', 'enable'] |
| 377 |
ssh_filter_profile: |
| 378 |
aliases: ['ssh-filter-profile'] |
| 379 |
type: str |
| 380 |
description: Name of an existing SSH filter profile. |
| 381 |
ssh_policy_redirect: |
| 382 |
aliases: ['ssh-policy-redirect'] |
| 383 |
type: str |
| 384 |
description: Redirect SSH traffic to matching transparent proxy policy. |
| 385 |
choices: ['disable', 'enable'] |
| 386 |
tos: |
| 387 |
type: str |
| 388 |
description: ToS |
| 389 |
tos_mask: |
| 390 |
aliases: ['tos-mask'] |
| 391 |
type: str |
| 392 |
description: Non-zero bit positions are used for comparison while zero bit positions are ignored. |
| 393 |
tos_negate: |
| 394 |
aliases: ['tos-negate'] |
| 395 |
type: str |
| 396 |
description: Enable negated TOS match. |
| 397 |
choices: ['disable', 'enable'] |
| 398 |
vlan_filter: |
| 399 |
aliases: ['vlan-filter'] |
| 400 |
type: str |
| 401 |
description: Set VLAN filters. |
| 402 |
waf_profile: |
| 403 |
aliases: ['waf-profile'] |
| 404 |
type: str |
| 405 |
description: Name of an existing Web application firewall profile. |
| 406 |
webcache: |
| 407 |
type: str |
| 408 |
description: Enable/disable web cache. |
| 409 |
choices: ['disable', 'enable'] |
| 410 |
webcache_https: |
| 411 |
aliases: ['webcache-https'] |
| 412 |
type: str |
| 413 |
description: Enable/disable web cache for HTTPS. |
| 414 |
choices: ['disable', 'enable'] |
| 415 |
webproxy_forward_server: |
| 416 |
aliases: ['webproxy-forward-server'] |
| 417 |
type: str |
| 418 |
description: Web proxy forward server name. |
| 419 |
webproxy_profile: |
| 420 |
aliases: ['webproxy-profile'] |
| 421 |
type: str |
| 422 |
description: Webproxy profile name. |
| 423 |
casi_profile: |
| 424 |
aliases: ['casi-profile'] |
| 425 |
type: str |
| 426 |
description: CASI profile. |
| 427 |
fsso_groups: |
| 428 |
aliases: ['fsso-groups'] |
| 429 |
type: raw |
| 430 |
description: (list or str) Names of FSSO groups. |
| 431 |
decrypted_traffic_mirror: |
| 432 |
aliases: ['decrypted-traffic-mirror'] |
| 433 |
type: str |
| 434 |
description: Decrypted traffic mirror. |
| 435 |
cgn_log_server_grp: |
| 436 |
aliases: ['cgn-log-server-grp'] |
| 437 |
type: str |
| 438 |
description: NP log server group name |
| 439 |
policy_offload: |
| 440 |
aliases: ['policy-offload'] |
| 441 |
type: str |
| 442 |
description: Enable/disable offloading policy configuration to CP processors. |
| 443 |
choices: ['disable', 'enable'] |
| 444 |
_policy_block: |
| 445 |
type: int |
| 446 |
description: Assigned policy block. |
| 447 |
''' |
| 448 |
|
| 449 |
EXAMPLES = ''' |
| 450 |
- name: Example playbook |
| 451 |
hosts: fortimanagers |
| 452 |
gather_facts: false |
| 453 |
connection: httpapi |
| 454 |
vars: |
| 455 |
ansible_httpapi_use_ssl: true |
| 456 |
ansible_httpapi_validate_certs: false |
| 457 |
ansible_httpapi_port: 443 |
| 458 |
tasks: |
| 459 |
- name: Configure IPv6 policies. |
| 460 |
fortinet.fortimanager.fmgr_pkg_firewall_policy6: |
| 461 |
bypass_validation: false |
| 462 |
adom: ansible |
| 463 |
pkg: ansible # package name |
| 464 |
state: present |
| 465 |
pkg_firewall_policy6: |
| 466 |
action: accept # <value in [deny, accept, ipsec, ...]> |
| 467 |
comments: ansible-comment |
| 468 |
dstaddr: all |
| 469 |
dstintf: any |
| 470 |
name: ansible-test-policy6 |
| 471 |
nat: disable |
| 472 |
policyid: 1 |
| 473 |
schedule: always |
| 474 |
service: ALL |
| 475 |
srcaddr: all |
| 476 |
srcintf: any |
| 477 |
status: disable |
| 478 |
|
| 479 |
- name: Gathering fortimanager facts |
| 480 |
hosts: fortimanagers |
| 481 |
gather_facts: false |
| 482 |
connection: httpapi |
| 483 |
vars: |
| 484 |
ansible_httpapi_use_ssl: true |
| 485 |
ansible_httpapi_validate_certs: false |
| 486 |
ansible_httpapi_port: 443 |
| 487 |
tasks: |
| 488 |
- name: Retrieve all the IPv6 policies |
| 489 |
fortinet.fortimanager.fmgr_fact: |
| 490 |
facts: |
| 491 |
selector: "pkg_firewall_policy6" |
| 492 |
params: |
| 493 |
adom: "ansible" |
| 494 |
pkg: "ansible" # package name |
| 495 |
policy6: "your_value" |
| 496 |
''' |
| 497 |
|
| 498 |
RETURN = ''' |
| 499 |
meta: |
| 500 |
description: The result of the request. |
| 501 |
type: dict |
| 502 |
returned: always |
| 503 |
contains: |
| 504 |
request_url: |
| 505 |
description: The full url requested. |
| 506 |
returned: always |
| 507 |
type: str |
| 508 |
sample: /sys/login/user |
| 509 |
response_code: |
| 510 |
description: The status of api request. |
| 511 |
returned: always |
| 512 |
type: int |
| 513 |
sample: 0 |
| 514 |
response_data: |
| 515 |
description: The api response. |
| 516 |
type: list |
| 517 |
returned: always |
| 518 |
response_message: |
| 519 |
description: The descriptive message of the api response. |
| 520 |
type: str |
| 521 |
returned: always |
| 522 |
sample: OK. |
| 523 |
system_information: |
| 524 |
description: The information of the target system. |
| 525 |
type: dict |
| 526 |
returned: always |
| 527 |
rc: |
| 528 |
description: The status the request. |
| 529 |
type: int |
| 530 |
returned: always |
| 531 |
sample: 0 |
| 532 |
version_check_warning: |
| 533 |
description: Warning if the parameters used in the playbook are not supported by the current FortiManager version. |
| 534 |
type: list |
| 535 |
returned: complex |
| 536 |
''' |
| 537 |
from ansible.module_utils.basic import AnsibleModule |
| 538 |
from ansible.module_utils.connection import Connection |
| 539 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass |
| 540 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec |
| 541 |
|
| 542 |
|
| 543 |
def main(): |
| 544 |
urls_list = [ |
| 545 |
'/pm/config/adom/{adom}/pkg/{pkg}/firewall/policy6' |
| 546 |
] |
| 547 |
module_arg_spec = { |
| 548 |
'adom': {'required': True, 'type': 'str'}, |
| 549 |
'pkg': {'required': True, 'type': 'str'}, |
| 550 |
'revision_note': {'type': 'str'}, |
| 551 |
'pkg_firewall_policy6': { |
| 552 |
'type': 'dict', 'v_range': [['6.0.0', '7.6.2']], |
| 553 |
'options': { |
| 554 |
'action': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['deny', 'accept', 'ipsec', 'ssl-vpn'], 'type': 'str'}, |
| 555 |
'app-category': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 556 |
'application': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 557 |
'application-list': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 558 |
'auto-asic-offload': { |
| 559 |
'v_range': [['6.0.0', '7.2.0'], ['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], |
| 560 |
'choices': ['disable', 'enable'], |
| 561 |
'type': 'str' |
| 562 |
}, |
| 563 |
'av-profile': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 564 |
'comments': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 565 |
'custom-log-fields': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 566 |
'devices': {'v_range': [['6.0.0', '7.2.1']], 'type': 'raw'}, |
| 567 |
'diffserv-forward': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 568 |
'diffserv-reverse': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 569 |
'diffservcode-forward': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 570 |
'diffservcode-rev': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 571 |
'dlp-sensor': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 572 |
'dscp-match': {'v_range': [['6.0.0', '7.2.1']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 573 |
'dscp-negate': {'v_range': [['6.0.0', '7.2.1']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 574 |
'dscp-value': {'v_range': [['6.0.0', '7.2.1']], 'type': 'str'}, |
| 575 |
'dsri': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 576 |
'dstaddr': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 577 |
'dstaddr-negate': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 578 |
'dstintf': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 579 |
'firewall-session-dirty': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['check-all', 'check-new'], 'type': 'str'}, |
| 580 |
'fixedport': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 581 |
'global-label': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 582 |
'groups': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 583 |
'icap-profile': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 584 |
'inbound': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 585 |
'ippool': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 586 |
'ips-sensor': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 587 |
'label': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 588 |
'logtraffic': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable', 'all', 'utm'], 'type': 'str'}, |
| 589 |
'logtraffic-start': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 590 |
'mms-profile': {'v_range': [['6.0.0', '7.2.0'], ['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], 'type': 'str'}, |
| 591 |
'name': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 592 |
'nat': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 593 |
'natinbound': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 594 |
'natoutbound': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 595 |
'np-accelation': {'v_range': [['6.0.0', '6.4.15']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 596 |
'outbound': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 597 |
'per-ip-shaper': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 598 |
'policyid': {'v_range': [['6.0.0', '7.6.2']], 'required': True, 'type': 'int'}, |
| 599 |
'poolname': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 600 |
'profile-group': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 601 |
'profile-protocol-options': {'v_range': [['6.0.0', '7.2.1'], ['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], 'type': 'str'}, |
| 602 |
'profile-type': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['single', 'group'], 'type': 'str'}, |
| 603 |
'replacemsg-override-group': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 604 |
'rsso': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 605 |
'schedule': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 606 |
'send-deny-packet': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 607 |
'service': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 608 |
'service-negate': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 609 |
'session-ttl': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 610 |
'spamfilter-profile': {'v_range': [['6.0.0', '7.2.1']], 'type': 'str'}, |
| 611 |
'srcaddr': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 612 |
'srcaddr-negate': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 613 |
'srcintf': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 614 |
'ssl-mirror': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 615 |
'ssl-mirror-intf': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 616 |
'ssl-ssh-profile': {'v_range': [['6.0.0', '7.2.1'], ['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], 'type': 'str'}, |
| 617 |
'status': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 618 |
'tags': {'v_range': [['6.0.0', '6.4.15']], 'type': 'str'}, |
| 619 |
'tcp-mss-receiver': {'v_range': [['6.0.0', '7.6.2']], 'type': 'int'}, |
| 620 |
'tcp-mss-sender': {'v_range': [['6.0.0', '7.6.2']], 'type': 'int'}, |
| 621 |
'tcp-session-without-syn': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['all', 'data-only', 'disable'], 'type': 'str'}, |
| 622 |
'timeout-send-rst': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 623 |
'traffic-shaper': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 624 |
'traffic-shaper-reverse': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 625 |
'url-category': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 626 |
'users': {'v_range': [['6.0.0', '7.6.2']], 'type': 'raw'}, |
| 627 |
'utm-status': {'v_range': [['6.0.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 628 |
'uuid': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 629 |
'vlan-cos-fwd': {'v_range': [['6.0.0', '7.6.2']], 'type': 'int'}, |
| 630 |
'vlan-cos-rev': {'v_range': [['6.0.0', '7.6.2']], 'type': 'int'}, |
| 631 |
'voip-profile': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 632 |
'vpntunnel': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 633 |
'webfilter-profile': {'v_range': [['6.0.0', '7.6.2']], 'type': 'str'}, |
| 634 |
'anti-replay': {'v_range': [['6.2.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 635 |
'app-group': {'v_range': [['6.2.0', '7.6.2']], 'type': 'raw'}, |
| 636 |
'cifs-profile': {'v_range': [['6.2.0', '7.6.2']], 'type': 'str'}, |
| 637 |
'dnsfilter-profile': {'v_range': [['6.2.0', '7.6.2']], 'type': 'str'}, |
| 638 |
'emailfilter-profile': {'v_range': [['6.2.0', '7.6.2']], 'type': 'str'}, |
| 639 |
'http-policy-redirect': {'v_range': [['6.2.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 640 |
'inspection-mode': {'v_range': [['6.2.0', '7.6.2']], 'choices': ['proxy', 'flow'], 'type': 'str'}, |
| 641 |
'np-acceleration': { |
| 642 |
'v_range': [['6.2.0', '7.2.0'], ['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], |
| 643 |
'choices': ['disable', 'enable'], |
| 644 |
'type': 'str' |
| 645 |
}, |
| 646 |
'ssh-filter-profile': {'v_range': [['6.2.0', '7.2.1'], ['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], 'type': 'str'}, |
| 647 |
'ssh-policy-redirect': {'v_range': [['6.2.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 648 |
'tos': {'v_range': [['6.2.0', '7.6.2']], 'type': 'str'}, |
| 649 |
'tos-mask': {'v_range': [['6.2.0', '7.6.2']], 'type': 'str'}, |
| 650 |
'tos-negate': {'v_range': [['6.2.0', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 651 |
'vlan-filter': {'v_range': [['6.2.0', '7.6.2']], 'type': 'str'}, |
| 652 |
'waf-profile': {'v_range': [['6.2.1', '7.6.2']], 'type': 'str'}, |
| 653 |
'webcache': {'v_range': [['6.2.1', '7.2.0'], ['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 654 |
'webcache-https': { |
| 655 |
'v_range': [['6.2.1', '7.2.0'], ['7.2.6', '7.2.12'], ['7.4.3', '7.6.2']], |
| 656 |
'choices': ['disable', 'enable'], |
| 657 |
'type': 'str' |
| 658 |
}, |
| 659 |
'webproxy-forward-server': {'v_range': [['6.2.1', '7.6.2']], 'type': 'str'}, |
| 660 |
'webproxy-profile': {'v_range': [['6.2.1', '7.6.2']], 'type': 'str'}, |
| 661 |
'casi-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 662 |
'fsso-groups': {'v_range': [['6.2.3', '7.6.2']], 'type': 'raw'}, |
| 663 |
'decrypted-traffic-mirror': {'v_range': [['6.4.0', '6.4.0']], 'type': 'str'}, |
| 664 |
'cgn-log-server-grp': {'v_range': [['6.2.7', '6.2.13'], ['6.4.3', '7.6.2']], 'type': 'str'}, |
| 665 |
'policy-offload': {'v_range': [['6.2.7', '6.2.13'], ['6.4.3', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 666 |
'_policy_block': {'v_range': [['7.0.3', '7.6.2']], 'type': 'int'} |
| 667 |
} |
| 668 |
} |
| 669 |
} |
| 670 |
|
| 671 |
module_option_spec = get_module_arg_spec('full crud') |
| 672 |
module_arg_spec.update(module_option_spec) |
| 673 |
check_galaxy_version(module_arg_spec) |
| 674 |
module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'pkg_firewall_policy6'), |
| 675 |
supports_check_mode=True) |
| 676 |
if not module._socket_path: |
| 677 |
module.fail_json(msg='MUST RUN IN HTTPAPI MODE') |
| 678 |
connection = Connection(module._socket_path) |
| 679 |
fmgr = NAPIManager('full crud', module_arg_spec, urls_list, |
| 680 |
'policyid', 'data', module, connection) |
| 681 |
fmgr.process_crud() |
| 682 |
module.exit_json(meta=module.params) |
| 683 |
|
| 684 |
|
| 685 |
if __name__ == '__main__': |
| 686 |
main() |