thanks you so much, i came up with a few modifications.
now i have another issue, i want to remove the host which i had already added, but with my code i go with removing entier group.
- name: add-network-group
check_point.mgmt.cp_mgmt_group:
name: test-ansible
state: absent
members:
- "h-{{ ip_address }}"
auto_publish_session: yes
on the other hand, with this one i can not remove the host because it is in used by network group:
- name: Add new host object
check_point.mgmt.cp_mgmt_host:
name: "h-{{ ip_address }}"
ip_address: "{{ ip_address }}"
groups:
- "test-ansible"
state: absent
auto_publish_session: yes
thanks you so much in advance