I am unable to create Simple cluster object through Ansible despite ansible-playbook in checkmode dont have any error.
under api.elg log file i am getting below errors
2024-05-12 22:45:24,294 ERROR com.checkpoint.management.web_api_is.exceptions.WebApiGeneralException.log:50 [qtp1702513516-97] - Error message: [Requested object [GW1-2] not found]
"message" : "Requested object [GW1-2] not found"
My API Version is 1.9.1 & R81.20 Gaia version
===============================================================================================
mypc:/etc/ansible/checkpoint$ ansible-playbook addcluster.yml
PLAY [Add Checkpoint Gateway] ******************************************************************************************
TASK [Gathering Facts] *************************************************************************************************
ok: [10.1.1.250]
TASK [Add Cluster_XL Gateway] ******************************************************************************************
ok: [10.1.1.250]
PLAY RECAP *************************************************************************************************************
10.1.1.250 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
=================================================================
My scripts
---
- name: "Add Checkpoint Gateway"
hosts: mgmt
connection: httpapi
tasks:
- name: "Add Cluster_XL Gateway"
check_point.mgmt.cp_mgmt_simple_cluster:
name: GW1-2
state: absent
cluster_mode: cluster-xl-ha
cluster_version: R81.20
color: "pink"
ip_address: 10.1.1.83
members:
- name: GW-1
one_time_password: "Admin@123"
ip_address: 10.1.1.81
interfaces:
- name: eth0
ip_address: 10.1.1.81
network_mask: 255.255.255.0
- name: eth1
ip_address: 10.2.1.81
network_mask: 255.255.255.0
- name: eth2
ip_address: 10.3.1.81
network_mask: 255.255.255.0
- name: eth3
ip_address: 10.4.1.81
network_mask: 255.255.255.0
- name: GW-2
one_time_password: "Admin@123"
ip_address: 10.1.1.82
interfaces:
- name: eth0
ip_address: 10.1.1.82
network_mask: 255.255.255.0
- name: eth1
ip_address: 10.2.1.82
network_mask: 255.255.255.0
- name: eth2
ip_address: 10.3.1.82
network_mask: 255.255.255.0
- name: eth3
ip_address: 10.4.1.82
network_mask: 255.255.255.0
interfaces:
- name: eth0
interface_type: "cluster"
ip_address: 10.1.1.83
network_mask: 255.255.255.0
anti_spoofing: true
topology: internal
topology_settings:
ip_address_behind_this_interface: "network defined by the interface ip and net mask"
- name: eth1
interface_type: "cluster"
ip_address: 10.2.1.83
network_mask: 255.255.255.0
anti_spoofing: true
topology: internal
topology_settings:
ip_address_behind_this_interface: "network defined by the interface ip and net mask"
- name: eth2
interface_type: cluster
ip_address: 10.3.1.83
network_mask: 255.255.255.0
topology: "external"
- name: eth3
interface_type: sync
ip_address: 10.4.1.83
network_mask: 255.255.255.0
anti_spoofing: true
topology: "internal"
topology_settings:
ip_address_behind_this_interface: "network defined by the interface ip and net mask"
auto_publish_session: true