LOGBOOK

HELP

Quiz Entry - updated: 2026.11.26

A playbook adds a host object with cp_mgmt_host, reports changed, and cp_mgmt_host_facts even shows the new object. But in SmartConsole the host does not exist. Why, and how do you fix it?

The change was made in the playbook's own API session and never published, so it stayed private to that session; add a cp_mgmt_publish task or set auto_publish_session: true.

The facts output gives it away: the object's meta-info says "lock": "locked by current session". The facts task ran in the same API session as the add, so it can see the session's private change. SmartConsole is a different session and only sees published objects.

Two fixes:

    - name: add-host
      check_point.mgmt.cp_mgmt_host:
        name: "HSLU-Test-Host"
        ip_address: 192.168.1.1
        state: present
        auto_publish_session: true       # publish right after this task

    - name: publish everything done so far in this session
      check_point.mgmt.cp_mgmt_publish:

auto_publish_session is convenient for a single change. One explicit cp_mgmt_publish at the end is usually better for a batch: everything appears as one published change (one entry in the audit log, all or nothing).

Until it is published or discarded, the abandoned change also leaves the object locked for other administrators. An administrator can take over that session in SmartConsole and publish or discard it.

Go deeper:

From Quiz: ITIA / Network Automation with Ansible and a Check Point Firewall | Updated: Nov 26, 2026