LOGBOOK

HELP

Quiz Entry - updated: 2026.11.26

What is the operating sequence for changing a Check Point configuration through the API, and how does Ansible fit into it?

Log in (get a session) → run commands → publish or discard → log out; Ansible's connection plugin does the login and logout, the modules run the commands, and you must publish explicitly.

Whether a human uses SmartConsole, a script uses curl, or Ansible uses its modules, the management server sees the same flow:

  1. Login: opens a session, returns the sid.
  2. Commands: add-host, set-access-rule, show-hosts, … Changes stay private to the session.
  3. Publish (make the changes public) or Discard (throw them away).
  4. Logout: ends the session.

With Ansible, the httpapi connection plugin for Check Point performs step 1 when the first task needs the connection and step 4 when it closes. The cp_mgmt_* modules are step 2. Step 3 is not automatic: either add a task with check_point.mgmt.cp_mgmt_publish (or cp_mgmt_discard), or set auto_publish_session: true on a module that changes something, which publishes right after that task.

Leaving out step 3 is the most common beginner mistake: the playbook reports changed, and nobody else sees the change.

The Ansible control node runs the Check Point modules locally and talks HTTPS to the management server's web API: login, then commands, then publish, then logout; only an install-policy step reaches the gateway

* One playbook run = one API session. Without a publish, the changes stay private and are never installed. *

Go deeper:

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