-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathzpa_pra_portal_controller.yml
51 lines (47 loc) · 1.61 KB
/
zpa_pra_portal_controller.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
# zpa_pra_portal_controller.yml - Create/Update/Delete a PRA Portal.
#
# Description
# ===========
#
# Quick example of how to use the 'zpa_pra_portal_controller' module to create a PRA Portal in the ZPA Cloud.
#
# This playbook requires proper API credentials to be passed statically or via environment variables connection
# to the ZPA Cloud 'client_id', 'client_secret', customer_id and 'cloud'. These may be defined as host variables
# (see `host_vars/zpa_cloud.yml` for an example) or extra vars.
#
# Modules Used
# ============
#
# zpa_pra_portal_controller - https://zscaler.github.io/zpacloud-ansible/modules/zpa_pra_portal_controller_module.html
#
# Usage
# =====
#
# $ ansible-playbook zpa_pra_portal_controller.yml
- name: Creating PRA Portals
hosts: localhost
connection: local
vars:
zpa_cloud:
client_id: "{{ client_id }}"
client_secret: "{{ client_secret | default(omit) }}"
customer_id: "{{ customer_id | default(omit) }}"
cloud: "{{ cloud | default(omit) }}"
tasks:
- name: Gather Details of a Specific Browser Certificates by Name
zscaler.zpacloud.zpa_ba_certificate_info:
provider: '{{ zpa_cloud }}'
name: 'portal.acme.com'
register: cert_name
- name: Create/Update/Delete PRA Portal
zscaler.zpacloud.zpa_pra_portal_controller:
provider: '{{ zpa_cloud }}'
name: 'portal.acme.com'
description: 'PRA Portal'
enabled: true
domain: 'portal.acme.com'
certificate_id: "{{ cert_name.data[0].id }}"
user_notification: 'PRA Portal'
user_notification_enabled: true
register: result