Giter Site home page Giter Site logo

chkp-edenbr / checkpointansiblemgmtcollection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from checkpointsw/checkpointansiblemgmtcollection

0.0 0.0 0.0 810 KB

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

Python 100.00%

checkpointansiblemgmtcollection's Introduction

Check Point Ansible Mgmt Collection

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

The Ansible Check Point modules reference can be found here: https://docs.ansible.com/ansible/latest/collections/check_point/mgmt/index.html#plugins-in-check-point-mgmt
Note - look only at the cp_mgmt_* modules, cause the checkpoint_* will be deprecated.

This is the repository of the mgmt collection which can be found here - https://galaxy.ansible.com/check_point/mgmt

Installation instructions

Run ansible-galaxy collection install check_point.mgmt

Requirements

Usage

  1. Edit the hosts so that it will contain a section similar to this one:
[check_point]
%CHECK_POINT_MANAGEMENT_SERVER_IP%
[check_point:vars]
ansible_httpapi_use_ssl=True
ansible_httpapi_validate_certs=False
ansible_user=%CHECK_POINT_MANAGEMENT_SERVER_USER%
ansible_password=%CHECK_POINT_MANAGEMENT_SERVER_PASSWORD%
ansible_network_os=check_point.mgmt.checkpoint

Note - If you want to run against Ansible version 2.9 instead of the collection, just replace ansible_network_os=check_point.mgmt.checkpoint with ansible_network_os=checkpoint

2. Run a playbook:

ansible-playbook your_ansible_playbook.yml

or

Run a playbook in "check mode":

ansible-playbook -C your_ansible_playbook.yml

Example playbook:

---
- name: playbook name
  hosts: check_point
  connection: httpapi
  tasks:
    - name: task to have network
      check_point.mgmt.cp_mgmt_network:
        name: "network name"
        subnet: "4.1.76.0"
        mask_length: 24
        auto_publish_session: true
        
      vars: 
        ansible_checkpoint_domain: "SMC User"

Note - If you want to run against Ansible version 2.9 instead of the collection, just replace check_point.mgmt.cp_mgmt_network with cp_mgmt_network

Notes:

  1. Because this Ansible module is controlling the management server remotely via the web API, the Ansible server needs to have access to the Check Point API server. Open SmartConsole, navigate to "Manage & Settings > Blades > Management API > Advanced settings" and check the API server's accessibility set
  2. Ansible has a feature called "Check Mode" that enables you to test the changes without actually changing anything.
  3. The login and logout happens automatically.
  4. If you want to login to a specific domain, in the playbook above in the varssecion change the domain name to ansible_checkpoint_domain
  5. There are two ways to publish changes: a. Set the auto_publish_session to true as displayed in the example playbook above. This option will publish only the task which this parameter belongs to. b. Add the task to publish to the cp_mgmt_publish module. This option will publish all the tasks above this task.
  6. It is recommended by Check Point to use this collection over the modules of Ansible version 2.9
  7. If you still want to use Ansible version 2.9 instead of this collection (not recommended): a. In the hosts file replace ansible_network_os=check_point.mgmt.checkpoint with ansible_network_os=checkpoint b. In the task in the playbook replace the module check_point.mgmt.cp_mgmt_* with the module cp_mgmt_*
  8. Starting from version 1.0.6, when running a command which returns a task-id, and the user chooses to wait for that task to finish (the default is to wait), then the output of the command will be the output of the show-task command (instead of the task-id).

checkpointansiblemgmtcollection's People

Contributors

alex-eoi avatar black616angel avatar chkp-edenbr avatar chkp-michaele avatar chkp-orso avatar chkp-roniz avatar chkp-royl avatar chkp-shirango avatar iamgini avatar justjais avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.