Skip to content

Ansible collection that automates the configuration and operational tasks on Zscaler Private Access, using the ZPA API.

License

Notifications You must be signed in to change notification settings

xqeokcwxbpcfmrmj/zpacloud-ansible

 
 

Repository files navigation

Zscaler Private Access (ZPA) Ansible Collection

Version on Galaxy sanity integration CI

This collection contains modules and plugins to assist in automating the configuration and operational tasks on Zscaler Private Access cloud, and API interactions with Ansible.

Tested Ansible Versions

This collection is tested with the most current Ansible 2.9 and 2.10 releases. Ansible versions before 2.9.10 are not supported.

Included content

Installation and Usage

Before using the ZPACloud collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install willguibr.zpacloud

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

  collections:
    - willguibr.zpacloud

Using modules from the ZPACloud Collection in your playbooks

It's preferable to use content in this collection using their Fully Qualified Collection Namespace (FQCN), for example willguibr.zpacloud.zpa_app_connector_groups:

---
- hosts: localhost
  gather_facts: false
  connection: local

  tasks:
    - name: Get Information Details of All Customer Version Profiles
      willguibr.zpacloud.zpa_customer_version_profile_info:
      register: version_profile_id

    - name: Create App Connector Group Example
      willguibr.zpacloud.zpa_app_connector_groups:
        name: "Example"
        description: "Example"
        enabled: true
        city_country: "California, US"
        country_code: "US"
        latitude: "37.3382082"
        longitude: "-121.8863286"
        location: "San Jose, CA, USA"
        upgrade_day: "SUNDAY"
        upgrade_time_in_secs: "66600"
        override_version_profile: true
        version_profile_id: "{{ version_profile_id.data[0].id }}"
        dns_query_type: "IPV4"

If you are using versions prior to Ansible 2.10 and this collection's existence, you can also define collections in your play and refer to this collection's modules as you did in Ansible 2.9 and below, as in this example:

---
- hosts: localhost
  gather_facts: false
  connection: local

  collections:
    - zscaler.zpacloud

  tasks:
    - name: Get Information Details of All Customer Version Profiles
      zpa_customer_version_profile_info:
      register: version_profile_id

    - name: Create App Connector Group Example
      zpa_app_connector_groups:
        name: "Example"
        description: "Example"
        enabled: true
        city_country: "California, US"
        country_code: "US"
        latitude: "37.3382082"
        longitude: "-121.8863286"
        location: "San Jose, CA, USA"
        upgrade_day: "SUNDAY"
        upgrade_time_in_secs: "66600"
        override_version_profile: true
        version_profile_id: "{{ version_profile_id.data[0].id }}"
        dns_query_type: "IPV4"
        ...

License

MIT License

=======

Copyright (c) 2022 Zscaler

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Ansible collection that automates the configuration and operational tasks on Zscaler Private Access, using the ZPA API.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Makefile 0.6%