CheckPointSW / CheckPointAnsibleMgmtCollection

This Ansible collection provides control over a Check Point Management server using Check Point's web-services APIs.

Home Page:https://galaxy.ansible.com/check_point/mgmt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Place a rule at bottom of a section

DrySimon opened this issue · comments

Hello everyone,

I'm trying to use this module to create access rules and place them at the bottom of a specific section.
My task is as follows:

- name: Add access-rule
  check_point.mgmt.cp_mgmt_access_rule:
    name: "Access-Rule-Name"
    layer: 'Network'
    position: 
      bottom: 'My-Section-Name'
    source: "somesource"
    destination: "somedest"
    service: 'any'
    action: 'Accept'
    track:
      type: 'Log'
    install_on: 'Policy Targets'
    enabled: yes
    auto_publish_session: no
    state: present

However, I have an error:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: invalid literal for int() with base 10: "{'bottom': 'My-Section-Name'}"

Are section names supported in the module?

Thanks in advance!

Hi @DrySimon ,

Thanks for reaching us.

The position parameter in Ansible is an integer, thus you can't give him a value of 'bottom'/'top'.
We intentionally removed this functionality because it damages one of Ansible requirements for idempotency.

Thanks,
Or