{"id":20887491,"url":"https://github.com/netscaler/ansible-collection-netscaleradc","last_synced_at":"2025-05-12T19:33:47.367Z","repository":{"id":37098623,"uuid":"89618427","full_name":"netscaler/ansible-collection-netscaleradc","owner":"netscaler","description":"Custom Ansible modules for NetScaler ADC and NetScaler ADM ","archived":false,"fork":false,"pushed_at":"2024-04-12T10:49:23.000Z","size":64546,"stargazers_count":104,"open_issues_count":24,"forks_count":51,"subscribers_count":26,"default_branch":"main","last_synced_at":"2024-04-12T16:30:40.685Z","etag":null,"topics":["ansible","ansible-modules","citrix-netscaler","load-balancer","netscaler","netscaler-automation-toolkit","network-automation","python"],"latest_commit_sha":null,"homepage":"https://netscaler.github.io/ansible-collection-netscaleradc/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netscaler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":"supported_modules_matrix.md","governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-04-27T16:30:19.000Z","updated_at":"2024-04-15T11:58:10.572Z","dependencies_parsed_at":"2024-02-21T13:43:01.544Z","dependency_job_id":"df2e7d92-50de-48c4-9200-e9f19ab38515","html_url":"https://github.com/netscaler/ansible-collection-netscaleradc","commit_stats":null,"previous_names":["netscaler/ansible-collection-netscaleradc"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netscaler%2Fansible-collection-netscaleradc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netscaler%2Fansible-collection-netscaleradc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netscaler%2Fansible-collection-netscaleradc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netscaler%2Fansible-collection-netscaleradc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netscaler","download_url":"https://codeload.github.com/netscaler/ansible-collection-netscaleradc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225148991,"owners_count":17428485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-modules","citrix-netscaler","load-balancer","netscaler","netscaler-automation-toolkit","network-automation","python"],"created_at":"2024-11-18T08:20:22.873Z","updated_at":"2024-11-18T08:20:23.455Z","avatar_url":"https://github.com/netscaler.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NetScaler Ansible Collection `version2` - netscaler.adc\n\n[![ansible-lint](https://github.com/netscaler/ansible-collection-netscaleradc/actions/workflows/lint.yml/badge.svg)](https://github.com/netscaler/ansible-collection-netscaleradc/actions)\n[![ansible-test](https://github.com/netscaler/ansible-collection-netscaleradc/actions/workflows/test.yml/badge.svg)](https://github.com/netscaler/ansible-collection-netscaleradc/actions)\n[![collection-release](https://github.com/netscaler/ansible-collection-netscaleradc/actions/workflows/release.yml/badge.svg)](https://github.com/netscaler/ansible-collection-netscaleradc/actions)\n[![ah-token-refresh](https://github.com/netscaler/ansible-collection-netscaleradc/actions/workflows/ah_token_refresh.yml/badge.svg)](https://github.com/netscaler/ansible-collection-netscaleradc/actions)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/netscaler/ansible-collection-netscaleradc/badge)](https://securityscorecards.dev/viewer/?uri=github.com/netscaler/ansible-collection-netscaleradc)\n\n\u003e ⚠️ Note:\n\u003e The earlier `citrix.adc` ansible collection is replaced with the new `netscaler.adc` ansible collection.\n\n\u003e The `citrix.adc` ansible collection is backed up by a separate branch [citrix.adc](https://github.com/netscaler/ansible-collection-netscaleradc/tree/citrix.adc)\n\n\n## Vision\n\nThe vision of the `netscaler.adc` collection is to provide a complete declarative interface to configure and manage NetScaler ADC.\n\nIf you need any feature or flexibility that is not available in the collection at the moment, please raise issues/enhancement-requests/recommendations at \u003chttps://github.com/netscaler/ansible-collection-netscaleradc/issues\u003e\n\n\u003e :envelope: For any immediate issues or help , reach out to us at \u003cNetScaler-AutomationToolkit@cloud.com\u003e !\n\n## About `version1` and `version2` of the collection\n\nWe refer the earlier `citrix.adc` ansible collection as `version1` and the new `netscaler.adc` as `version2`.\n\nThis 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.\n\n`citrix.adc` collection will be deprecated soon and will not be maintained further. It is recommended to migrate to the `netscaler.adc` collection.\n\n## About the `netscaler.adc` collection (version2)\n\nThe 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.\n\n## Installation\n\n### ansible-galaxy\n\n```bash\nansible-galaxy collection install netscaler.adc\n```\n\n### via github (to have the latest updated which are yet to be released in ansible-galaxy)\n\n\n```bash\nansible-galaxy collection install \"git+https://github.com/netscaler/ansible-collection-netscaleradc.git\" [--force]\n```\n\n\u003e `--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.\n\n### Verify the installation\n\n```bash\nansible-galaxy collection list netscaler.adc\n```\n\nThe above command should display the following output:\n\n```text\n\n# /Users/netscaleruser/.ansible/collections/ansible_collections\nCollection    Version\n------------- -------\nnetscaler.adc 2.0.x\n```\n\n## Collection Modules Documentation\n\n\u003chttps://netscaler.github.io/ansible-collection-netscaleradc/\u003e\n\n\u003e You can also click on the desired module name in the [supported_modules_matrix.md](supported_modules_matrix.md) file to go to the specific module documentation\n\n## Examples\n\nRefer to the [examples](examples) directory for the sample playbooks.\n\nAlso refer [playbook_anatomy.md](playbook_anatomy.md) for the anatomy of a playbook.\n\n## :key: Authentication\n\n### Authenticate to NetScaler via username and password\n\nEvery 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`.\n\nRefer to the [playbook_anatomy.md](playbook_anatomy.md) and [examples](examples) directory for the sample playbooks.\n\n### Authenticate to NetScaler\n\n#### Password based authentication\n\nEvery 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`.\n\n#### Using `netscaler.adc.module_defaults` group\n\nTo avoid having to specify common parameters for all the modules in every task, you can use the `netscaler.adc.module_defaults` [module defaults](https://docs.ansible.com/ansible/devel/playbook_guide/playbooks_module_defaults.html#module-defaults-groups) group:\n\n\u003e Refer [examples/module_default_args_action_group.yaml](./examples/module_default_args_action_group.yaml) for an example playbook.\n\n#### Passwordless via `nitro_auth_token` parameter (SESSIONID based authentication)\n\nThe 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`.\n\nRefer to the [playbook_anatomy.md](playbook_anatomy.md) and [sessionid_based_authentication_via_login_logout.yaml](examples/sessionid_based_authentication_via_login_logout.yaml) example playbook.\n\n\u003e `login` module requres `username` and `password` parameters to be passed. If you do not wish to pass the username and password, refer below.\n\nYou 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.\n\nThe 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.\n\n\u003e change the `NETSCALER_NSIP`, `NETSCALER_NITRO_USER` and `NETSCALER_NITRO_PASS`\n\n\u003e Install `jq` util if not already installed.\n\n```bash\nexport 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)\necho $NETSCALER_NITRO_AUTH_TOKEN\n```\n\n## NetScaler Console (ADM) as a Proxy Server\n\nRefer to the [NetScaler ADM as an API proxy server](https://docs.netscaler.com/en-us/citrix-application-delivery-management-software/current-release/adm-as-api-proxy-server.html) for more details.\n\nThe collection supports configuring NetScaler Console as a proxy server. This is useful when you have multiple NetScaler ADC appliances and you want to manage them using a single NetScaler Console.\n\nAn example can be found in [examples/netscaler_console_as_proxy_server.yaml](examples/netscaler_console_as_proxy_server.yaml)\n\nAlso, refer to the [playbook_anatomy.md](playbook_anatomy.md#netscaler-console-as-an-api-proxy-server) for more details.\n\n### Steps to configure NetScaler Console as a proxy server\n\n1. Login to NetScaler Console and get the session ID\n2. Use the session ID in the subsequent tasks to configure the managed NetScalers via the NetScaler Console as a proxy server\n3. Logout from the NetScaler Console (optional)\n\n## Supported Ansible Versions\n\nThis collection is tested for Ansible version 2.14 and above.\n\n\u003e Please raise issues at \u003chttps://github.com/netscaler/ansible-collection-netscaleradc/issues\u003e if you face any issues with the collection.\n\n## Features of `netscaler.adc` collection\n\nRefer to the [features_v2.md](features_v2.md) file for the features of the `netscaler.adc` collection.\n\n## Migrating from `citrix.adc` collection to `netscaler.adc` collection\n\n\u003e Both `citrix.adc` and `netscaler.adc` can be used in the same Ansible playbook. However, it is recommended to migrate to `netscaler.adc` collection.\n\nRefer to the [migrating_from_v1_v2.md](migrating_from_v1_v2.md) file for the migration steps.\n\n## Supported Modules in `netscaler.adc` collection\n\nRefer to the [supported_modules_matrix.md](supported_modules_matrix.md) file for the list of supported modules in `netscaler.adc` collection.\n\n## SSH connection module\n\nRefer https://github.com/netscaler/ansible-collection-netscaleradc/issues/309\n\n## Todo list for the `netscaler.adc` collection\n\n- [x] Support for `nitro_auth_token` parameter in all modules.\n- [x] Update supported matrix to have documentation links\n- [x] Add appropriate license to the collection.\n- [x] Upload the collection to Ansible Galaxy.\n- [x] Support configuring ADC with ADM as proxy. Refer to [NetScaler ADM as an API proxy server](https://docs.netscaler.com/en-us/citrix-application-delivery-management-software/current-release/adm-as-api-proxy-server.html) for more details.\n- [ ] Implement SSH connection module - Refer https://github.com/netscaler/ansible-collection-netscaleradc/issues/309\n- [ ] Support for generic modules similar to `citrix.adc.nitro_request` and `citrix.adc.nitro_resource`?\n- [ ] migration tool to convert `citrix.adc` playbooks (including generic `citrix.adc.nitro_request` and `citrix.adc.nitro_resource` modules) to `netscaler.adc` modules\n- [ ] Add more examples\n- [ ] Write a python script which converts examples/playbook.yaml to module's EXAMPLE documentation\n- [ ] Test modules against all NetScaler ADC versions.\n- [x] Test modules againsts ansible versions 2.9+\n- [x] Configure GitHub Actions to automate the collection build and release process.\n- [ ] Configure GitHub Actions to automate the collection testing process.\n- [x] Configure GitHub Actions to automate the collection linting process.\n- [x] Collect NetScaler info (version, etc) and store it in the `facts` dictionary\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetscaler%2Fansible-collection-netscaleradc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetscaler%2Fansible-collection-netscaleradc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetscaler%2Fansible-collection-netscaleradc/lists"}