Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check mode not supported on fortios_system_global #351

Open
powershellbreakfast opened this issue Oct 10, 2024 · 1 comment
Open

check mode not supported on fortios_system_global #351

powershellbreakfast opened this issue Oct 10, 2024 · 1 comment

Comments

@powershellbreakfast
Copy link

Using the following playbook and hosts file i am unable to run a simple check on whether a FortiGate has a setting configured in fortios_system_global.

Is there a reason its not supported or a recommended way of checking for this value ?

inventory file: hosts.yml
*credentials stored separately

all:
  vars:
    ansible_user: "{{ credentials[inventory_hostname].user }}" 
    ansible_password: "{{ credentials[inventory_hostname].password }}"
    ansible_become_password: "{{ credentials[inventory_hostname].become_password }}"

fortigate:
  hosts:
    SYM-HQ-FW1:
      ansible_host: 192.168.255.253
    home_fortigate:
      ansible_host: 192.168.0.1
  vars:
    #ansible_connection: ansible.netcomon.network_cli
    ansible_network_os: fortinet.fortios.fortios
    ### Specify API connection with HTTP (default SSH)###
    ansible_connection: httpapi
    ansible_httpapi_validate_certs: no
    ansible_httpapi_use_ssl: yes

playbook: set_system_global_revision-backup-on-logout.yml

---
- name: configure revision-backup-on-logout 
  hosts: home_fortigate
  collections:
  - fortinet.fortios
  tasks:
    - name: configure system global.
      fortios_system_global:
        system_global:
          revision_backup_on_logout: "disable"

command used to run playbook

ansible-playbook -i hosts.yml set_system_global_revision-backup-on-logout.yml --check -v

results in

skipping: [home_fortigate] => {"changed": false, "msg": "remote module (fortios_system_global) does not support check mode"}                   
@MaxxLiu22
Copy link

Hi @powershellbreakfast

Thank you for bringing this issue to our attention. Currently, Ansible FOS check mode does not support all resources, including fortios_system_global. I have reported this to our development team, and they are considering adding check mode support for additional resources. We are also aware that there may be some display issues with the current check mode, and the team is working on improvements. We sincerely apologize for any inconvenience this may have caused.

Thanks,
Maxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants