Quiz Entry - updated: 2026.11.26
A Check Point playbook starts with hosts: networking, connection: httpapi and gather_facts: false. Why each of these lines?
hosts picks the management server group; connection: httpapi makes Ansible talk to its REST API instead of SSH; gather_facts: false skips the setup step, which assumes a normal Linux host and has nothing useful to collect here.
- hosts: networking
connection: httpapi
gather_facts: false
tasks:
- name: add-host
check_point.mgmt.cp_mgmt_host:
name: "HSLU-Test-Host"
ip_address: 192.168.1.1
color: red
state: present
hosts: networkingtargets the inventory group that holds the management server(s).connection: httpapi: by default Ansible connects over SSH, copies a Python module to the target and runs it there. A firewall management API works differently, so the play tells Ansible to use the HTTP API connection.ansible_network_os(from group_vars) then picks the Check Point flavour of it.gather_facts: false: fact gathering runs thesetupmodule to learn about the OS, disks and interfaces of a server. With an httpapi connection there is no such server to inspect, so it would only waste time or report facts about the wrong machine. What you want to know about the firewall you ask explicitly with*_factsmodules.
The task itself declares that a red host object named HSLU-Test-Host with that IP address should exist on the management server.
Go deeper:
How network automation is different (Ansible docs) โ execution on the control node and the network connection types.