Skip to content

Commit a434193

Browse files
Merge branch 'main' into dependabot/github_actions/ossf/scorecard-action-2.4.0
2 parents fb85769 + e5df82f commit a434193

999 files changed

Lines changed: 14724 additions & 361 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ jobs:
2727
steps:
2828
# Important: This sets up your GITHUB_WORKSPACE environment variable
2929
- uses: actions/checkout@v4
30+
- name: Set up Python 3.11
31+
uses: actions/setup-python@v6
32+
with:
33+
python-version: 3.11
34+
- name: Install ansible-lint
35+
run: python -m pip install ansible-lint
3036
- name: Run ansible-lint
31-
uses: ansible/ansible-lint@main
37+
run: ansible-lint
3238
- name: Upload SARIF file
3339
uses: github/codeql-action/upload-sarif@v3
3440
with:

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ jobs:
115115
python-version:
116116
- 3.11
117117
netscaler-version:
118-
- 13.1-49.15
119-
- 14.1-4.42
118+
- 13.1-59.19
119+
- 14.1-43.50
120120
steps:
121121
- name: Checkout the repo
122122
uses: actions/checkout@v4

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.vscode/
22

3-
tools/
43
issues/
54

65
plugins/module_utils/test.ipynb

CHANGELOG.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [2.11.0] - 2025-10-31
11+
12+
# Added
13+
14+
- Supporting dynamicRouting Protocols in netscaler.adc collections
15+
16+
# Fixed
17+
18+
- corrected sslhsmkey behaviour in collection
19+
- correcting entries in runtime.yml to include new supported resources in module_defaults
20+
21+
# Fixed
22+
23+
- Resolved error with `ssh_netscaler_adc` connection plugin with newer versions of ansible
24+
25+
## [2.10.1] - 2025-09-16
26+
27+
# Fixed
28+
29+
- Resolved error while importing new SSL certificate with duplicate primary key error
30+
31+
## [2.10.0] - 2025-08-22
32+
33+
### Added
34+
35+
- Added migration tool to convert `citrix.adc` module playbooks to `netscaler.adc`.
36+
37+
### Fixed
38+
39+
- Added option to skip non-updatable resources or fail explicitly
40+
- Removal of basic authentication from Netscaler ADC Ansible collection
41+
- Fixed idempotency issue in rename operations
42+
- Fixed GET request URL for global bindings to include type query parameter
43+
1044
## [2.9.2] - 2025-06-25
1145

1246
### Fixed
@@ -177,7 +211,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
177211
### Added
178212

179213
- Initial Release
180-
[unreleased]: https://github.com/netscaler/ansible-collection-netscaleradc/compare/2.9.2...HEAD
214+
215+
[unreleased]: https://github.com/netscaler/ansible-collection-netscaleradc/compare/2.11.0...HEAD
216+
[2.11.0]: https://github.com/netscaler/ansible-collection-netscaleradc/compare/2.10.1...2.11.0
217+
[2.10.1]: https://github.com/netscaler/ansible-collection-netscaleradc/compare/2.10.0...2.10.1
218+
[2.10.0]: https://github.com/netscaler/ansible-collection-netscaleradc/compare/2.9.2...2.10.0
181219
[2.9.2]: https://github.com/netscaler/ansible-collection-netscaleradc/compare/2.9.1...2.9.2
182220
[2.9.1]: https://github.com/netscaler/ansible-collection-netscaleradc/compare/2.9.0...2.9.1
183221
[2.9.0]: https://github.com/netscaler/ansible-collection-netscaleradc/compare/2.8.0...2.9.0

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,19 @@ fmt:
22
autoflake plugins/modules/*.py
33
autoflake plugins/module_utils/*.py
44
autoflake --recursive tests/
5+
autoflake tools/migrationtool/*.py
56

67
black plugins/modules/*.py
78
black plugins/module_utils/*.py
89
black tests/
10+
black tools/migrationtool/*.py
911

1012
isort plugins/modules/*.py
1113
isort plugins/module_utils/*.py
1214
isort tests/
15+
isort tools/migrationtool/*.py
1316

14-
yamlfmt .
17+
yamlfmt $(shell find . -name '*.yml' -o -name '*.yaml')
1518

1619
install:
1720
ansible-galaxy collection install . --force
@@ -39,7 +42,7 @@ build:
3942
ansible-galaxy collection build --force
4043

4144
galaxy_importer: build
42-
python3 -m galaxy_importer.main netscaler-adc-2.9.1.tar.gz
45+
python3 -m galaxy_importer.main netscaler-adc-2.11.0.tar.gz
4346

4447
# build_docs:
4548
# rm -rf _built_docs
@@ -60,7 +63,7 @@ galaxy_importer: build
6063
# skip the playbook which contains "password" in the file name
6164
run_examples:
6265
@for playbook in examples/*.yaml; do \
63-
if [[ $$playbook == *"password"* || $$playbook == *"login"* || $$playbook == *"logout"* || $$playbook == *"route"* || $$playbook == locationfile.yaml || $$playbook == nsip6.yaml || $$playbook == hanode.yaml ]]; then \
66+
if [[ $$playbook == *"password"* || $$playbook == *"login"* || $$playbook == *"logout"* || $$playbook == *"route"* || $$playbook == *"locationfile.yaml"* || $$playbook == *"nsip6.yaml"* || $$playbook == *"hanode.yaml"* ]]; then \
6467
continue; \
6568
fi; \
6669
echo "Running $$playbook"; \

README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,62 @@ export NETSCALER_NITRO_AUTH_TOKEN=$(curl -X POST -H "Content-Type:application/js
157157
echo $echo $NETSCALER_NITRO_AUTH_TOKEN
158158
```
159159

160+
### Migration Tool
161+
162+
The collection includes a migration tool to help convert existing Ansible playbooks from the legacy `citrix.adc` collection to the new `netscaler.adc` collection format. This tool simplifies the transition from legacy automation to the updated collection.
163+
164+
#### Features
165+
166+
- **Module Mapping**: Automatically converts `citrix.adc` modules to `netscaler.adc` modules
167+
- **NITRO Request Conversion**: Transforms `citrix_adc_nitro_request` tasks to specific resource modules
168+
- **State Conversion**: Maps legacy operations (`add`, `update`, `delete`) to appropriate state values
169+
- **Credential Preservation**: Maintains authentication parameters and playbook structure
170+
- **YAML Structure Preservation**: Keeps task names, variables, and organization intact
171+
172+
#### Usage
173+
174+
```bash
175+
# Basic conversion
176+
python3 migrationtool/convert_yaml.py -i legacy_playbook.yaml -o migrated_playbook.yaml
177+
178+
# With verbose output
179+
python3 migrationtool/convert_yaml.py -i legacy_playbook.yaml -o migrated_playbook.yaml -v
180+
```
181+
182+
#### Example Conversion
183+
184+
**Before (Legacy citrix.adc):**
185+
```yaml
186+
- name: Configure LB vserver
187+
citrix_adc_nitro_request:
188+
nsip: "{{ nsip }}"
189+
nitro_user: "{{ nitro_user }}"
190+
nitro_pass: "{{ nitro_pass }}"
191+
operation: add
192+
resource: lbvserver
193+
name: my_lb_vserver
194+
attributes:
195+
servicetype: HTTP
196+
ipv46: 10.10.10.10
197+
port: 80
198+
```
199+
200+
**After (New netscaler.adc):**
201+
```yaml
202+
- name: Configure LB vserver
203+
netscaler.adc.lbvserver:
204+
nsip: "{{ nsip }}"
205+
nitro_user: "{{ nitro_user }}"
206+
nitro_pass: "{{ nitro_pass }}"
207+
state: present
208+
name: my_lb_vserver
209+
servicetype: HTTP
210+
ipv46: 10.10.10.10
211+
port: 80
212+
```
213+
214+
For detailed migration tool documentation, usage examples, and troubleshooting, refer to the [Migration Tool README](https://github.com/netscaler/ansible-collection-netscaleradc/blob/main/tools/migrationtool/README.md).
215+
160216
### Invocation
161217

162218
The credentials of the netscaler can be provided either in the playbook by hardcoding or defining in a inventory.ini file.
@@ -183,9 +239,9 @@ For external contributions, refer the [guidelines](https://github.com/netscaler/
183239

184240
## Support
185241

186-
For issues : https://github.com/netscaler/ansible-collection-netscaleradc/issues
242+
As Red Hat Ansible Certified Content, this collection is entitled to support through the Ansible Automation Platform (AAP) using the **Create issue** button on the top right corner. If a support case cannot be opened with Red Hat and the collection has been obtained either from Galaxy or GitHub, we strongly encourage engaging with the NetScaler and Ansible community. You can contribute to the collection or seek assistance via the [NetScaler's Official GitHub Repository](https://github.com/netscaler/ansible-collection-netscaleradc) or connect with other Ansible users on the [Ansible Forum](https://forum.ansible.com/).
187243

188-
For discussions or feature requests: https://github.com/netscaler/ansible-collection-netscaleradc/discussions
244+
For feature requests: https://github.com/netscaler/ansible-collection-netscaleradc/discussions
189245

190246
## Release Notes
191247

examples/accesslist.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- name: Configure accessslist
3+
hosts: localhost
4+
tasks:
5+
- name: Create accesslist
6+
delegate_to: localhost
7+
netscaler.adc.accesslist:
8+
state: present
9+
id: 1
10+
remark: "Allow all traffic"
11+
rules:
12+
- action: permit
13+
address: 2.1.1.21
14+
wildcard: "0.0.0.255"

examples/bfdinterface.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
- name: Configure bfdinterface
3+
hosts: localhost
4+
tasks:
5+
- name: Create bfdinterface
6+
delegate_to: localhost
7+
netscaler.adc.bfdinterface:
8+
state: present
9+
name: vlan0
10+
passive: true
11+
interval: 752
12+
minrx: 501
13+
multiplier: 3

examples/bgprouter.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
- name: Sample bgprouter playbook
3+
hosts: localhost
4+
gather_facts: false
5+
tasks:
6+
- name: Configure bgprouter
7+
delegate_to: localhost
8+
netscaler.adc.bgprouter:
9+
state: present
10+
11+
localAS: 122
12+
routerId: "2.2.2.2"
13+
afParams:
14+
- addressFamily: "ipv4"
15+
redistribute:
16+
- protocol: "static"
17+
routeMap: "test"
18+
- addressFamily: "ipv6"
19+
neighbor:
20+
- address: "44.1.1.33"
21+
remoteAS: 300
22+
ASOriginationInterval: 11
23+
advertisementInterval: 34
24+
updateSource: "vlan101"
25+
singlehopBfd: false
26+
multihopBfd: false
27+
afParams:
28+
- addressFamily: "ipv4"
29+
routeMap:
30+
- name: "test"
31+
direction: "out"
32+
- addressFamily: "ipv6"

examples/iproute.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- name: Configure bfdinterface
3+
hosts: localhost
4+
tasks:
5+
- name: Create bfdinterface
6+
delegate_to: localhost
7+
netscaler.adc.iproute:
8+
state: present
9+
addressFamily: ipv4
10+
prefix: 33.1.1.0
11+
prefixLength: 24
12+
nextHop: 10.106.210.24

0 commit comments

Comments
 (0)