Is there an Ansible module that lets you pull down the entire running configuration, versus just certain facts?
Previously there was such a module called "fortios_config_module" but it appears to be missing from the current collection.
I was able to solve this using the NTC modules, which use netmiko for SSH connections, which have a handler for FortiGates.
Instructions to install the NTC modules:
Below is sample playbook that shows how to grab the running-config from a FortiGate. Replace the values for host, username, and password. This play does not require an inventory file.
---- hosts: localhost connection: local gather_facts: no become: no tasks: - name: "Gather show-run from FortiGate" ntc_show_command: connection=ssh platform=fortinet command='show' host=firewall_device_name username=first.last password=password
We-ve used Ansible and Napalm
Playbook example is in the above link
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2023 Fortinet, Inc. All Rights Reserved.