Skip to content

check_point.gaia 7.0.0 modules fail with "name 'exception' is not defined" #76

@jiholland

Description

@jiholland
SUMMARY

All modules in check_point.gaia version 7.0.0 fail at the first task with the error: name 'exception' is not defined. This seems to occur before any API interaction with the device.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

check_point.gaia.cp_gaia_asset_facts

ANSIBLE VERSION
ansible [core 2.20.3]
  config file = /home/jiholland/ansible.cfg
  configured module search path = ['/home/jiholland/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/jiholland/.venv/lib/python3.12/site-packages/ansible
  ansible collection location = /home/jiholland/collections:/home/jiholland/.ansible/collections
  executable location = /home/jiholland/.venv/bin/ansible
  python version = 3.12.12 (main, Nov 3 2025, 10:09:30) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] (/home/jiholland/.venv/bin/python3)
  jinja version = 3.1.6
  libyaml = True
  pyyaml version = 6.0.3 (with libyaml v0.2.5)
COLLECTION VERSION

Collection        Version
----------        -------
ansible.netcommon 8.4.0
ansible.utils     6.0.1 
check_point.gaia  7.0.0
OS / ENVIRONMENT
Model: Check Point 6700
OS: R82
STEPS TO REPRODUCE
$ cat test_gaia_playbook.yml
---
- name: Test gaia.
  hosts: firewall
  gather_facts: false

  tasks:
    - name: Get facts.
      check_point.gaia.cp_gaia_asset_facts:

    - name: Print facts.
      ansible.builtin.debug:
        msg: "{{ ansible_facts }}"


$ cat ansible_inventory/host_vars/firewall/ansible.yml
---
ansible_connection: ansible.netcommon.httpapi
ansible_host: 192.0.2.10
ansible_httpapi_use_ssl: true
ansible_httpapi_validate_certs: true
ansible_httpapi_port: 4434
ansible_network_os: check_point.gaia.checkpoint
EXPECTED RESULTS
$ ansible-playbook test_gaia_playbook.yml

PLAY [Test gaia.] *************************************************************************************************************

TASK [Get facts.] *************************************************************************************************************
ok: [firewall]

TASK [Print facts.] *************************************************************************************************************
ok: [firewall] => {
    "msg": {
        "ac": [],
        "disk": [ ...

PLAY RECAP *************************************************************************************************************
firewall     : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
ACTUAL RESULTS
$ ansible-playbook test_gaia_playbook.yml

PLAY [Test gaia.] *************************************************************************************************************

TASK [Get facts.] *************************************************************************************************************
[ERROR]: Task failed: name 'exception' is not defined

Task failed.
Origin: /home/jiholland/ansible-playbooks/test_gaia_playbook.yml:7:7

5
6   tasks:
7     - name: Get facts.
        ^ column 7

<<< caused by >>>

name 'exception' is not defined

fatal: [firewall]: FAILED! => {"changed": false, "msg": "Task failed: name 'exception' is not defined"}

PLAY RECAP *************************************************************************************************************
firewall     : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions