CheckPointSW / CheckPointAnsibleMgmtCollection

This Ansible collection provides control over a Check Point Management server using Check Point's web-services APIs.
https://galaxy.ansible.com/check_point/mgmt
Apache License 2.0
40 stars 30 forks source link

Cluster registration fails with invalid paramter cluster_version #90

Closed sasikdar closed 1 year ago

sasikdar commented 1 year ago

- name: Register Cluster
  check_point.mgmt.cp_mgmt_simple_cluster:
    cluster_mode: cluster-xl-ha
    color: "{{ cluster.color }}"
    firewall: true
    interfaces: "{{ cluster.interfaces }}"
    ip_address: "{{ cluster.ip_address }}"
    members: "{{ cluster.members }}"
    name: "{{ cluster.name }}"
    os_name: Gaia
    state: present
    cluster_version: R81.20
    send_logs_to_server: "{{ cluster.send_logs_to_server }}"
    firewall_settings:
      auto_maximum_limit_for_concurrent_connections: False
      maximum_limit_for_concurrent_connections: 250000
    comments: "{{ cluster.name }} Gateway Cluster"
    hardware: Open server
    auto_publish_session: True
  when: cluster.name not in existing_clusters
  loop: "{{ domain_inventory.clusters }}"
  loop_control:
    loop_var: cluster
  vars:
    ansible_checkpoint_domain: "{{ domain_inventory.name }}"

error message :

failed: [Domain-5] "msg": "Checkpoint device returned error 400 with message {'code': 'generic_err_invalid_parameter_name', 'message': 'Unrecognized parameter [cluster-version]'} Unpublished changes were discarded"}

chkp-edenbr commented 1 year ago

Hi @sasikdar,

Which version of the collection are you using? We've added a fix in v3.1.0 which concerns this parameter.

Regards, Eden

sasikdar commented 1 year ago

I was using the latest version. I later realized this problem occours when I put the cluster name in the default/main.yml and try to pass it as a variable in the task.

In my code defaults/main.yml had a variable

cluster_name: "{{domain_inventory.domain_name}}_cluster"

when I put {{domain_inventory.domain_name}}_cluster directly in the task instead of passing {{cluster_name}} from defaults it worked. Is there a specific reason for that?

chkp-edenbr commented 1 year ago

Doesn't seem like an issue with the collection, perhaps the passing of the variable wasn't successful.