-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshow-hosts.yml
29 lines (28 loc) · 1.54 KB
/
show-hosts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# To Run
# update the credetials "ansible_user" and "ansible_ssh_pass" or "ansible_api_key"
#
# Add the IP of your target to your /etc/ansible/hosts inventory file and execute:
# ansible-pull -d /tmp/ansible-pull -U https://github.com/jimoq/demo.git demo_playbook.yml -e "target=192.168.233.71" -l 192.168.233.71
# where 192.168.233.71 should be changed to the IP of your management server
#
# Or clone the repository and execute:
# ansible-playbook demo_playbook.yml -e "target=192.168.233.71" -i 192.168.233.71,
# where 192.168.233.71 should be changed to the IP of your management server
---
- name: Build Ansible demo policy automation_policy on Check Point management server {{ target }}
hosts: "{{ target }}"
connection: httpapi
vars:
# Credentials for cp_mgmt* modules and Settings for the Check Point httpapi plugin that provides methods to connect to Checkpoint devices over a HTTP(S)-based api.
ansible_httpapi_use_ssl: True
ansible_httpapi_validate_certs: False
ansible_network_os: check_point.mgmt.checkpoint #Using Galaxy https://galaxy.ansible.com/check_point collection
ansible_checkpoint_domain: SMC User # Default domain for a SMS (SmartCenter)
ansible_user: api_user # Change to your Check Point management admin user
ansible_ssh_pass: vpn123 # Change to your Check Point management admin password
#ansible_api_key: xxxxxxxxxx # Optionally you can use API key instead of username and password
gather_facts: no
tasks:
- name: show-hosts
cp_mgmt_host_facts:
details_level: standard