ansible fortimanager docs not uptodate [visibility: disable]
hi Guys,
is there any explanation of why the documentation is providing wrong instructions on ansible fortimanager
in the docs it mentions that to create a firewall address object with ansible the task, the yaml file has to look like this
tasks: - name: Configure IPv4 addresses. fortinet.fortimanager.fmgr_firewall_address: bypass_validation: false adom: ansible state: present firewall_address: allow-routing: disable associated-interface: any name: "ansible-test1" visibility: disable
now after a stupid amount of time troubleshooting with direct api calls to fortimanager and running a debug on fortimanager where direct api calls are working but the ansible yaml call doesnt and thats when I realized that the visibility: disable is the cause of the issue and as soon as I removed it from the ansible playbook, the object was created and I put back in it throws the following errors :
fatal: [forti_manager]: FAILED! => {"changed": false, "meta": {"request_url": "/pm/config/adom/root/obj/firewall/address/anbetest1", "response_code": -10, "response_data": [], "response_message": "The data is invalid for selected url", "system_information": {"Admin Domain Configuration": "Enabled", "BIOS version": "04000002", "Branch Point": "0113", "Build": "0113", "Current Time": "Thu Feb 27 14:43:01 CET 2025", "Daylight Time Saving": "Yes", "FIPS Mode": "Disabled", "HA Mode": "Stand Alone", "Hostname": "FMG-VM64-KVM", "License Status": "Valid", "Major": 7, "Max Number of Admin Domains": 3, "Max Number of Device Groups": 3, "Minor": 0, "Offline Mode": "Disabled", "Patch": 1, "Platform Full Name": "FortiManager-VM64-KVM", "Platform Type": "FMG-VM64-KVM", "Release Version Information": " (GA)", "Serial Number": "FMG-VMTM24017034", "TZ": "Europe/Amsterdam", "Time Zone": "(GMT+1:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna.", "Version": "v7.0.1-build0113 210715 (GA)", "x86-64 Applications": "Yes"}}, "rc": -10}
my playbook :
- name: create Objects hosts: fortimanager connection: httpapi gather_facts: no collections: - fortinet.fortimanager vars: ansible_httpapi_use_ssl: false ansible_httpapi_validate_certs: false ansible_httpapi_port: 80 tasks: - name: Configure IPv4 addresses. fmgr_firewall_address: bypass_validation: true adom: root state: present firewall_address: allow_routing: false associated_interface: "any" name: "anbetest1" subnet: "10.1.6.0 255.255.255.0" type: "ipmask" comment: "test"
