LOGBOOK

HELP

Quiz Entry - updated: 2026.12.01

What is the difference between cp_mgmt_host_facts with name: and without it, and what do details_level, limit and offset control?

With name it calls show-host and returns one object; without it, show-hosts and a page of all host objects. details_level (uid, standard, full) sets how much of each object comes back; limit and offset page through long lists.

All *_facts modules switch between the singular and plural API call depending on whether you name an object.

Facts modules choose the API call from their parameters: with a name, show-host returns one object; without, show-hosts returns a page of objects with from, to and total

* Name an object to get it; leave the name out to list them, page by page. *

In detail:

Task API call Result in ansible_facts
cp_mgmt_host_facts: name: "HSLU-Test-Host" show-host one host object
cp_mgmt_host_facts: (no name) show-hosts hosts with an objects list, plus from, to, total

For the list form:

  • limit: how many objects per call (the lab uses 50);
  • offset: where to start, so offset: 50 gets the next page. Compare total with to to see whether there is more;
  • details_level: uid returns only identifiers, standard the usual fields, full everything, including nested objects.

To see the result, register it and print it:

    - check_point.mgmt.cp_mgmt_host_facts:
        name: "HSLU-Test-Host"
      register: host_info
    - ansible.builtin.debug:
        msg: "{{ host_info }}"

Go deeper:

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