• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Custom Ansible modules for NetScaler ADC and NetScaler ADM. Part of NetScaler Automation Toolkit | https://github.com/netscaler/automation-toolkit

NetScaler Ansible Collection version2 - netscaler.adc

⚠️ Note: The earlier citrix.adc ansible collection is replaced with the new netscaler.adc ansible collection.

The citrix.adc ansible collection is backed up by a se branch citrix.adc

Vision

The vision of the netscaler.adc collection is to provide a complete declarative interface to configure and manage NetScaler ADC.

If you need any feature or flexibility that is not available in the collection at the moment, please raise issues/enhancement-requests/recommendations at https://github.com/netscaler/ansible-collection-netscaleradc/issues

βœ‰οΈ For any immediate issues or help , reach out to us at [email protected] !

About version1 and version2 of the collection

We refer the earlier citrix.adc ansible collection as version1 and the new netscaler.adc as version2.

This is the version2 of the NetScaler Ansible Collection. It is a complete rewrite of the collection. The collection is not backward compatible with the version1 of the collection.

citrix.adc collection will be deprecated soon and will not be maintained further. It is recommended to migrate to the netscaler.adc collection.

About the netscaler.adc collection (version2)

The collection provides Ansible modules to configure and manage NetScaler ADC appliances. The modules are written using the NITRO API. The modules are idempotent and can be used to configure the NetScaler ADC appliances in declarative manner.

Installation

ansible-galaxy

ansible-galaxy collection install netscaler.adc

via github (to have the latest updated which are yet to be released in ansible-galaxy)

ansible-galaxy collection install "git+https://github.com/netscaler/ansible-collection-netscaleradc.git" [--force]

--force option is required if you have already installed the collection via ansible-galaxy. This will overwrite the existing collection with the latest collection from github.

Verify the installation

ansible-galaxy collection list netscaler.adc

The above command should display the following output:


# /Users/netscaleruser/.ansible/collections/ansible_collections
Collection    Version
------------- -------
netscaler.adc 2.0.x

Collection Modules Documentation

https://netscaler.github.io/ansible-collection-netscaleradc/

You can also click on the desired module name in the supported_modules_matrix.md file to go to the specific module documentation

Examples

Refer to the examples directory for the sample playbooks.

Also refer playbook_anatomy.md for the anatomy of a playbook.

πŸ”‘ Authentication

Authenticate to NetScaler via username and password

Every module in the collection requires the user to authenticate to the NetScaler ADC appliance. The authentication can be done using the nitro_user and nitro_pass parameters. These parameters can also be passed as environment variables NETSCALER_NITRO_USER and NETSCALER_NITRO_PASS.

Refer to the playbook_anatomy.md and examples directory for the sample playbooks.

Authenticate to NetScaler

Password based authentication

Every task in the collection requires the user to authenticate to the NetScaler ADC appliance. The authentication can be done using the nsip, nitro_user and nitro_pass parameters. These parameters can also be passed as environment variables NETSCALER_NSIP, NETSCALER_NITRO_USER and NETSCALER_NITRO_PASS.

Using netscaler.adc.module_defaults group

To avoid having to specify common parameters for all the modules in every task, you can use the netscaler.adc.module_defaults module defaults group:

Refer examples/module_default_args_action_group.yaml for an example playbook.

Passwordless via nitro_auth_token parameter (SESSIONID based authentication)

The collection also supports authentication to NetScaler ADC appliance via token. The token can be generated using the login module. The token can be passed to other modules using the nitro_auth_token parameter. The nitro_token parameter can also be passed as environment variable NETSCALER_NITRO_AUTH_TOKEN.

Refer to the playbook_anatomy.md and sessionid_based_authentication_via_login_logout.yaml example playbook.

login module requres username and password parameters to be passed. If you do not wish to pass the username and password, refer below.

You can use the below curl command to generate the token. The token can be passed to other modules using the nitro_auth_token parameter. The nitro_auth_token parameter can also be passed as environment variable NETSCALER_NITRO_AUTH_TOKEN. The token is valid for 60 minutes.

The below command also uses jq to parse the JSON output and store the sessionid in the NETSCALER_NITRO_AUTH_TOKEN environment variable, so that it can be used by other modules.

change the NETSCALER_NSIP, NETSCALER_NITRO_USER and NETSCALER_NITRO_PASS

Install jq util if not already installed.

export NETSCALER_NITRO_AUTH_TOKEN=$(curl -X POST -H "Content-Type:application/json" --insecure --silent https://NETSCALER_NSIP/nitro/v1/config/login -d '{"login":{"username":"NETSCALER_NITRO_USER", "password":"NETSCALER_NITRO_PASS"}}' | jq .sessionid)
echo $NETSCALER_NITRO_AUTH_TOKEN

Supported Ansible Versions

This collection is tested for Ansible version 2.14 and above.

Please raise issues at https://github.com/netscaler/ansible-collection-netscaleradc/issues if you face any issues with the collection.

Features of netscaler.adc collection

Refer to the features_v2.md file for the features of the netscaler.adc collection.

Migrating from citrix.adc collection to netscaler.adc collection

Both citrix.adc and netscaler.adc can be used in the same Ansible playbook. However, it is recommended to migrate to netscaler.adc collection.

Refer to the migrating_from_v1_v2.md file for the migration steps.

Supported Modules in netscaler.adc collection

Refer to the supported_modules_matrix.md file for the list of supported modules in netscaler.adc collection.

Todo list for netscaler.adc collection

  • Support for nitro_auth_token parameter in all modules.
  • Update supported matrix to have documentation links
  • Add appropriate license to the collection.
  • Upload the collection to Ansible Galaxy.
  • Support configuring ADC with ADM as proxy. Refer to NetScaler ADM as an API proxy server for more details.
  • Implement SSH connection module
  • Support for generic modules similar to citrix.adc.nitro_request and citrix.adc.nitro_resource?
  • migration tool to convert citrix.adc playbooks (including generic citrix.adc.nitro_request and citrix.adc.nitro_resource modules) to netscaler.adc modules
  • Add more examples
  • Write a python script which converts examples/playbook.yaml to module's EXAMPLE documentation
  • Test modules against all NetScaler ADC versions.
  • Test modules againsts ansible versions 2.9+
  • Configure GitHub Actions to automate the collection build and release process.
  • Configure GitHub Actions to automate the collection testing process.
  • Configure GitHub Actions to automate the collection linting process.
  • Collect NetScaler info (version, etc) and store it in the facts dictionary

More Repositories

1

netscaler-k8s-ingress-controller

NetScaler Ingress Controller for Kubernetes:
HCL
307
star
2

netscaler-adc-metrics-exporter

Export metrics from Citrix ADC (NetScaler) to Prometheus
Python
89
star
3

netscaler-observability-exporter

Exports logs and metrics from Citrix ADC to various observability tools
86
star
4

netscaler-xds-adaptor

citrix-xds-adaptor
Go
80
star
5

cloud-native-getting-started

Learn how to use Citrix ADC in Kubernetes for 2 tier microservices architecture for Cloud Native applications
HCL
48
star
6

netscaler-k8s-node-controller

Integrates the hardware/virtualized NetScaler with the Kubernetes overlay / underlay
40
star
7

ADC-scripts

Citrix ADC scripts for migrating and converting Citrix ADC configuration with deprecated features
Python
34
star
8

nitrox

Configure Citrix Netscaler Loadbalancing for container platforms
Python
30
star
9

automation-toolkit

NetScaler Automation Toolkit / [email protected]
HCL
23
star
10

netscaler-helm-charts

NetScaler helm charts
Mustache
21
star
11

netscaler-terraform-modules

Part of NetScaler Automation Toolkit
HCL
16
star
12

ansible-nitro-api-calls

15
star
13

citrix-adc-azure-templates

Part of NetScaler Automation Toolkit
Makefile
14
star
14

ADM-StyleBooks

Citrix ADM StyleBooks
12
star
15

adc-nitro-go

NITRO API SDK for Golang
Go
11
star
16

citrix-adc-aws-cloudformation

Part of NetScaler Automation Toolkit
Python
10
star
17

neutron

OpenStack neutron along with NetScaler driver. Primary repo for developing NetScaler driver for neutron.
Python
7
star
18

netscaler_aci_poc_kit

NetScaler ACI PoC Kit
Python
6
star
19

modern-apps-toolkit

NetScaler tools for modernizing applications
Go
6
star
20

netscaler-rolling-updates-example

Dependencies for executing the rolling updates playbook examples included in the netscaler-ansible-modules
5
star
21

Netscaler-Powershell-Module

C#
4
star
22

terraform-provider-citrixadm

Terraform Custom Provider for NetScaler ADM Service | Part of NetScaler Automation Toolkit
Go
4
star
23

MaxMind-GeoIP-Database-Conversion-Citrix-ADC-Format

MaxMind GeoIP Database Conversion Citrix ADC Format
Perl
4
star
24

default-ssl-profile-script

Python Script to export a list of SSL vServers and assign each a Default SSL Profile.
4
star
25

citrix-adc-gdm-templates

Part of NetScaler Automation Toolkit
Python
3
star
26

terraform-provider-netscalersdx

Manage (Configure) SDX via this terraform provider
Go
2
star
27

citrix-adm-service-add-on-for-splunk

2
star
28

netscaler-cpx-gcp-marketplace

Citrix ADC CPX documentation for GCP Marketplace
Makefile
2
star
29

nitro

The java client to perform NITRO API calls to a NetScaler appliance
Java
2
star
30

terraform-provider-citrixblx

Part of NetScaler Automation Toolkit
Go
2
star
31

citrix-ansible-aws

Ansible playbooks to quickly deploy Citrix ADC services in Amazon Web Services (AWS)
2
star
32

netscaler-ingress-controller-gcp-marketplace

Documentation for Citrix Ingress Controller for Kubernetes hosted on GCP Marketplace
Makefile
2
star
33

citrix-k8s-ingress-controller-docs

HTML
1
star
34

netscaler-rolling-updates-vpx-example

1
star