Support Center > Search Results > SecureKnowledge Details
Automate your management server using "Ansible"
Solution

This article describes how to automate your management server using "Ansible".

Ansible (www.ansible.com) is a popular automation tool.

The "Ansible Check Point Management" module provides the ability to automate Check Point management tasks (e.g. add objects, manipulate the rulebase, install policy) into the Ansible automation platform.


Description

Provide Ansible "playbooks" with simple access to all available Check Point Management APIs.

The ansible module is written in Python and its source code is available. You are welcome to review code, suggest enhancements or modify it.

Instructions

To enable the integration, install the necessary hotfix, based on your Management Server version:

Management Server Version Hotfix information
R80.10

Available from R80.10 JHF take 270

R80.20

Available from R80.20 JHF take 134

R80.30 Available from R80.30 JHF take 135

 

Usage

The Ansible inventory (for example /etc/ansible/hosts needs to contain a section similar to this:

[checkpoint]
# Check Point Security Management server's IP address
172.27.254.10

[checkpoint:vars]
# If the Gaia web portal on your Security Management server is not setup with proper CA certificates that can be verified from the Ansible server, then it is necessary to disable validation of these certificates by using the ansible_httpapi_validate_certs. To do this you need to set ansible_httpapi_validate_certs=False in your inventory.
ansible_httpapi_use_ssl=True
ansible_network_os=checkpoint
ansible_user=[Check Point admin username]
ansible_password=[Check Point admin password]


The playbook needs to use "connection httpapi"

---
hosts: "{{ target }}"
connection: httpapi

# Add or delete host object in Check Point management server
- name: add-host or delete-host
  cp_mgmt_host:
  color: red
  name: My test host
  ip_address: 192.168.1.1

For more information on the community supported Check Point network modules in Ansible refer to https://docs.ansible.com/ansible/latest/modules/list_of_network_modules.html#check-point

 

Code Version

Code version 1.0.0

For more information and installation instructions, refer to Ansible Module - check_point_mgmt by Check Point page.

 

Tested on version

R80.10 with Jumbo Hotfix take 245, API version 1.1

R80.20 with Jumbo Hotfix take 118, API version 1.3

R80.30 with Jumbo Hotfix take 76, API version 1.5

Give us Feedback
Please rate this document
[1=Worst,5=Best]
Comment