Technical Tip: Configuring FortiGate Web Filter Profiles with Ansible (Including Unset Workaround)
| Description | This article describes how to configure Web Filter profiles on FortiGate using Ansible. It provides a step-by-step guide and a workaround for issues encountered when creating Web Filters and FortiGuard Category-Based Filters, specifically when parameters cannot be unset using the fortioswebfilterprofile module. |
| Scope | FortiGate. |
| Solution | The Ansible module fortioswebfilterprofile currently does not support unsetting parameters within the ftgd-wf (FortiGuard Web Filter) configuration section.
To workaround this limitation, fortinet.fortios.fortiosjsongeneric module can be used instead of fortioswebfilterprofile. The fortiosjsongeneric module allows full JSON-based configuration control, including the ability to unset specific fields corresponding to setting a JSON field to null.
----
To create the filter body, it is suggested to follow the official documentation from FNDN.
https://fndn.fortinet.net/index.php?/fortiapi/1-fortios/5445/1/webfilter/ |
