Debian Codegraph @

ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_antivirus_profile.py

raw symbols SCIP
1 #!/usr/bin/python
2 from __future__ import absolute_import, division, print_function
3 # Copyright 2019-2024 Fortinet, Inc.
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
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_antivirus_profile
15 short_description: Configure AntiVirus profiles.
16 version_added: "1.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 antivirus_profile:
29 description: The top level parameters set.
30 required: false
31 type: dict
32 suboptions:
33 analytics_bl_filetype:
34 aliases: ['analytics-bl-filetype']
35 type: str
36 description: Only submit files matching this DLP file-pattern to FortiSandbox.
37 analytics_db:
38 aliases: ['analytics-db']
39 type: str
40 description: Enable/disable using the FortiSandbox signature database to supplement the AV signature databases.
41 choices: ['disable', 'enable']
42 analytics_max_upload:
43 aliases: ['analytics-max-upload']
44 type: int
45 description: Maximum size of files that can be uploaded to FortiSandbox
46 analytics_wl_filetype:
47 aliases: ['analytics-wl-filetype']
48 type: str
49 description: Do not submit files matching this DLP file-pattern to FortiSandbox.
50 av_block_log:
51 aliases: ['av-block-log']
52 type: str
53 description: Enable/disable logging for AntiVirus file blocking.
54 choices: ['disable', 'enable']
55 av_virus_log:
56 aliases: ['av-virus-log']
57 type: str
58 description: Enable/disable AntiVirus logging.
59 choices: ['disable', 'enable']
60 comment:
61 type: str
62 description: Comment.
63 extended_log:
64 aliases: ['extended-log']
65 type: str
66 description: Enable/disable extended logging for antivirus.
67 choices: ['disable', 'enable']
68 ftgd_analytics:
69 aliases: ['ftgd-analytics']
70 type: str
71 description: Settings to control which files are uploaded to FortiSandbox.
72 choices: ['disable', 'suspicious', 'everything']
73 inspection_mode:
74 aliases: ['inspection-mode']
75 type: str
76 description: Inspection mode.
77 choices: ['proxy', 'flow-based']
78 mobile_malware_db:
79 aliases: ['mobile-malware-db']
80 type: str
81 description: Enable/disable using the mobile malware signature database.
82 choices: ['disable', 'enable']
83 name:
84 type: str
85 description: Profile name.
86 required: true
87 replacemsg_group:
88 aliases: ['replacemsg-group']
89 type: str
90 description: Replacement message group customized for this profile.
91 scan_mode:
92 aliases: ['scan-mode']
93 type: str
94 description: Choose between full scan mode and quick scan mode.
95 choices: ['quick', 'full', 'legacy', 'default']
96 feature_set:
97 aliases: ['feature-set']
98 type: str
99 description: Flow/proxy feature set.
100 choices: ['proxy', 'flow']
101 cifs:
102 type: dict
103 description: Cifs.
104 suboptions:
105 archive_block:
106 aliases: ['archive-block']
107 type: list
108 elements: str
109 description: Select the archive types to block.
110 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
111 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
112 archive_log:
113 aliases: ['archive-log']
114 type: list
115 elements: str
116 description: Select the archive types to log.
117 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
118 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
119 emulator:
120 type: str
121 description: Enable/disable the virus emulator.
122 choices: ['disable', 'enable']
123 options:
124 type: list
125 elements: str
126 description: Enable/disable CIFS AntiVirus scanning, monitoring, and quarantine.
127 choices: ['scan', 'quarantine', 'avmonitor']
128 outbreak_prevention:
129 aliases: ['outbreak-prevention']
130 type: str
131 description: Enable Virus Outbreak Prevention service.
132 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
133 'monitor']
134 av_scan:
135 aliases: ['av-scan']
136 type: str
137 description: Enable AntiVirus scan service.
138 choices: ['disable', 'monitor', 'block']
139 external_blocklist:
140 aliases: ['external-blocklist']
141 type: str
142 description: Enable external-blocklist.
143 choices: ['disable', 'monitor', 'block']
144 quarantine:
145 type: str
146 description: Enable/disable quarantine for infected files.
147 choices: ['disable', 'enable']
148 fortindr:
149 type: str
150 description: Enable scanning of files by FortiNDR.
151 choices: ['disable', 'block', 'monitor']
152 fortisandbox:
153 type: str
154 description: Enable scanning of files by FortiSandbox.
155 choices: ['disable', 'block', 'monitor']
156 fortiai:
157 type: str
158 description: Enable/disable scanning of files by FortiAI.
159 choices: ['disable', 'monitor', 'block']
160 malware_stream:
161 aliases: ['malware-stream']
162 type: str
163 description: Enable 0-day malware-stream scanning.
164 choices: ['disable', 'monitor', 'block']
165 content_disarm:
166 aliases: ['content-disarm']
167 type: dict
168 description: Content disarm.
169 suboptions:
170 cover_page:
171 aliases: ['cover-page']
172 type: str
173 description: Enable/disable inserting a cover page into the disarmed document.
174 choices: ['disable', 'enable']
175 detect_only:
176 aliases: ['detect-only']
177 type: str
178 description: Enable/disable only detect disarmable files, do not alter content.
179 choices: ['disable', 'enable']
180 error_action:
181 aliases: ['error-action']
182 type: str
183 description: Action to be taken if CDR engine encounters an unrecoverable error.
184 choices: ['block', 'log-only', 'ignore']
185 office_action:
186 aliases: ['office-action']
187 type: str
188 description: Enable/disable stripping of PowerPoint action events in Microsoft Office documents.
189 choices: ['disable', 'enable']
190 office_dde:
191 aliases: ['office-dde']
192 type: str
193 description: Enable/disable stripping of Dynamic Data Exchange events in Microsoft Office documents.
194 choices: ['disable', 'enable']
195 office_embed:
196 aliases: ['office-embed']
197 type: str
198 description: Enable/disable stripping of embedded objects in Microsoft Office documents.
199 choices: ['disable', 'enable']
200 office_hylink:
201 aliases: ['office-hylink']
202 type: str
203 description: Enable/disable stripping of hyperlinks in Microsoft Office documents.
204 choices: ['disable', 'enable']
205 office_linked:
206 aliases: ['office-linked']
207 type: str
208 description: Enable/disable stripping of linked objects in Microsoft Office documents.
209 choices: ['disable', 'enable']
210 office_macro:
211 aliases: ['office-macro']
212 type: str
213 description: Enable/disable stripping of macros in Microsoft Office documents.
214 choices: ['disable', 'enable']
215 original_file_destination:
216 aliases: ['original-file-destination']
217 type: str
218 description: Destination to send original file if active content is removed.
219 choices: ['fortisandbox', 'quarantine', 'discard']
220 pdf_act_form:
221 aliases: ['pdf-act-form']
222 type: str
223 description: Enable/disable stripping of PDF document actions that submit data to other targets.
224 choices: ['disable', 'enable']
225 pdf_act_gotor:
226 aliases: ['pdf-act-gotor']
227 type: str
228 description: Enable/disable stripping of PDF document actions that access other PDF documents.
229 choices: ['disable', 'enable']
230 pdf_act_java:
231 aliases: ['pdf-act-java']
232 type: str
233 description: Enable/disable stripping of PDF document actions that execute JavaScript code.
234 choices: ['disable', 'enable']
235 pdf_act_launch:
236 aliases: ['pdf-act-launch']
237 type: str
238 description: Enable/disable stripping of PDF document actions that launch other applications.
239 choices: ['disable', 'enable']
240 pdf_act_movie:
241 aliases: ['pdf-act-movie']
242 type: str
243 description: Enable/disable stripping of PDF document actions that play a movie.
244 choices: ['disable', 'enable']
245 pdf_act_sound:
246 aliases: ['pdf-act-sound']
247 type: str
248 description: Enable/disable stripping of PDF document actions that play a sound.
249 choices: ['disable', 'enable']
250 pdf_embedfile:
251 aliases: ['pdf-embedfile']
252 type: str
253 description: Enable/disable stripping of embedded files in PDF documents.
254 choices: ['disable', 'enable']
255 pdf_hyperlink:
256 aliases: ['pdf-hyperlink']
257 type: str
258 description: Enable/disable stripping of hyperlinks from PDF documents.
259 choices: ['disable', 'enable']
260 pdf_javacode:
261 aliases: ['pdf-javacode']
262 type: str
263 description: Enable/disable stripping of JavaScript code in PDF documents.
264 choices: ['disable', 'enable']
265 analytics_suspicious:
266 aliases: ['analytics-suspicious']
267 type: str
268 description: Enable/disable using CDR as a secondary method for determining suspicous files for analytics.
269 choices: ['disable', 'enable']
270 ftp:
271 type: dict
272 description: Ftp.
273 suboptions:
274 archive_block:
275 aliases: ['archive-block']
276 type: list
277 elements: str
278 description: Select the archive types to block.
279 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
280 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
281 archive_log:
282 aliases: ['archive-log']
283 type: list
284 elements: str
285 description: Select the archive types to log.
286 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
287 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
288 emulator:
289 type: str
290 description: Enable/disable the virus emulator.
291 choices: ['disable', 'enable']
292 options:
293 type: list
294 elements: str
295 description: Enable/disable FTP AntiVirus scanning, monitoring, and quarantine.
296 choices: ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor']
297 outbreak_prevention:
298 aliases: ['outbreak-prevention']
299 type: str
300 description: Enable Virus Outbreak Prevention service.
301 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
302 'monitor']
303 av_scan:
304 aliases: ['av-scan']
305 type: str
306 description: Enable AntiVirus scan service.
307 choices: ['disable', 'monitor', 'block']
308 external_blocklist:
309 aliases: ['external-blocklist']
310 type: str
311 description: Enable external-blocklist.
312 choices: ['disable', 'monitor', 'block']
313 quarantine:
314 type: str
315 description: Enable/disable quarantine for infected files.
316 choices: ['disable', 'enable']
317 fortindr:
318 type: str
319 description: Enable scanning of files by FortiNDR.
320 choices: ['disable', 'block', 'monitor']
321 fortisandbox:
322 type: str
323 description: Enable scanning of files by FortiSandbox.
324 choices: ['disable', 'block', 'monitor']
325 fortiai:
326 type: str
327 description: Enable/disable scanning of files by FortiAI.
328 choices: ['disable', 'monitor', 'block']
329 malware_stream:
330 aliases: ['malware-stream']
331 type: str
332 description: Enable 0-day malware-stream scanning.
333 choices: ['disable', 'monitor', 'block']
334 http:
335 type: dict
336 description: Http.
337 suboptions:
338 archive_block:
339 aliases: ['archive-block']
340 type: list
341 elements: str
342 description: Select the archive types to block.
343 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
344 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
345 archive_log:
346 aliases: ['archive-log']
347 type: list
348 elements: str
349 description: Select the archive types to log.
350 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
351 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
352 content_disarm:
353 aliases: ['content-disarm']
354 type: str
355 description: Enable Content Disarm and Reconstruction for this protocol.
356 choices: ['disable', 'enable']
357 emulator:
358 type: str
359 description: Enable/disable the virus emulator.
360 choices: ['disable', 'enable']
361 options:
362 type: list
363 elements: str
364 description: Enable/disable HTTP AntiVirus scanning, monitoring, and quarantine.
365 choices: ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor',
366 'strict-file']
367 outbreak_prevention:
368 aliases: ['outbreak-prevention']
369 type: str
370 description: Enable Virus Outbreak Prevention service.
371 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
372 'monitor']
373 av_optimize:
374 aliases: ['av-optimize']
375 type: str
376 description: Av optimize.
377 choices: ['disable', 'enable']
378 av_scan:
379 aliases: ['av-scan']
380 type: str
381 description: Enable AntiVirus scan service.
382 choices: ['disable', 'monitor', 'block']
383 external_blocklist:
384 aliases: ['external-blocklist']
385 type: str
386 description: Enable external-blocklist.
387 choices: ['disable', 'monitor', 'block']
388 quarantine:
389 type: str
390 description: Enable/disable quarantine for infected files.
391 choices: ['disable', 'enable']
392 fortindr:
393 type: str
394 description: Enable scanning of files by FortiNDR.
395 choices: ['disable', 'block', 'monitor']
396 fortisandbox:
397 type: str
398 description: Enable scanning of files by FortiSandbox.
399 choices: ['disable', 'block', 'monitor']
400 fortiai:
401 type: str
402 description: Enable/disable scanning of files by FortiAI.
403 choices: ['disable', 'monitor', 'block']
404 unknown_content_encoding:
405 aliases: ['unknown-content-encoding']
406 type: str
407 description: Configure the action the FortiGate unit will take on unknown content-encoding.
408 choices: ['block', 'inspect', 'bypass']
409 malware_stream:
410 aliases: ['malware-stream']
411 type: str
412 description: Enable 0-day malware-stream scanning.
413 choices: ['disable', 'monitor', 'block']
414 imap:
415 type: dict
416 description: Imap.
417 suboptions:
418 archive_block:
419 aliases: ['archive-block']
420 type: list
421 elements: str
422 description: Select the archive types to block.
423 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
424 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
425 archive_log:
426 aliases: ['archive-log']
427 type: list
428 elements: str
429 description: Select the archive types to log.
430 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
431 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
432 content_disarm:
433 aliases: ['content-disarm']
434 type: str
435 description: Enable Content Disarm and Reconstruction for this protocol.
436 choices: ['disable', 'enable']
437 emulator:
438 type: str
439 description: Enable/disable the virus emulator.
440 choices: ['disable', 'enable']
441 executables:
442 type: str
443 description: Treat Windows executable files as viruses for the purpose of blocking or monitoring.
444 choices: ['default', 'virus']
445 options:
446 type: list
447 elements: str
448 description: Enable/disable IMAP AntiVirus scanning, monitoring, and quarantine.
449 choices: ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor']
450 outbreak_prevention:
451 aliases: ['outbreak-prevention']
452 type: str
453 description: Enable Virus Outbreak Prevention service.
454 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
455 'monitor']
456 av_scan:
457 aliases: ['av-scan']
458 type: str
459 description: Enable AntiVirus scan service.
460 choices: ['disable', 'monitor', 'block']
461 external_blocklist:
462 aliases: ['external-blocklist']
463 type: str
464 description: Enable external-blocklist.
465 choices: ['disable', 'monitor', 'block']
466 quarantine:
467 type: str
468 description: Enable/disable quarantine for infected files.
469 choices: ['disable', 'enable']
470 fortindr:
471 type: str
472 description: Enable scanning of files by FortiNDR.
473 choices: ['disable', 'block', 'monitor']
474 fortisandbox:
475 type: str
476 description: Enable scanning of files by FortiSandbox.
477 choices: ['disable', 'block', 'monitor']
478 fortiai:
479 type: str
480 description: Enable/disable scanning of files by FortiAI.
481 choices: ['disable', 'monitor', 'block']
482 malware_stream:
483 aliases: ['malware-stream']
484 type: str
485 description: Enable 0-day malware-stream scanning.
486 choices: ['disable', 'monitor', 'block']
487 mapi:
488 type: dict
489 description: Mapi.
490 suboptions:
491 archive_block:
492 aliases: ['archive-block']
493 type: list
494 elements: str
495 description: Select the archive types to block.
496 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
497 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
498 archive_log:
499 aliases: ['archive-log']
500 type: list
501 elements: str
502 description: Select the archive types to log.
503 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
504 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
505 emulator:
506 type: str
507 description: Enable/disable the virus emulator.
508 choices: ['disable', 'enable']
509 executables:
510 type: str
511 description: Treat Windows executable files as viruses for the purpose of blocking or monitoring.
512 choices: ['default', 'virus']
513 options:
514 type: list
515 elements: str
516 description: Enable/disable MAPI AntiVirus scanning, monitoring, and quarantine.
517 choices: ['scan', 'quarantine', 'avquery', 'avmonitor']
518 outbreak_prevention:
519 aliases: ['outbreak-prevention']
520 type: str
521 description: Enable Virus Outbreak Prevention service.
522 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
523 'monitor']
524 av_scan:
525 aliases: ['av-scan']
526 type: str
527 description: Enable AntiVirus scan service.
528 choices: ['disable', 'monitor', 'block']
529 external_blocklist:
530 aliases: ['external-blocklist']
531 type: str
532 description: Enable external-blocklist.
533 choices: ['disable', 'monitor', 'block']
534 quarantine:
535 type: str
536 description: Enable/disable quarantine for infected files.
537 choices: ['disable', 'enable']
538 fortindr:
539 type: str
540 description: Enable scanning of files by FortiNDR.
541 choices: ['disable', 'block', 'monitor']
542 fortisandbox:
543 type: str
544 description: Enable scanning of files by FortiSandbox.
545 choices: ['disable', 'block', 'monitor']
546 fortiai:
547 type: str
548 description: Enable/disable scanning of files by FortiAI.
549 choices: ['disable', 'monitor', 'block']
550 malware_stream:
551 aliases: ['malware-stream']
552 type: str
553 description: Enable 0-day malware-stream scanning.
554 choices: ['disable', 'monitor', 'block']
555 nac_quar:
556 aliases: ['nac-quar']
557 type: dict
558 description: Nac quar.
559 suboptions:
560 expiry:
561 type: str
562 description: Duration of quarantine.
563 infected:
564 type: str
565 description: Enable/Disable quarantining infected hosts to the banned user list.
566 choices: ['none', 'quar-src-ip', 'quar-interface']
567 log:
568 type: str
569 description: Enable/disable AntiVirus quarantine logging.
570 choices: ['disable', 'enable']
571 nntp:
572 type: dict
573 description: Nntp.
574 suboptions:
575 archive_block:
576 aliases: ['archive-block']
577 type: list
578 elements: str
579 description: Select the archive types to block.
580 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
581 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
582 archive_log:
583 aliases: ['archive-log']
584 type: list
585 elements: str
586 description: Select the archive types to log.
587 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
588 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
589 emulator:
590 type: str
591 description: Enable/disable the virus emulator.
592 choices: ['disable', 'enable']
593 options:
594 type: list
595 elements: str
596 description: Enable/disable NNTP AntiVirus scanning, monitoring, and quarantine.
597 choices: ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor']
598 outbreak_prevention:
599 aliases: ['outbreak-prevention']
600 type: str
601 description: Enable Virus Outbreak Prevention service.
602 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
603 'monitor']
604 av_scan:
605 aliases: ['av-scan']
606 type: str
607 description: Enable AntiVirus scan service.
608 choices: ['disable', 'monitor', 'block']
609 external_blocklist:
610 aliases: ['external-blocklist']
611 type: str
612 description: Enable external-blocklist.
613 choices: ['disable', 'monitor', 'block']
614 quarantine:
615 type: str
616 description: Enable/disable quarantine for infected files.
617 choices: ['disable', 'enable']
618 fortindr:
619 type: str
620 description: Enable scanning of files by FortiNDR.
621 choices: ['disable', 'block', 'monitor']
622 fortisandbox:
623 type: str
624 description: Enable scanning of files by FortiSandbox.
625 choices: ['disable', 'block', 'monitor']
626 fortiai:
627 type: str
628 description: Enable/disable scanning of files by FortiAI.
629 choices: ['disable', 'monitor', 'block']
630 malware_stream:
631 aliases: ['malware-stream']
632 type: str
633 description: Enable 0-day malware-stream scanning.
634 choices: ['disable', 'monitor', 'block']
635 outbreak_prevention:
636 aliases: ['outbreak-prevention']
637 type: dict
638 description: Outbreak prevention.
639 suboptions:
640 external_blocklist:
641 aliases: ['external-blocklist']
642 type: str
643 description: Enable/disable external malware blocklist.
644 choices: ['disable', 'enable']
645 ftgd_service:
646 aliases: ['ftgd-service']
647 type: str
648 description: Enable/disable FortiGuard Virus outbreak prevention service.
649 choices: ['disable', 'enable']
650 pop3:
651 type: dict
652 description: Pop3.
653 suboptions:
654 archive_block:
655 aliases: ['archive-block']
656 type: list
657 elements: str
658 description: Select the archive types to block.
659 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
660 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
661 archive_log:
662 aliases: ['archive-log']
663 type: list
664 elements: str
665 description: Select the archive types to log.
666 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
667 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
668 content_disarm:
669 aliases: ['content-disarm']
670 type: str
671 description: Enable Content Disarm and Reconstruction for this protocol.
672 choices: ['disable', 'enable']
673 emulator:
674 type: str
675 description: Enable/disable the virus emulator.
676 choices: ['disable', 'enable']
677 executables:
678 type: str
679 description: Treat Windows executable files as viruses for the purpose of blocking or monitoring.
680 choices: ['default', 'virus']
681 options:
682 type: list
683 elements: str
684 description: Enable/disable POP3 AntiVirus scanning, monitoring, and quarantine.
685 choices: ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor']
686 outbreak_prevention:
687 aliases: ['outbreak-prevention']
688 type: str
689 description: Enable Virus Outbreak Prevention service.
690 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
691 'monitor']
692 av_scan:
693 aliases: ['av-scan']
694 type: str
695 description: Enable AntiVirus scan service.
696 choices: ['disable', 'monitor', 'block']
697 external_blocklist:
698 aliases: ['external-blocklist']
699 type: str
700 description: Enable external-blocklist.
701 choices: ['disable', 'monitor', 'block']
702 quarantine:
703 type: str
704 description: Enable/disable quarantine for infected files.
705 choices: ['disable', 'enable']
706 fortindr:
707 type: str
708 description: Enable scanning of files by FortiNDR.
709 choices: ['disable', 'block', 'monitor']
710 fortisandbox:
711 type: str
712 description: Enable scanning of files by FortiSandbox.
713 choices: ['disable', 'block', 'monitor']
714 fortiai:
715 type: str
716 description: Enable/disable scanning of files by FortiAI.
717 choices: ['disable', 'monitor', 'block']
718 malware_stream:
719 aliases: ['malware-stream']
720 type: str
721 description: Enable 0-day malware-stream scanning.
722 choices: ['disable', 'monitor', 'block']
723 smtp:
724 type: dict
725 description: Smtp.
726 suboptions:
727 archive_block:
728 aliases: ['archive-block']
729 type: list
730 elements: str
731 description: Select the archive types to block.
732 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
733 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
734 archive_log:
735 aliases: ['archive-log']
736 type: list
737 elements: str
738 description: Select the archive types to log.
739 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
740 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
741 content_disarm:
742 aliases: ['content-disarm']
743 type: str
744 description: Enable Content Disarm and Reconstruction for this protocol.
745 choices: ['disable', 'enable']
746 emulator:
747 type: str
748 description: Enable/disable the virus emulator.
749 choices: ['disable', 'enable']
750 executables:
751 type: str
752 description: Treat Windows executable files as viruses for the purpose of blocking or monitoring.
753 choices: ['default', 'virus']
754 options:
755 type: list
756 elements: str
757 description: Enable/disable SMTP AntiVirus scanning, monitoring, and quarantine.
758 choices: ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor']
759 outbreak_prevention:
760 aliases: ['outbreak-prevention']
761 type: str
762 description: Enable Virus Outbreak Prevention service.
763 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
764 'monitor']
765 av_scan:
766 aliases: ['av-scan']
767 type: str
768 description: Enable AntiVirus scan service.
769 choices: ['disable', 'monitor', 'block']
770 external_blocklist:
771 aliases: ['external-blocklist']
772 type: str
773 description: Enable external-blocklist.
774 choices: ['disable', 'monitor', 'block']
775 quarantine:
776 type: str
777 description: Enable/disable quarantine for infected files.
778 choices: ['disable', 'enable']
779 fortindr:
780 type: str
781 description: Enable scanning of files by FortiNDR.
782 choices: ['disable', 'block', 'monitor']
783 fortisandbox:
784 type: str
785 description: Enable scanning of files by FortiSandbox.
786 choices: ['disable', 'block', 'monitor']
787 fortiai:
788 type: str
789 description: Enable/disable scanning of files by FortiAI.
790 choices: ['disable', 'monitor', 'block']
791 malware_stream:
792 aliases: ['malware-stream']
793 type: str
794 description: Enable 0-day malware-stream scanning.
795 choices: ['disable', 'monitor', 'block']
796 ssh:
797 type: dict
798 description: Ssh.
799 suboptions:
800 archive_block:
801 aliases: ['archive-block']
802 type: list
803 elements: str
804 description: Select the archive types to block.
805 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
806 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
807 archive_log:
808 aliases: ['archive-log']
809 type: list
810 elements: str
811 description: Select the archive types to log.
812 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
813 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
814 emulator:
815 type: str
816 description: Enable/disable the virus emulator.
817 choices: ['disable', 'enable']
818 options:
819 type: list
820 elements: str
821 description: Enable/disable SFTP and SCP AntiVirus scanning, monitoring, and quarantine.
822 choices: ['avmonitor', 'quarantine', 'scan']
823 outbreak_prevention:
824 aliases: ['outbreak-prevention']
825 type: str
826 description: Enable Virus Outbreak Prevention service.
827 choices: ['disabled', 'files', 'full-archive', 'disable', 'block',
828 'monitor']
829 av_scan:
830 aliases: ['av-scan']
831 type: str
832 description: Enable AntiVirus scan service.
833 choices: ['disable', 'monitor', 'block']
834 external_blocklist:
835 aliases: ['external-blocklist']
836 type: str
837 description: Enable external-blocklist.
838 choices: ['disable', 'monitor', 'block']
839 quarantine:
840 type: str
841 description: Enable/disable quarantine for infected files.
842 choices: ['disable', 'enable']
843 fortindr:
844 type: str
845 description: Enable scanning of files by FortiNDR.
846 choices: ['disable', 'block', 'monitor']
847 fortisandbox:
848 type: str
849 description: Enable scanning of files by FortiSandbox.
850 choices: ['disable', 'block', 'monitor']
851 fortiai:
852 type: str
853 description: Enable/disable scanning of files by FortiAI.
854 choices: ['disable', 'monitor', 'block']
855 malware_stream:
856 aliases: ['malware-stream']
857 type: str
858 description: Enable 0-day malware-stream scanning.
859 choices: ['disable', 'monitor', 'block']
860 smb:
861 type: dict
862 description: Smb.
863 suboptions:
864 archive_block:
865 aliases: ['archive-block']
866 type: list
867 elements: str
868 description: Select the archive types to block.
869 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
870 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
871 archive_log:
872 aliases: ['archive-log']
873 type: list
874 elements: str
875 description: Select the archive types to log.
876 choices: ['encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb',
877 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout']
878 emulator:
879 type: str
880 description: Enable/disable the virus emulator.
881 choices: ['disable', 'enable']
882 options:
883 type: list
884 elements: str
885 description: Enable/disable SMB AntiVirus scanning, monitoring, and quarantine.
886 choices: ['scan', 'quarantine', 'avquery', 'avmonitor']
887 outbreak_prevention:
888 aliases: ['outbreak-prevention']
889 type: str
890 description: Enable FortiGuard Virus Outbreak Prevention service.
891 choices: ['disabled', 'files', 'full-archive']
892 analytics_accept_filetype:
893 aliases: ['analytics-accept-filetype']
894 type: str
895 description: Only submit files matching this DLP file-pattern to FortiSandbox.
896 analytics_ignore_filetype:
897 aliases: ['analytics-ignore-filetype']
898 type: str
899 description: Do not submit files matching this DLP file-pattern to FortiSandbox.
900 ems_threat_feed:
901 aliases: ['ems-threat-feed']
902 type: str
903 description: Enable/disable use of EMS threat feed when performing AntiVirus scan.
904 choices: ['disable', 'enable']
905 external_blocklist:
906 aliases: ['external-blocklist']
907 type: raw
908 description: (list or str) One or more external malware block lists.
909 external_blocklist_archive_scan:
910 aliases: ['external-blocklist-archive-scan']
911 type: str
912 description: Enable/disable external-blocklist archive scanning.
913 choices: ['disable', 'enable']
914 external_blocklist_enable_all:
915 aliases: ['external-blocklist-enable-all']
916 type: str
917 description: Enable/disable all external blocklists.
918 choices: ['disable', 'enable']
919 outbreak_prevention_archive_scan:
920 aliases: ['outbreak-prevention-archive-scan']
921 type: str
922 description: Enable/disable outbreak-prevention archive scanning.
923 choices: ['disable', 'enable']
924 fortindr_error_action:
925 aliases: ['fortindr-error-action']
926 type: str
927 description: Action to take if FortiNDR encounters an error.
928 choices: ['log-only', 'block', 'ignore']
929 fortindr_timeout_action:
930 aliases: ['fortindr-timeout-action']
931 type: str
932 description: Action to take if FortiNDR encounters a scan timeout.
933 choices: ['log-only', 'block', 'ignore']
934 fortisandbox_error_action:
935 aliases: ['fortisandbox-error-action']
936 type: str
937 description: Action to take if FortiSandbox inline scan encounters an error.
938 choices: ['log-only', 'block', 'ignore']
939 fortisandbox_max_upload:
940 aliases: ['fortisandbox-max-upload']
941 type: int
942 description: Maximum size of files that can be uploaded to FortiSandbox.
943 fortisandbox_mode:
944 aliases: ['fortisandbox-mode']
945 type: str
946 description: FortiSandbox scan modes.
947 choices: ['inline', 'analytics-suspicious', 'analytics-everything']
948 fortisandbox_timeout_action:
949 aliases: ['fortisandbox-timeout-action']
950 type: str
951 description: Action to take if FortiSandbox inline scan encounters a scan timeout.
952 choices: ['log-only', 'block', 'ignore']
953 fortiai_error_action:
954 aliases: ['fortiai-error-action']
955 type: str
956 description: Action to take if FortiAI encounters an error.
957 choices: ['block', 'log-only', 'ignore']
958 fortiai_timeout_action:
959 aliases: ['fortiai-timeout-action']
960 type: str
961 description: Action to take if FortiAI encounters a scan timeout.
962 choices: ['block', 'log-only', 'ignore']
963 fortisandbox_scan_timeout:
964 aliases: ['fortisandbox-scan-timeout']
965 type: int
966 description: FortiSandbox inline scan timeout in seconds
967 '''
968
969 EXAMPLES = '''
970 - name: Example playbook
971 hosts: fortimanagers
972 gather_facts: false
973 connection: httpapi
974 vars:
975 ansible_httpapi_use_ssl: true
976 ansible_httpapi_validate_certs: false
977 ansible_httpapi_port: 443
978 tasks:
979 - name: Configure AntiVirus profiles.
980 fortinet.fortimanager.fmgr_antivirus_profile:
981 adom: ansible
982 state: present
983 antivirus_profile:
984 analytics_db: disable
985 analytics_max_upload: 20
986 av_block_log: disable
987 av_virus_log: disable
988 comment: "test comment"
989 extended_log: disable
990 ftgd_analytics: disable
991 inspection_mode: proxy
992 mobile_malware_db: disable
993 name: "antivirus-profile"
994 scan_mode: quick
995
996 - name: Gathering fortimanager facts
997 hosts: fortimanagers
998 gather_facts: false
999 connection: httpapi
1000 vars:
1001 ansible_httpapi_use_ssl: true
1002 ansible_httpapi_validate_certs: false
1003 ansible_httpapi_port: 443
1004 tasks:
1005 - name: Retrieve all the antivirus profiles
1006 fortinet.fortimanager.fmgr_fact:
1007 facts:
1008 selector: "antivirus_profile"
1009 params:
1010 adom: "ansible"
1011 profile: "your_value"
1012 '''
1013
1014 RETURN = '''
1015 meta:
1016 description: The result of the request.
1017 type: dict
1018 returned: always
1019 contains:
1020 request_url:
1021 description: The full url requested.
1022 returned: always
1023 type: str
1024 sample: /sys/login/user
1025 response_code:
1026 description: The status of api request.
1027 returned: always
1028 type: int
1029 sample: 0
1030 response_data:
1031 description: The api response.
1032 type: list
1033 returned: always
1034 response_message:
1035 description: The descriptive message of the api response.
1036 type: str
1037 returned: always
1038 sample: OK.
1039 system_information:
1040 description: The information of the target system.
1041 type: dict
1042 returned: always
1043 rc:
1044 description: The status the request.
1045 type: int
1046 returned: always
1047 sample: 0
1048 version_check_warning:
1049 description: Warning if the parameters used in the playbook are not supported by the current FortiManager version.
1050 type: list
1051 returned: complex
1052 '''
1053 from ansible.module_utils.basic import AnsibleModule
1054 from ansible.module_utils.connection import Connection
1055 from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass
1056 from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec
1057
1058
1059 def main():
1060 urls_list = [
1061 '/pm/config/adom/{adom}/obj/antivirus/profile',
1062 '/pm/config/global/obj/antivirus/profile'
1063 ]
1064 module_arg_spec = {
1065 'adom': {'required': True, 'type': 'str'},
1066 'revision_note': {'type': 'str'},
1067 'antivirus_profile': {
1068 'type': 'dict', 'v_range': [['6.0.0', '']],
1069 'options': {
1070 'analytics-bl-filetype': {'type': 'str'},
1071 'analytics-db': {'choices': ['disable', 'enable'], 'type': 'str'},
1072 'analytics-max-upload': {'type': 'int'},
1073 'analytics-wl-filetype': {'type': 'str'},
1074 'av-block-log': {'choices': ['disable', 'enable'], 'type': 'str'},
1075 'av-virus-log': {'choices': ['disable', 'enable'], 'type': 'str'},
1076 'comment': {'type': 'str'},
1077 'extended-log': {'choices': ['disable', 'enable'], 'type': 'str'},
1078 'ftgd-analytics': {'choices': ['disable', 'suspicious', 'everything'], 'type': 'str'},
1079 'inspection-mode': {'v_range': [['6.0.0', '7.2.1']], 'choices': ['proxy', 'flow-based'], 'type': 'str'},
1080 'mobile-malware-db': {'choices': ['disable', 'enable'], 'type': 'str'},
1081 'name': {'required': True, 'type': 'str'},
1082 'replacemsg-group': {'type': 'str'},
1083 'scan-mode': {'choices': ['quick', 'full', 'legacy', 'default'], 'type': 'str'},
1084 'feature-set': {'v_range': [['6.4.0', '']], 'choices': ['proxy', 'flow'], 'type': 'str'},
1085 'cifs': {
1086 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1087 'type': 'dict',
1088 'options': {
1089 'archive-block': {
1090 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1091 'type': 'list',
1092 'choices': [
1093 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1094 ],
1095 'elements': 'str'
1096 },
1097 'archive-log': {
1098 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1099 'type': 'list',
1100 'choices': [
1101 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1102 ],
1103 'elements': 'str'
1104 },
1105 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1106 'options': {
1107 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1108 'type': 'list',
1109 'choices': ['scan', 'quarantine', 'avmonitor'],
1110 'elements': 'str'
1111 },
1112 'outbreak-prevention': {
1113 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1114 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1115 'type': 'str'
1116 },
1117 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1118 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1119 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1120 'fortindr': {'v_range': [['7.0.5', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1121 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1122 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1123 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1124 }
1125 },
1126 'content-disarm': {
1127 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1128 'type': 'dict',
1129 'options': {
1130 'cover-page': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1131 'detect-only': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1132 'error-action': {'v_range': [['6.4.5', '']], 'choices': ['block', 'log-only', 'ignore'], 'type': 'str'},
1133 'office-action': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1134 'office-dde': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1135 'office-embed': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1136 'office-hylink': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1137 'office-linked': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1138 'office-macro': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1139 'original-file-destination': {
1140 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1141 'choices': ['fortisandbox', 'quarantine', 'discard'],
1142 'type': 'str'
1143 },
1144 'pdf-act-form': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1145 'pdf-act-gotor': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1146 'pdf-act-java': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1147 'pdf-act-launch': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1148 'pdf-act-movie': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1149 'pdf-act-sound': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1150 'pdf-embedfile': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1151 'pdf-hyperlink': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1152 'pdf-javacode': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1153 'analytics-suspicious': {'v_range': [['7.4.7', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
1154 }
1155 },
1156 'ftp': {
1157 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1158 'type': 'dict',
1159 'options': {
1160 'archive-block': {
1161 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1162 'type': 'list',
1163 'choices': [
1164 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1165 ],
1166 'elements': 'str'
1167 },
1168 'archive-log': {
1169 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1170 'type': 'list',
1171 'choices': [
1172 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1173 ],
1174 'elements': 'str'
1175 },
1176 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1177 'options': {
1178 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1179 'type': 'list',
1180 'choices': ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor'],
1181 'elements': 'str'
1182 },
1183 'outbreak-prevention': {
1184 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1185 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1186 'type': 'str'
1187 },
1188 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1189 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1190 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1191 'fortindr': {'v_range': [['7.0.5', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1192 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1193 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1194 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1195 }
1196 },
1197 'http': {
1198 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1199 'type': 'dict',
1200 'options': {
1201 'archive-block': {
1202 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1203 'type': 'list',
1204 'choices': [
1205 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1206 ],
1207 'elements': 'str'
1208 },
1209 'archive-log': {
1210 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1211 'type': 'list',
1212 'choices': [
1213 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1214 ],
1215 'elements': 'str'
1216 },
1217 'content-disarm': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1218 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1219 'options': {
1220 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1221 'type': 'list',
1222 'choices': ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor', 'strict-file'],
1223 'elements': 'str'
1224 },
1225 'outbreak-prevention': {
1226 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1227 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1228 'type': 'str'
1229 },
1230 'av-optimize': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '7.6.2']], 'choices': ['disable', 'enable'], 'type': 'str'},
1231 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1232 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1233 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1234 'fortindr': {'v_range': [['7.0.5', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1235 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1236 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1237 'unknown-content-encoding': {
1238 'v_range': [['7.0.5', '7.0.16'], ['7.2.1', '']],
1239 'choices': ['block', 'inspect', 'bypass'],
1240 'type': 'str'
1241 },
1242 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1243 }
1244 },
1245 'imap': {
1246 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1247 'type': 'dict',
1248 'options': {
1249 'archive-block': {
1250 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1251 'type': 'list',
1252 'choices': [
1253 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1254 ],
1255 'elements': 'str'
1256 },
1257 'archive-log': {
1258 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1259 'type': 'list',
1260 'choices': [
1261 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1262 ],
1263 'elements': 'str'
1264 },
1265 'content-disarm': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1266 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1267 'executables': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['default', 'virus'], 'type': 'str'},
1268 'options': {
1269 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1270 'type': 'list',
1271 'choices': ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor'],
1272 'elements': 'str'
1273 },
1274 'outbreak-prevention': {
1275 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1276 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1277 'type': 'str'
1278 },
1279 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1280 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1281 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1282 'fortindr': {'v_range': [['7.0.5', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1283 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1284 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1285 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1286 }
1287 },
1288 'mapi': {
1289 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1290 'type': 'dict',
1291 'options': {
1292 'archive-block': {
1293 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1294 'type': 'list',
1295 'choices': [
1296 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1297 ],
1298 'elements': 'str'
1299 },
1300 'archive-log': {
1301 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1302 'type': 'list',
1303 'choices': [
1304 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1305 ],
1306 'elements': 'str'
1307 },
1308 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1309 'executables': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['default', 'virus'], 'type': 'str'},
1310 'options': {
1311 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1312 'type': 'list',
1313 'choices': ['scan', 'quarantine', 'avquery', 'avmonitor'],
1314 'elements': 'str'
1315 },
1316 'outbreak-prevention': {
1317 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1318 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1319 'type': 'str'
1320 },
1321 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1322 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1323 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1324 'fortindr': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1325 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1326 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1327 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1328 }
1329 },
1330 'nac-quar': {
1331 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1332 'type': 'dict',
1333 'options': {
1334 'expiry': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'type': 'str'},
1335 'infected': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['none', 'quar-src-ip', 'quar-interface'], 'type': 'str'},
1336 'log': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
1337 }
1338 },
1339 'nntp': {
1340 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1341 'type': 'dict',
1342 'options': {
1343 'archive-block': {
1344 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1345 'type': 'list',
1346 'choices': [
1347 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1348 ],
1349 'elements': 'str'
1350 },
1351 'archive-log': {
1352 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1353 'type': 'list',
1354 'choices': [
1355 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1356 ],
1357 'elements': 'str'
1358 },
1359 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1360 'options': {
1361 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1362 'type': 'list',
1363 'choices': ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor'],
1364 'elements': 'str'
1365 },
1366 'outbreak-prevention': {
1367 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1368 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1369 'type': 'str'
1370 },
1371 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1372 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1373 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1374 'fortindr': {'v_range': [['7.0.5', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1375 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1376 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1377 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1378 }
1379 },
1380 'outbreak-prevention': {
1381 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1382 'type': 'dict',
1383 'options': {
1384 'external-blocklist': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1385 'ftgd-service': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
1386 }
1387 },
1388 'pop3': {
1389 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1390 'type': 'dict',
1391 'options': {
1392 'archive-block': {
1393 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1394 'type': 'list',
1395 'choices': [
1396 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1397 ],
1398 'elements': 'str'
1399 },
1400 'archive-log': {
1401 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1402 'type': 'list',
1403 'choices': [
1404 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1405 ],
1406 'elements': 'str'
1407 },
1408 'content-disarm': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1409 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1410 'executables': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['default', 'virus'], 'type': 'str'},
1411 'options': {
1412 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1413 'type': 'list',
1414 'choices': ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor'],
1415 'elements': 'str'
1416 },
1417 'outbreak-prevention': {
1418 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1419 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1420 'type': 'str'
1421 },
1422 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1423 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1424 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1425 'fortindr': {'v_range': [['7.0.5', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1426 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1427 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1428 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1429 }
1430 },
1431 'smtp': {
1432 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1433 'type': 'dict',
1434 'options': {
1435 'archive-block': {
1436 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1437 'type': 'list',
1438 'choices': [
1439 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1440 ],
1441 'elements': 'str'
1442 },
1443 'archive-log': {
1444 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1445 'type': 'list',
1446 'choices': [
1447 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1448 ],
1449 'elements': 'str'
1450 },
1451 'content-disarm': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1452 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1453 'executables': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['default', 'virus'], 'type': 'str'},
1454 'options': {
1455 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1456 'type': 'list',
1457 'choices': ['scan', 'file-filter', 'quarantine', 'avquery', 'avmonitor'],
1458 'elements': 'str'
1459 },
1460 'outbreak-prevention': {
1461 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1462 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1463 'type': 'str'
1464 },
1465 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1466 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1467 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1468 'fortindr': {'v_range': [['7.0.5', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1469 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1470 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1471 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1472 }
1473 },
1474 'ssh': {
1475 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1476 'type': 'dict',
1477 'options': {
1478 'archive-block': {
1479 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1480 'type': 'list',
1481 'choices': [
1482 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1483 ],
1484 'elements': 'str'
1485 },
1486 'archive-log': {
1487 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1488 'type': 'list',
1489 'choices': [
1490 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1491 ],
1492 'elements': 'str'
1493 },
1494 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1495 'options': {
1496 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1497 'type': 'list',
1498 'choices': ['avmonitor', 'quarantine', 'scan'],
1499 'elements': 'str'
1500 },
1501 'outbreak-prevention': {
1502 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '']],
1503 'choices': ['disabled', 'files', 'full-archive', 'disable', 'block', 'monitor'],
1504 'type': 'str'
1505 },
1506 'av-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1507 'external-blocklist': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1508 'quarantine': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1509 'fortindr': {'v_range': [['7.0.5', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1510 'fortisandbox': {'v_range': [['7.2.0', '']], 'choices': ['disable', 'block', 'monitor'], 'type': 'str'},
1511 'fortiai': {'v_range': [['7.0.1', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'},
1512 'malware-stream': {'v_range': [['7.6.3', '']], 'choices': ['disable', 'monitor', 'block'], 'type': 'str'}
1513 }
1514 },
1515 'smb': {
1516 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '7.2.1']],
1517 'type': 'dict',
1518 'options': {
1519 'archive-block': {
1520 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '7.2.1']],
1521 'type': 'list',
1522 'choices': [
1523 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1524 ],
1525 'elements': 'str'
1526 },
1527 'archive-log': {
1528 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '7.2.1']],
1529 'type': 'list',
1530 'choices': [
1531 'encrypted', 'corrupted', 'multipart', 'nested', 'mailbomb', 'unhandled', 'partiallycorrupted', 'fileslimit', 'timeout'
1532 ],
1533 'elements': 'str'
1534 },
1535 'emulator': {'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '7.2.1']], 'choices': ['disable', 'enable'], 'type': 'str'},
1536 'options': {
1537 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '7.2.1']],
1538 'type': 'list',
1539 'choices': ['scan', 'quarantine', 'avquery', 'avmonitor'],
1540 'elements': 'str'
1541 },
1542 'outbreak-prevention': {
1543 'v_range': [['6.2.8', '6.2.13'], ['6.4.5', '7.2.1']],
1544 'choices': ['disabled', 'files', 'full-archive'],
1545 'type': 'str'
1546 }
1547 }
1548 },
1549 'analytics-accept-filetype': {'v_range': [['7.0.0', '']], 'type': 'str'},
1550 'analytics-ignore-filetype': {'v_range': [['7.0.0', '']], 'type': 'str'},
1551 'ems-threat-feed': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1552 'external-blocklist': {'v_range': [['7.0.0', '']], 'type': 'raw'},
1553 'external-blocklist-archive-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1554 'external-blocklist-enable-all': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1555 'outbreak-prevention-archive-scan': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
1556 'fortindr-error-action': {'v_range': [['7.0.5', '']], 'choices': ['log-only', 'block', 'ignore'], 'type': 'str'},
1557 'fortindr-timeout-action': {'v_range': [['7.0.5', '']], 'choices': ['log-only', 'block', 'ignore'], 'type': 'str'},
1558 'fortisandbox-error-action': {'v_range': [['7.2.0', '']], 'choices': ['log-only', 'block', 'ignore'], 'type': 'str'},
1559 'fortisandbox-max-upload': {'v_range': [['7.2.0', '']], 'type': 'int'},
1560 'fortisandbox-mode': {'v_range': [['7.2.0', '']], 'choices': ['inline', 'analytics-suspicious', 'analytics-everything'], 'type': 'str'},
1561 'fortisandbox-timeout-action': {'v_range': [['7.2.0', '']], 'choices': ['log-only', 'block', 'ignore'], 'type': 'str'},
1562 'fortiai-error-action': {'v_range': [['7.0.1', '']], 'choices': ['block', 'log-only', 'ignore'], 'type': 'str'},
1563 'fortiai-timeout-action': {'v_range': [['7.0.2', '']], 'choices': ['block', 'log-only', 'ignore'], 'type': 'str'},
1564 'fortisandbox-scan-timeout': {'v_range': [['7.6.5', '']], 'type': 'int'}
1565 }
1566 }
1567 }
1568
1569 module_option_spec = get_module_arg_spec('full crud')
1570 module_arg_spec.update(module_option_spec)
1571 check_galaxy_version(module_arg_spec)
1572 module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'antivirus_profile'),
1573 supports_check_mode=True)
1574 if not module._socket_path:
1575 module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
1576 connection = Connection(module._socket_path)
1577 fmgr = NAPIManager('full crud', module_arg_spec, urls_list,
1578 'name', 'data', module, connection)
1579 fmgr.process_crud()
1580 module.exit_json(meta=module.params)
1581
1582
1583 if __name__ == '__main__':
1584 main()