LOGBOOK

HELP

Quiz Entry - updated: 2026.12.01

How do you read the firewall rules of the access layer "Network" with cp_mgmt_access_rule_facts, and how does the module decide between fetching one rule and the whole rulebase?

Without layer, the module calls show-access-rulebase, and name: Network names the rulebase (layer) to read. With layer: Network, it calls show-access-rule, and name is one rule's name.

    - name: Get rulebase
      check_point.mgmt.cp_mgmt_access_rule_facts:
        name: Network            # the layer, because no 'layer:' is given
        details_level: full
        limit: 20
        offset: 0
        show_hits: true
        use_object_dictionary: true
      register: rulebase

The rule modules use layer as the switch:

Parameters API call Returns
name: Network (no layer) show-access-rulebase the rules of layer Network
layer: Network, name: Rule 1 show-access-rule that single rule

This is easy to misread, because name means the layer in one case and a rule in the other.

Two options worth knowing:

  • show_hits: true adds a hit counter to each rule: how often it matched traffic.
  • use_object_dictionary: true returns sources, destinations and services as UIDs, with the full objects listed once in a separate objects-dictionary, instead of repeating them in every rule.

Go deeper:

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