Skip to content

Instantly share code, notes, and snippets.

@joe-at-cp
Created July 25, 2019 14:25
Show Gist options
  • Select an option

  • Save joe-at-cp/143de99ecc19abb9cc89b30fa9f7556b to your computer and use it in GitHub Desktop.

Select an option

Save joe-at-cp/143de99ecc19abb9cc89b30fa9f7556b to your computer and use it in GitHub Desktop.
Ansible - Check Point Gateway - VMware vApp Options
---
- hosts: localhost
vars:
vcenter_hostname: 192.168.30.244
vcenter_username: [email protected]
vcenter_password: ""
vm_name: CheckPointvAppImage
vapp_Hostname: "{{ vm_name }}"
vapp_Management_Interface: eth0
vapp_Management_IP: "{{ mgmtif_ip }}"
vapp_Management_Subnet_Mask: 255.255.255.0
vapp_Default_Gateway: 192.168.30.1
vapp_ADMIN_PW_HASH: $1$.LxR/hPY$aYJ3jjtWayzcXnlhisc931
vapp_EXPERT_PW_HASH: $1$.LxR/hPY$aYJ3jjtWayzcXnlhisc931
vapp_SIC_KEY: vpn123
vapp_SMARTCENTER_IP: 192.168.30.5
vapp_SMARTCENTER_API_PORT: "443"
vapp_SMARTCENTER_USER: ""
vapp_SMARTCENTER_PW: ""
vapp_Install_Policy: Standard
vapp_Policy_Name: Standard
tasks:
- name: Deploy Check Point R80.10 vApp Image
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
datacenter: Datacenter
folder: Datacenter/vm
name: "{{ vm_name }}"
template: Check_Point_SG_R80-VE_Template
delegate_to: localhost
- name: Apply vApp Parameters
vmware_guest:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
name: "{{ vm_name }}"
state: present
cdrom:
type: iso
iso_path: "[datastore1] vAppISOs/cp_vapp_09_26_18_debug.iso"
vapp_properties:
- id: Hostname
label: Hostname
type: string
value: "{{ vapp_Hostname }}"
- id: Management_Interface
label: Management_Interface
type: string
value: "{{ vapp_Management_Interface }}"
- id: Management_IP
label: Management_IP
type: string
value: "{{ vapp_Management_IP }}"
- id: Management_Subnet_Mask
label: Management_Subnet_Mask
type: string
value: "{{ vapp_Management_Subnet_Mask }}"
- id: Default_Gateway
label: Default_Gateway
type: string
value: "{{ vapp_Default_Gateway }}"
- id: ADMIN_PW_HASH
label: ADMIN_PW_HASH
type: string
value: "{{ vapp_ADMIN_PW_HASH }}"
- id: EXPERT_PW_HASH
label: EXPERT_PW_HASH
type: string
value: "{{ vapp_EXPERT_PW_HASH }}"
- id: SIC_KEY
label: SIC_KEY
type: string
value: "{{ vapp_SIC_KEY }}"
- id: SMARTCENTER_IP
label: SMARTCENTER_IP
type: string
value: "{{ vapp_SMARTCENTER_IP }}"
- id: SMARTCENTER_API_PORT
label: SMARTCENTER_API_PORT
type: string
value: "{{ vapp_SMARTCENTER_API_PORT }}"
- id: SMARTCENTER_USER
label: SMARTCENTER_USER
type: string
value: "{{ vapp_SMARTCENTER_USER }}"
- id: SMARTCENTER_PW
label: SMARTCENTER_PW
type: string
value: "{{ vapp_SMARTCENTER_PW }}"
- id: Policy_Name
label: Policy_Name
type: string
value: "{{ vapp_Policy_Name }}"
delegate_to: localhost
- name: Power On Virtual Machine
vmware_guest_powerstate:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
validate_certs: no
folder: /vm
name: "{{ vm_name }}"
state: powered-on
delegate_to: localhost
register: deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment