Skip to main content
Simo94
New Member
February 27, 2025
Question

ansible fortimanager docs not uptodate [visibility: disable]

  • February 27, 2025
  • 1 reply
  • 795 views

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"

 

 

 

 

1 reply

Stephen_G
Moderator
Moderator
March 2, 2025

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
March 3, 2025

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/