ansible / ansible.builtin / v2.9.7 / module / fmgr_secprof_spam spam filter profile for FMG | "added in version" 2.8 of ansible.builtin" Authors: Luke Weighall (@lweighall), Andrew Welsh (@Ghilli3), Jim Huber (@p4r4n0y1ng) preview | supported by communityansible.builtin.fmgr_secprof_spam (v2.9.7) — module
pip
Install with pip install ansible==2.9.7
Manage spam filter security profiles within FortiManager via API
- name: DELETE Profile fmgr_secprof_spam: name: "Ansible_Spam_Filter_Profile" mode: "delete"
- name: Create FMGR_SPAMFILTER_PROFILE fmgr_secprof_spam: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" mode: "set" adom: "root" spam_log_fortiguard_response: "enable" spam_iptrust_table: spam_filtering: "enable" spam_bword_threshold: 10 options: ["bannedword", "spamfsip", "spamfsurl", "spamrbl", "spamfsphish", "spambwl"] name: "Ansible_Spam_Filter_Profile" flow_based: "enable" external: "enable" comment: "Created by Ansible" gmail_log: "enable" spam_log: "enable"
adom: default: root description: - The ADOM the configuration should belong to. required: false imap: description: - EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED! - List of multiple child objects to be added. Expects a list of dictionaries. - Dictionaries must use FortiManager API parameters, not the ansible ones listed below. - If submitted, all other prefixed sub-parameters ARE IGNORED. - This object is MUTUALLY EXCLUSIVE with its options. - We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide. - WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS required: false mapi: description: - EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED! - List of multiple child objects to be added. Expects a list of dictionaries. - Dictionaries must use FortiManager API parameters, not the ansible ones listed below. - If submitted, all other prefixed sub-parameters ARE IGNORED. - This object is MUTUALLY EXCLUSIVE with its options. - We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide. - WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS required: false mode: choices: - add - set - delete - update default: add description: - Sets one of three modes for managing the object. - Allows use of soft-adds instead of overwriting existing values required: false name: description: - Profile name. required: false pop3: description: - EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED! - List of multiple child objects to be added. Expects a list of dictionaries. - Dictionaries must use FortiManager API parameters, not the ansible ones listed below. - If submitted, all other prefixed sub-parameters ARE IGNORED. - This object is MUTUALLY EXCLUSIVE with its options. - We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide. - WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS required: false smtp: description: - EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED! - List of multiple child objects to be added. Expects a list of dictionaries. - Dictionaries must use FortiManager API parameters, not the ansible ones listed below. - If submitted, all other prefixed sub-parameters ARE IGNORED. - This object is MUTUALLY EXCLUSIVE with its options. - We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide. - WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS required: false gmail: description: - EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED! - List of multiple child objects to be added. Expects a list of dictionaries. - Dictionaries must use FortiManager API parameters, not the ansible ones listed below. - If submitted, all other prefixed sub-parameters ARE IGNORED. - This object is MUTUALLY EXCLUSIVE with its options. - We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide. - WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS required: false comment: description: - Comment. required: false options: choices: - bannedword - spamfsip - spamfssubmit - spamfschksum - spamfsurl - spamhelodns - spamraddrdns - spamrbl - spamhdrcheck - spamfsphish - spambwl description: - None - FLAG Based Options. Specify multiple in list form. required: false external: choices: - disable - enable description: - Enable/disable external Email inspection. required: false imap_log: choices: - disable - enable description: - Enable/disable logging. required: false mapi_log: choices: - disable - enable description: - Enable/disable logging. required: false pop3_log: choices: - disable - enable description: - Enable/disable logging. required: false smtp_log: choices: - disable - enable description: - Enable/disable logging. required: false spam_log: choices: - disable - enable description: - Enable/disable spam logging for email filtering. required: false gmail_log: choices: - disable - enable description: - Enable/disable logging. required: false flow_based: choices: - disable - enable description: - Enable/disable flow-based spam filtering. required: false smtp_hdrip: choices: - disable - enable description: - Enable/disable SMTP email header IP checks for spamfsip, spamrbl and spambwl filters. required: false yahoo_mail: description: - EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED! - List of multiple child objects to be added. Expects a list of dictionaries. - Dictionaries must use FortiManager API parameters, not the ansible ones listed below. - If submitted, all other prefixed sub-parameters ARE IGNORED. - This object is MUTUALLY EXCLUSIVE with its options. - We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide. - WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS required: false imap_action: choices: - pass - tag description: - Action for spam email. required: false mapi_action: choices: - pass - discard description: - Action for spam email. required: false msn_hotmail: description: - EXPERTS ONLY! KNOWLEDGE OF FMGR JSON API IS REQUIRED! - List of multiple child objects to be added. Expects a list of dictionaries. - Dictionaries must use FortiManager API parameters, not the ansible ones listed below. - If submitted, all other prefixed sub-parameters ARE IGNORED. - This object is MUTUALLY EXCLUSIVE with its options. - We expect that you know what you are doing with these list parameters, and are leveraging the JSON API Guide. - WHEN IN DOUBT, USE THE SUB OPTIONS BELOW INSTEAD TO CREATE OBJECTS WITH MULTIPLE TASKS required: false pop3_action: choices: - pass - tag description: - Action for spam email. required: false smtp_action: choices: - pass - tag - discard description: - Action for spam email. required: false imap_tag_msg: description: - Subject text or header added to spam email. required: false pop3_tag_msg: description: - Subject text or header added to spam email. required: false smtp_tag_msg: description: - Subject text or header added to spam email. required: false imap_tag_type: choices: - subject - header - spaminfo description: - Tag subject or header for spam email. - FLAG Based Options. Specify multiple in list form. required: false pop3_tag_type: choices: - subject - header - spaminfo description: - Tag subject or header for spam email. - FLAG Based Options. Specify multiple in list form. required: false smtp_tag_type: choices: - subject - header - spaminfo description: - Tag subject or header for spam email. - FLAG Based Options. Specify multiple in list form. required: false spam_bwl_table: description: - Anti-spam black/white list table ID. required: false spam_filtering: choices: - disable - enable description: - Enable/disable spam filtering. required: false spam_rbl_table: description: - Anti-spam DNSBL table ID. required: false yahoo_mail_log: choices: - disable - enable description: - Enable/disable logging. required: false msn_hotmail_log: choices: - disable - enable description: - Enable/disable logging. required: false replacemsg_group: description: - Replacement message group. required: false spam_bword_table: description: - Anti-spam banned word table ID. required: false spam_iptrust_table: description: - Anti-spam IP trust table ID. required: false spam_mheader_table: description: - Anti-spam MIME header table ID. required: false smtp_local_override: choices: - disable - enable description: - Enable/disable local filter to override SMTP remote check result. required: false spam_bword_threshold: description: - Spam banned word threshold. required: false spam_log_fortiguard_response: choices: - disable - enable description: - Enable/disable logging FortiGuard spam response. required: false
api_result: description: full API response, includes status code and message returned: always type: str