ansible / ansible.builtin / v2.5.15 / module / fortios_config Manage config on Fortinet FortiOS firewall devices | "added in version" 2.3 of ansible.builtin" Authors: Benjamin Jolivot (@bjolivot) preview | supported by communityansible.builtin.fortios_config (v2.5.15) — module
pip
Install with pip install ansible==2.5.15
This module provides management of FortiOS Devices configuration.
- name: Backup current config fortios_config: host: 192.168.0.254 username: admin password: password backup: yes
- name: Backup only address objects fortios_config: host: 192.168.0.254 username: admin password: password backup: yes backup_path: /tmp/forti_backup/ filter: "firewall address"
- name: Update configuration from file fortios_config: host: 192.168.0.254 username: admin password: password src: new_configuration.conf.j2
src: description: - The I(src) argument provides a path to the configuration template to load into the remote device. host: description: - Specifies the DNS hostname or IP address for connecting to the remote fortios device. Required when I(file_mode) is False. type: str vdom: description: - Specifies on which vdom to apply configuration type: str backup: default: false description: - This argument will cause the module to create a backup of the current C(running-config) from the remote device before any changes are made. The backup file is written to the i(backup) folder. type: bool filter: default: '' description: - Only for partial backup, you can restrict by giving expected configuration path (ex. firewall address). timeout: default: 60 description: - Timeout in seconds for connecting to the remote device. type: int password: description: - Specifies the password used to authenticate to the remote device. Required when I(file_mode) is True. type: str username: description: - Configures the username used to authenticate to the remote device. Required when I(file_mode) is True. type: str file_mode: default: false description: - Don't connect to any device, only use I(config_file) as input and Output. type: bool version_added: '2.4' version_added_collection: fortinet.fortios backup_path: description: - Specifies where to store backup files. Required if I(backup=yes). type: path config_file: description: - Path to configuration file. Required when I(file_mode) is True. type: path version_added: '2.4' version_added_collection: fortinet.fortios backup_filename: description: - Specifies the backup filename. If omitted filename will be formatted like HOST_config.YYYY-MM-DD@HH:MM:SS type: str
change_string: description: The commands really executed by the module returned: only if config changed type: string running_config: description: full config string returned: always type: string