| 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_explicitproxypolicy |
| 15 |
short_description: Configure Explicit proxy policies. |
| 16 |
version_added: "2.2.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_explicitproxypolicy: |
| 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'] |
| 41 |
active_auth_method: |
| 42 |
aliases: ['active-auth-method'] |
| 43 |
type: str |
| 44 |
description: Active authentication method. |
| 45 |
choices: ['ntlm', 'basic', 'digest', 'form', 'none', 'negotiate'] |
| 46 |
application_list: |
| 47 |
aliases: ['application-list'] |
| 48 |
type: str |
| 49 |
description: Application list. |
| 50 |
av_profile: |
| 51 |
aliases: ['av-profile'] |
| 52 |
type: str |
| 53 |
description: Antivirus profile. |
| 54 |
casi_profile: |
| 55 |
aliases: ['casi-profile'] |
| 56 |
type: str |
| 57 |
description: CASI profile. |
| 58 |
comments: |
| 59 |
type: str |
| 60 |
description: Comment. |
| 61 |
disclaimer: |
| 62 |
type: str |
| 63 |
description: Web proxy disclaimer setting. |
| 64 |
choices: ['disable', 'domain', 'policy', 'user'] |
| 65 |
dlp_sensor: |
| 66 |
aliases: ['dlp-sensor'] |
| 67 |
type: str |
| 68 |
description: DLP sensor. |
| 69 |
dstaddr: |
| 70 |
type: str |
| 71 |
description: Destination address name. |
| 72 |
dstaddr_negate: |
| 73 |
aliases: ['dstaddr-negate'] |
| 74 |
type: str |
| 75 |
description: Enable/disable negated destination address match. |
| 76 |
choices: ['disable', 'enable'] |
| 77 |
dstaddr6: |
| 78 |
type: str |
| 79 |
description: IPv6 destination address |
| 80 |
dstintf: |
| 81 |
type: str |
| 82 |
description: Destination interface name. |
| 83 |
global_label: |
| 84 |
aliases: ['global-label'] |
| 85 |
type: str |
| 86 |
description: Label for global view. |
| 87 |
icap_profile: |
| 88 |
aliases: ['icap-profile'] |
| 89 |
type: str |
| 90 |
description: ICAP profile. |
| 91 |
identity_based: |
| 92 |
aliases: ['identity-based'] |
| 93 |
type: str |
| 94 |
description: Enable/disable identity-based policy. |
| 95 |
choices: ['disable', 'enable'] |
| 96 |
identity_based_policy: |
| 97 |
aliases: ['identity-based-policy'] |
| 98 |
type: list |
| 99 |
elements: dict |
| 100 |
description: Identity based policy. |
| 101 |
suboptions: |
| 102 |
application_list: |
| 103 |
aliases: ['application-list'] |
| 104 |
type: str |
| 105 |
description: Application list. |
| 106 |
av_profile: |
| 107 |
aliases: ['av-profile'] |
| 108 |
type: str |
| 109 |
description: Antivirus profile. |
| 110 |
casi_profile: |
| 111 |
aliases: ['casi-profile'] |
| 112 |
type: str |
| 113 |
description: CASI profile. |
| 114 |
disclaimer: |
| 115 |
type: str |
| 116 |
description: Web proxy disclaimer setting. |
| 117 |
choices: ['disable', 'domain', 'policy', 'user'] |
| 118 |
dlp_sensor: |
| 119 |
aliases: ['dlp-sensor'] |
| 120 |
type: str |
| 121 |
description: DLP sensor. |
| 122 |
groups: |
| 123 |
type: str |
| 124 |
description: Group name. |
| 125 |
icap_profile: |
| 126 |
aliases: ['icap-profile'] |
| 127 |
type: str |
| 128 |
description: ICAP profile. |
| 129 |
id: |
| 130 |
type: int |
| 131 |
description: ID. |
| 132 |
ips_sensor: |
| 133 |
aliases: ['ips-sensor'] |
| 134 |
type: str |
| 135 |
description: IPS sensor. |
| 136 |
logtraffic: |
| 137 |
type: str |
| 138 |
description: Enable/disable policy log traffic. |
| 139 |
choices: ['disable', 'all', 'utm'] |
| 140 |
logtraffic_start: |
| 141 |
aliases: ['logtraffic-start'] |
| 142 |
type: str |
| 143 |
description: Enable/disable policy log traffic start. |
| 144 |
choices: ['disable', 'enable'] |
| 145 |
mms_profile: |
| 146 |
aliases: ['mms-profile'] |
| 147 |
type: str |
| 148 |
description: Mms profile |
| 149 |
profile_group: |
| 150 |
aliases: ['profile-group'] |
| 151 |
type: str |
| 152 |
description: Profile group |
| 153 |
profile_protocol_options: |
| 154 |
aliases: ['profile-protocol-options'] |
| 155 |
type: str |
| 156 |
description: Profile protocol options. |
| 157 |
profile_type: |
| 158 |
aliases: ['profile-type'] |
| 159 |
type: str |
| 160 |
description: Profile type |
| 161 |
choices: ['single', 'group'] |
| 162 |
replacemsg_override_group: |
| 163 |
aliases: ['replacemsg-override-group'] |
| 164 |
type: str |
| 165 |
description: Specify authentication replacement message override group. |
| 166 |
scan_botnet_connections: |
| 167 |
aliases: ['scan-botnet-connections'] |
| 168 |
type: str |
| 169 |
description: Enable/disable scanning of connections to Botnet servers. |
| 170 |
choices: ['disable', 'block', 'monitor'] |
| 171 |
schedule: |
| 172 |
type: str |
| 173 |
description: Schedule name. |
| 174 |
spamfilter_profile: |
| 175 |
aliases: ['spamfilter-profile'] |
| 176 |
type: str |
| 177 |
description: Spam filter profile. |
| 178 |
ssl_ssh_profile: |
| 179 |
aliases: ['ssl-ssh-profile'] |
| 180 |
type: str |
| 181 |
description: SSL SSH Profile. |
| 182 |
users: |
| 183 |
type: str |
| 184 |
description: User name. |
| 185 |
utm_status: |
| 186 |
aliases: ['utm-status'] |
| 187 |
type: str |
| 188 |
description: Enable AV/web/IPS protection profile. |
| 189 |
choices: ['disable', 'enable'] |
| 190 |
waf_profile: |
| 191 |
aliases: ['waf-profile'] |
| 192 |
type: str |
| 193 |
description: Web application firewall profile. |
| 194 |
webfilter_profile: |
| 195 |
aliases: ['webfilter-profile'] |
| 196 |
type: str |
| 197 |
description: Web filter profile. |
| 198 |
ip_based: |
| 199 |
aliases: ['ip-based'] |
| 200 |
type: str |
| 201 |
description: Enable/disable IP-based authentication. |
| 202 |
choices: ['disable', 'enable'] |
| 203 |
ips_sensor: |
| 204 |
aliases: ['ips-sensor'] |
| 205 |
type: str |
| 206 |
description: IPS sensor. |
| 207 |
label: |
| 208 |
type: str |
| 209 |
description: Label for section view. |
| 210 |
logtraffic: |
| 211 |
type: str |
| 212 |
description: Enable/disable policy log traffic. |
| 213 |
choices: ['disable', 'all', 'utm'] |
| 214 |
logtraffic_start: |
| 215 |
aliases: ['logtraffic-start'] |
| 216 |
type: str |
| 217 |
description: Enable/disable policy log traffic start. |
| 218 |
choices: ['disable', 'enable'] |
| 219 |
mms_profile: |
| 220 |
aliases: ['mms-profile'] |
| 221 |
type: str |
| 222 |
description: Mms profile |
| 223 |
policyid: |
| 224 |
type: int |
| 225 |
description: Policy ID. |
| 226 |
required: true |
| 227 |
profile_group: |
| 228 |
aliases: ['profile-group'] |
| 229 |
type: str |
| 230 |
description: Profile group |
| 231 |
profile_protocol_options: |
| 232 |
aliases: ['profile-protocol-options'] |
| 233 |
type: str |
| 234 |
description: Profile protocol options. |
| 235 |
profile_type: |
| 236 |
aliases: ['profile-type'] |
| 237 |
type: str |
| 238 |
description: Profile type |
| 239 |
choices: ['single', 'group'] |
| 240 |
proxy: |
| 241 |
type: str |
| 242 |
description: Explicit proxy type. |
| 243 |
choices: ['web', 'ftp', 'wanopt'] |
| 244 |
replacemsg_override_group: |
| 245 |
aliases: ['replacemsg-override-group'] |
| 246 |
type: str |
| 247 |
description: Specify authentication replacement message override group. |
| 248 |
require_tfa: |
| 249 |
aliases: ['require-tfa'] |
| 250 |
type: str |
| 251 |
description: Enable/disable requirement of 2-factor authentication. |
| 252 |
choices: ['disable', 'enable'] |
| 253 |
scan_botnet_connections: |
| 254 |
aliases: ['scan-botnet-connections'] |
| 255 |
type: str |
| 256 |
description: Enable/disable scanning of connections to Botnet servers. |
| 257 |
choices: ['disable', 'block', 'monitor'] |
| 258 |
schedule: |
| 259 |
type: str |
| 260 |
description: Schedule name. |
| 261 |
service: |
| 262 |
type: str |
| 263 |
description: Service name. |
| 264 |
service_negate: |
| 265 |
aliases: ['service-negate'] |
| 266 |
type: str |
| 267 |
description: Enable/disable negated service match. |
| 268 |
choices: ['disable', 'enable'] |
| 269 |
spamfilter_profile: |
| 270 |
aliases: ['spamfilter-profile'] |
| 271 |
type: str |
| 272 |
description: Spam filter profile. |
| 273 |
srcaddr: |
| 274 |
type: str |
| 275 |
description: Source address name. |
| 276 |
srcaddr_negate: |
| 277 |
aliases: ['srcaddr-negate'] |
| 278 |
type: str |
| 279 |
description: Enable/disable negated source address match. |
| 280 |
choices: ['disable', 'enable'] |
| 281 |
srcaddr6: |
| 282 |
type: str |
| 283 |
description: IPv6 source address |
| 284 |
ssl_ssh_profile: |
| 285 |
aliases: ['ssl-ssh-profile'] |
| 286 |
type: str |
| 287 |
description: SSL SSH Profile. |
| 288 |
sso_auth_method: |
| 289 |
aliases: ['sso-auth-method'] |
| 290 |
type: str |
| 291 |
description: SSO authentication method. |
| 292 |
choices: ['fsso', 'rsso', 'none'] |
| 293 |
status: |
| 294 |
type: str |
| 295 |
description: Enable/disable policy status. |
| 296 |
choices: ['disable', 'enable'] |
| 297 |
tags: |
| 298 |
type: str |
| 299 |
description: Applied object tags. |
| 300 |
transaction_based: |
| 301 |
aliases: ['transaction-based'] |
| 302 |
type: str |
| 303 |
description: Enable/disable transaction based authentication. |
| 304 |
choices: ['disable', 'enable'] |
| 305 |
transparent: |
| 306 |
type: str |
| 307 |
description: Use IP address of client to connect to server. |
| 308 |
choices: ['disable', 'enable'] |
| 309 |
utm_status: |
| 310 |
aliases: ['utm-status'] |
| 311 |
type: str |
| 312 |
description: Enable AV/web/IPS protection profile. |
| 313 |
choices: ['disable', 'enable'] |
| 314 |
uuid: |
| 315 |
type: str |
| 316 |
description: Universally Unique IDentifier. |
| 317 |
waf_profile: |
| 318 |
aliases: ['waf-profile'] |
| 319 |
type: str |
| 320 |
description: Web application firewall profile. |
| 321 |
web_auth_cookie: |
| 322 |
aliases: ['web-auth-cookie'] |
| 323 |
type: str |
| 324 |
description: Enable/disable Web authentication cookie. |
| 325 |
choices: ['disable', 'enable'] |
| 326 |
webcache: |
| 327 |
type: str |
| 328 |
description: Enable/disable web cache. |
| 329 |
choices: ['disable', 'enable'] |
| 330 |
webcache_https: |
| 331 |
aliases: ['webcache-https'] |
| 332 |
type: str |
| 333 |
description: Enable/disable web cache for HTTPS. |
| 334 |
choices: ['disable', 'any', 'enable'] |
| 335 |
webfilter_profile: |
| 336 |
aliases: ['webfilter-profile'] |
| 337 |
type: str |
| 338 |
description: Web filter profile. |
| 339 |
webproxy_forward_server: |
| 340 |
aliases: ['webproxy-forward-server'] |
| 341 |
type: str |
| 342 |
description: Web proxy forward server. |
| 343 |
webproxy_profile: |
| 344 |
aliases: ['webproxy-profile'] |
| 345 |
type: str |
| 346 |
description: Web proxy profile. |
| 347 |
''' |
| 348 |
|
| 349 |
EXAMPLES = ''' |
| 350 |
- name: Example playbook (generated based on argument schema) |
| 351 |
hosts: fortimanagers |
| 352 |
connection: httpapi |
| 353 |
gather_facts: false |
| 354 |
tasks: |
| 355 |
- name: Configure Explicit proxy policies. |
| 356 |
fortinet.fortimanager.fmgr_pkg_firewall_explicitproxypolicy: |
| 357 |
# workspace_locking_adom: <global or your adom name> |
| 358 |
adom: <your own value> |
| 359 |
pkg: <your own value> |
| 360 |
state: present # <value in [present, absent]> |
| 361 |
pkg_firewall_explicitproxypolicy: |
| 362 |
policyid: 0 # Required variable, integer |
| 363 |
# action: <value in [deny, accept]> |
| 364 |
# active_auth_method: <value in [ntlm, basic, digest, ...]> |
| 365 |
# application_list: <string> |
| 366 |
# av_profile: <string> |
| 367 |
# casi_profile: <string> |
| 368 |
# comments: <string> |
| 369 |
# disclaimer: <value in [disable, domain, policy, ...]> |
| 370 |
# dlp_sensor: <string> |
| 371 |
# dstaddr: <string> |
| 372 |
# dstaddr_negate: <value in [disable, enable]> |
| 373 |
# dstaddr6: <string> |
| 374 |
# dstintf: <string> |
| 375 |
# global_label: <string> |
| 376 |
# icap_profile: <string> |
| 377 |
# identity_based: <value in [disable, enable]> |
| 378 |
# identity_based_policy: |
| 379 |
# - application_list: <string> |
| 380 |
# av_profile: <string> |
| 381 |
# casi_profile: <string> |
| 382 |
# disclaimer: <value in [disable, domain, policy, ...]> |
| 383 |
# dlp_sensor: <string> |
| 384 |
# groups: <string> |
| 385 |
# icap_profile: <string> |
| 386 |
# id: <integer> |
| 387 |
# ips_sensor: <string> |
| 388 |
# logtraffic: <value in [disable, all, utm]> |
| 389 |
# logtraffic_start: <value in [disable, enable]> |
| 390 |
# mms_profile: <string> |
| 391 |
# profile_group: <string> |
| 392 |
# profile_protocol_options: <string> |
| 393 |
# profile_type: <value in [single, group]> |
| 394 |
# replacemsg_override_group: <string> |
| 395 |
# scan_botnet_connections: <value in [disable, block, monitor]> |
| 396 |
# schedule: <string> |
| 397 |
# spamfilter_profile: <string> |
| 398 |
# ssl_ssh_profile: <string> |
| 399 |
# users: <string> |
| 400 |
# utm_status: <value in [disable, enable]> |
| 401 |
# waf_profile: <string> |
| 402 |
# webfilter_profile: <string> |
| 403 |
# ip_based: <value in [disable, enable]> |
| 404 |
# ips_sensor: <string> |
| 405 |
# label: <string> |
| 406 |
# logtraffic: <value in [disable, all, utm]> |
| 407 |
# logtraffic_start: <value in [disable, enable]> |
| 408 |
# mms_profile: <string> |
| 409 |
# profile_group: <string> |
| 410 |
# profile_protocol_options: <string> |
| 411 |
# profile_type: <value in [single, group]> |
| 412 |
# proxy: <value in [web, ftp, wanopt]> |
| 413 |
# replacemsg_override_group: <string> |
| 414 |
# require_tfa: <value in [disable, enable]> |
| 415 |
# scan_botnet_connections: <value in [disable, block, monitor]> |
| 416 |
# schedule: <string> |
| 417 |
# service: <string> |
| 418 |
# service_negate: <value in [disable, enable]> |
| 419 |
# spamfilter_profile: <string> |
| 420 |
# srcaddr: <string> |
| 421 |
# srcaddr_negate: <value in [disable, enable]> |
| 422 |
# srcaddr6: <string> |
| 423 |
# ssl_ssh_profile: <string> |
| 424 |
# sso_auth_method: <value in [fsso, rsso, none]> |
| 425 |
# status: <value in [disable, enable]> |
| 426 |
# tags: <string> |
| 427 |
# transaction_based: <value in [disable, enable]> |
| 428 |
# transparent: <value in [disable, enable]> |
| 429 |
# utm_status: <value in [disable, enable]> |
| 430 |
# uuid: <string> |
| 431 |
# waf_profile: <string> |
| 432 |
# web_auth_cookie: <value in [disable, enable]> |
| 433 |
# webcache: <value in [disable, enable]> |
| 434 |
# webcache_https: <value in [disable, any, enable]> |
| 435 |
# webfilter_profile: <string> |
| 436 |
# webproxy_forward_server: <string> |
| 437 |
# webproxy_profile: <string> |
| 438 |
''' |
| 439 |
|
| 440 |
RETURN = ''' |
| 441 |
meta: |
| 442 |
description: The result of the request. |
| 443 |
type: dict |
| 444 |
returned: always |
| 445 |
contains: |
| 446 |
request_url: |
| 447 |
description: The full url requested. |
| 448 |
returned: always |
| 449 |
type: str |
| 450 |
sample: /sys/login/user |
| 451 |
response_code: |
| 452 |
description: The status of api request. |
| 453 |
returned: always |
| 454 |
type: int |
| 455 |
sample: 0 |
| 456 |
response_data: |
| 457 |
description: The api response. |
| 458 |
type: list |
| 459 |
returned: always |
| 460 |
response_message: |
| 461 |
description: The descriptive message of the api response. |
| 462 |
type: str |
| 463 |
returned: always |
| 464 |
sample: OK. |
| 465 |
system_information: |
| 466 |
description: The information of the target system. |
| 467 |
type: dict |
| 468 |
returned: always |
| 469 |
rc: |
| 470 |
description: The status the request. |
| 471 |
type: int |
| 472 |
returned: always |
| 473 |
sample: 0 |
| 474 |
version_check_warning: |
| 475 |
description: Warning if the parameters used in the playbook are not supported by the current FortiManager version. |
| 476 |
type: list |
| 477 |
returned: complex |
| 478 |
''' |
| 479 |
from ansible.module_utils.basic import AnsibleModule |
| 480 |
from ansible.module_utils.connection import Connection |
| 481 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass |
| 482 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec |
| 483 |
|
| 484 |
|
| 485 |
def main(): |
| 486 |
urls_list = [ |
| 487 |
'/pm/config/adom/{adom}/pkg/{pkg}/firewall/explicit-proxy-policy' |
| 488 |
] |
| 489 |
module_arg_spec = { |
| 490 |
'adom': {'required': True, 'type': 'str'}, |
| 491 |
'pkg': {'required': True, 'type': 'str'}, |
| 492 |
'revision_note': {'type': 'str'}, |
| 493 |
'pkg_firewall_explicitproxypolicy': { |
| 494 |
'type': 'dict', 'v_range': [['6.2.0', '6.2.13']], |
| 495 |
'options': { |
| 496 |
'action': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['deny', 'accept'], 'type': 'str'}, |
| 497 |
'active-auth-method': { |
| 498 |
'v_range': [['6.2.0', '6.2.13']], |
| 499 |
'choices': ['ntlm', 'basic', 'digest', 'form', 'none', 'negotiate'], |
| 500 |
'type': 'str' |
| 501 |
}, |
| 502 |
'application-list': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 503 |
'av-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 504 |
'casi-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 505 |
'comments': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 506 |
'disclaimer': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'domain', 'policy', 'user'], 'type': 'str'}, |
| 507 |
'dlp-sensor': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 508 |
'dstaddr': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 509 |
'dstaddr-negate': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 510 |
'dstaddr6': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 511 |
'dstintf': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 512 |
'global-label': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 513 |
'icap-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 514 |
'identity-based': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 515 |
'identity-based-policy': { |
| 516 |
'v_range': [['6.2.0', '6.2.13']], |
| 517 |
'type': 'list', |
| 518 |
'options': { |
| 519 |
'application-list': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 520 |
'av-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 521 |
'casi-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 522 |
'disclaimer': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'domain', 'policy', 'user'], 'type': 'str'}, |
| 523 |
'dlp-sensor': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 524 |
'groups': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 525 |
'icap-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 526 |
'id': {'v_range': [['6.2.0', '6.2.13']], 'type': 'int'}, |
| 527 |
'ips-sensor': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 528 |
'logtraffic': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'all', 'utm'], 'type': 'str'}, |
| 529 |
'logtraffic-start': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 530 |
'mms-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 531 |
'profile-group': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 532 |
'profile-protocol-options': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 533 |
'profile-type': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['single', 'group'], 'type': 'str'}, |
| 534 |
'replacemsg-override-group': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 535 |
'scan-botnet-connections': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'}, |
| 536 |
'schedule': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 537 |
'spamfilter-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 538 |
'ssl-ssh-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 539 |
'users': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 540 |
'utm-status': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 541 |
'waf-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 542 |
'webfilter-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'} |
| 543 |
}, |
| 544 |
'elements': 'dict' |
| 545 |
}, |
| 546 |
'ip-based': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 547 |
'ips-sensor': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 548 |
'label': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 549 |
'logtraffic': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'all', 'utm'], 'type': 'str'}, |
| 550 |
'logtraffic-start': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 551 |
'mms-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 552 |
'policyid': {'v_range': [['6.2.0', '6.2.13']], 'required': True, 'type': 'int'}, |
| 553 |
'profile-group': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 554 |
'profile-protocol-options': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 555 |
'profile-type': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['single', 'group'], 'type': 'str'}, |
| 556 |
'proxy': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['web', 'ftp', 'wanopt'], 'type': 'str'}, |
| 557 |
'replacemsg-override-group': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 558 |
'require-tfa': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 559 |
'scan-botnet-connections': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'}, |
| 560 |
'schedule': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 561 |
'service': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 562 |
'service-negate': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 563 |
'spamfilter-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 564 |
'srcaddr': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 565 |
'srcaddr-negate': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 566 |
'srcaddr6': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 567 |
'ssl-ssh-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 568 |
'sso-auth-method': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['fsso', 'rsso', 'none'], 'type': 'str'}, |
| 569 |
'status': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 570 |
'tags': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 571 |
'transaction-based': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 572 |
'transparent': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 573 |
'utm-status': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 574 |
'uuid': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 575 |
'waf-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 576 |
'web-auth-cookie': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 577 |
'webcache': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 578 |
'webcache-https': {'v_range': [['6.2.0', '6.2.13']], 'choices': ['disable', 'any', 'enable'], 'type': 'str'}, |
| 579 |
'webfilter-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 580 |
'webproxy-forward-server': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'}, |
| 581 |
'webproxy-profile': {'v_range': [['6.2.0', '6.2.13']], 'type': 'str'} |
| 582 |
} |
| 583 |
} |
| 584 |
} |
| 585 |
|
| 586 |
module_option_spec = get_module_arg_spec('full crud') |
| 587 |
module_arg_spec.update(module_option_spec) |
| 588 |
check_galaxy_version(module_arg_spec) |
| 589 |
module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'pkg_firewall_explicitproxypolicy'), |
| 590 |
supports_check_mode=True) |
| 591 |
if not module._socket_path: |
| 592 |
module.fail_json(msg='MUST RUN IN HTTPAPI MODE') |
| 593 |
connection = Connection(module._socket_path) |
| 594 |
fmgr = NAPIManager('full crud', module_arg_spec, urls_list, |
| 595 |
'policyid', 'data', module, connection) |
| 596 |
fmgr.process_crud() |
| 597 |
module.exit_json(meta=module.params) |
| 598 |
|
| 599 |
|
| 600 |
if __name__ == '__main__': |
| 601 |
main() |