Skip to main content
Simo94
New Member
Feb 27, 2025 1:50 PM UTC
Question

ansible fortimanager docs not uptodate [visibility: disable]

hi Guys,

 

 

is there any explanation of why the documentation is providing wrong instructions on ansible fortimanager

 

https://ansible-galaxy-fortimanager-docs.readthedocs.io/en/latest/docgen/fmgr_firewall_address.html#notes

 

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"

 

 

 

 

2 replies

Stephen_G
Staff & Editor
Staff & Editor
Mar 2, 2025 1:29 PM UTC

Hi Simo94,

 

While we try to get an answer for your question, it looks like these docs may be more up-to-date: https://docs.ansible.com/ansible/latest/collections/fortinet/fortimanager/fmgr_pm_config_workspace_lock_module.html#notes

 

Let me know if these help any.

Stephen_G - Fortinet Community Team
Simo94
Simo94Author
New Member
Mar 3, 2025 7:40 AM UTC

hi Stephen,

 

thank you for your response.

 

the docs that you provided are also not up to date :

https://docs.ansible.com/ansible/latest/collections/fortinet/fortimanager/fmgr_firewall_address_module.html#ansible-collections-fortinet-fortimanager-fmgr-firewall-address-module

 

 

Screenshot 2025-03-03 083535.png

 

its still shows the Visibility parameter that has been deprecated in version 6.0

 

I found a reddit post that talks about the same issue :

https://www.reddit.com/r/fortinet/comments/iy9fni/642_missing_set_visibility_disable_on_some_objects/ 

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT