Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Simo94
New Contributor

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#...

 

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"

 

 

 

 

omis94
omis94
2 REPLIES 2
Stephen_G
Moderator
Moderator

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_l...

 

Let me know if these help any.

Stephen - Fortinet Community Team
Simo94

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_modu...

 

 

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... 

omis94
omis94
Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors