fortios_address - Manage fortios firewall address objects
New in version 2.4.
Synopsis
- This module provide management of firewall addresses on FortiOS devices.
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
backup | no |
| This argument will cause the module to create a backup of the current running-config from the remote device before any changes are made. The backup file is written to the i(backup) folder. | |
backup_filename | no | Specifies the backup filename. If omitted filename will be formatted like HOST_config.YYYY-MM-DD@HH:MM:SS | ||
backup_path | no | Specifies where to store backup files. Required if backup=yes. | ||
comment | no | free text to describe address. | ||
config_file (added in 2.4)
| no | Path to configuration file. Required when file_mode is True. | ||
country | no | 2 letter country code (like FR). | ||
end_ip | no | Last ip in range (used only with type=iprange). | ||
file_mode (added in 2.4)
| no |
| Don't connect to any device, only use config_file as input and Output. | |
host | no | Specifies the DNS hostname or IP address for connecting to the remote fortios device. Required when file_mode is False. | ||
interface | no | any | interface name the address apply to. | |
name | yes | Name of the address to add or delete. | ||
password | no | Specifies the password used to authenticate to the remote device. Required when file_mode is True. | ||
start_ip | no | First ip in range (used only with type=iprange). | ||
state | yes |
| Specifies if address need to be added or deleted. | |
timeout | no | 60 | Timeout in seconds for connecting to the remote device. | |
type | no |
| Type of the address. | |
username | no | Configures the username used to authenticate to the remote device. Required when file_mode is True. | ||
value | no | Address value, based on type. If type=fqdn, somthing like www.google.com. If type=ipmask, you can use simple ip (192.168.0.1), ip+mask (192.168.0.1 255.255.255.0) or CIDR (192.168.0.1/32). | ||
vdom | no | Specifies on which vdom to apply configuration |
Examples
- name: Register french addresses fortios_address: host: 192.168.0.254 username: admin password: p4ssw0rd state: present name: "fromfrance" type: geography country: FR comment: "French geoip address" - name: Register some fqdn fortios_address: host: 192.168.0.254 username: admin password: p4ssw0rd state: present name: "Ansible" type: fqdn value: www.ansible.com comment: "Ansible website" - name: Register google DNS fortios_address: host: 192.168.0.254 username: admin password: p4ssw0rd state: present name: "google_dns" type: ipmask value: 8.8.8.8
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
change_string | The commands executed by the module. | only if config changed | string | |
firewall_address_config | full firewall adresses config string. | always | string |
Notes
Note
- This module requires netaddr python library.
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/fortios_address_module.html