---
- name: Save FortiGate Configuration
hosts: your_fortigate_host
gather_facts: no
tasks:
- name: Run show full-configuration command
fortinet.fortios.fortios_command:
username: your_username
password: your_password
host: "{{ inventory_hostname }}"
https: yes
command: "show full-configuration"
register: config_output
- name: Save configuration to a file
copy:
content: "{{ config_output.stdout[0] }}"
dest: /path/to/save/configuration.txt