Skip to content

Commit 658c00b

Browse files
author
Shiva Shankar Vaddepally
committed
Changes done correct datatype issues in OpenAPi which is causing idempotency issues due to mismatch in payload and responseload in APIs
1 parent c8c77cb commit 658c00b

1,079 files changed

Lines changed: 6711 additions & 4588 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.

README-new.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# NetScaler ADC Collection
2+
3+
## Description
4+
The collection provides Ansible modules to configure and manage NetScaler ADC appliances. The modules are written using the [NITRO API](https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release.html). The modules are idempotent and can be used to configure the NetScaler ADC appliances in a declarative manner.
5+
6+
## Requirements
7+
8+
### Ansible version compatibility
9+
Tested with Ansible Core >=2.15 versions.
10+
11+
### Python version compatibility
12+
Tested with Python >=3.11
13+
14+
## Installation
15+
16+
### via Ansible-galaxy
17+
The netscaler.adc collection can be installed with the Ansible Galaxy command-line tool:
18+
19+
```bash
20+
ansible-galaxy collection install netscaler.adc
21+
```
22+
23+
### via github (to have the latest updated which are yet to be released in ansible-galaxy)
24+
25+
```bash
26+
ansible-galaxy collection install "git+https://github.com/netscaler/ansible-collection-netscaleradc.git" [--force]
27+
```
28+
29+
> `--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.
30+
31+
To verify the installation, run the following command:
32+
33+
```bash
34+
ansible-galaxy collection list netscaler.adc
35+
```
36+
37+
The above command should display the below output:
38+
39+
```text
40+
41+
# /Users/netscaleruser/.ansible/collections/ansible_collections
42+
Collection Version
43+
------------- -------
44+
netscaler.adc 2.8.x
45+
```
46+
47+
## Usecases
48+
49+
The modules can be called by their Fully Qualified Collection Name (FQCN) such as `netscaler.adc.lbvserver`, or by their short name `netscaler.adc` if the collection is listed under the playbook's `collections` attribute:
50+
51+
### Usecase by FQCN
52+
```yaml
53+
---
54+
- name: Sample lbvserver playbook
55+
hosts: demo_netscalers
56+
gather_facts: false
57+
tasks:
58+
- name: Configure lbvserver
59+
delegate_to: localhost
60+
netscaler.adc.lbvserver:
61+
nsip: "{{ nsip }}"
62+
nitro_user: "{{ nitro_user }}"
63+
nitro_pass: "{{ nitro_pass }}"
64+
nitro_protocol: "{{ nitro_protocol }}"
65+
validate_certs: false
66+
save_config: false
67+
state: present
68+
name: lb_dns_01
69+
servicetype: HTTP
70+
```
71+
72+
### Usecase by declaring collection
73+
74+
```yaml
75+
---
76+
- name: Sample lbvserver playbook
77+
hosts: demo_netscalers
78+
gather_facts: false
79+
collections:
80+
- netscaler.adc
81+
tasks:
82+
- name: Configure lbvserver
83+
delegate_to: localhost
84+
lbvserver:
85+
nsip: "{{ nsip }}"
86+
nitro_user: "{{ nitro_user }}"
87+
nitro_pass: "{{ nitro_pass }}"
88+
nitro_protocol: "{{ nitro_protocol }}"
89+
validate_certs: false
90+
save_config: false
91+
name: lb_dns_01
92+
servicetype: HTTP
93+
94+
```
95+
### Usecase by `netscaler.adc.module_default` group
96+
97+
```yaml
98+
---
99+
- name: Sample Playbook to use module_defaults to specify common arguments
100+
hosts: localhost
101+
gather_facts: false
102+
module_defaults:
103+
group/netscaler.adc.default_args:
104+
nsip: 10.10.10.10
105+
nitro_user: nsroot
106+
nitro_pass: verysecretpassword
107+
nitro_protocol: http
108+
validate_certs: false
109+
save_config: false
110+
tasks:
111+
- name: Sample Task | ipset
112+
delegate_to: localhost
113+
netscaler.adc.lbvserver:
114+
name: lb_dns_01
115+
servicetype: HTTP
116+
```
117+
118+
### Authentication
119+
120+
#### Authenticate to NetScaler via username and password
121+
122+
Every module in the collection requires the user to authenticate to the NetScaler ADC appliance. To authenticate, provide the `nsip`, `nitro_user` and `nitro_pass` parameters directly or set them using environment variables `NETSCALER_NSIP`, `NETSCALER_NITRO_USER` and `NETSCALER_NITRO_PASS`.
123+
124+
Refer to the [playbook_anatomy.md](https://github.com/netscaler/ansible-collection-netscaleradc/blob/c8c77cb4cb3905af8b90992bc55519f9a513ed08/playbook_anatomy.md#L4) and [examples](https://github.com/netscaler/ansible-collection-netscaleradc/tree/c8c77cb4cb3905af8b90992bc55519f9a513ed08/examples) directory for the sample playbooks.
125+
126+
127+
### Invocation
128+
129+
The credentials of the netscaler can be provided either in the playbook by hardcoding or defining in a inventory.ini file.
130+
131+
#### Execution command when hosts are declared in playbook:
132+
133+
```
134+
ansible-playbook playbook.yaml [--verbose]
135+
```
136+
137+
#### Execution command hosts are declared in an inventory file:
138+
139+
```
140+
ansible-playbook playbook.yaml -i inventory.ini [--verbose]
141+
```
142+
143+
## Testing
144+
The collection is tested using Github Actions. To know more about testing, please refer the [link]([https://github.com/netscaler/ansible-collection-netscaleradc/.github/workflow) to know more.
145+
146+
## Contributing
147+
148+
For external contributions, refer the [guidelines](https://github.com/netscaler/ansible-collection-netscaleradc/blob/c8c77cb4cb3905af8b90992bc55519f9a513ed08/CONTRIBUTING.md#L4).
149+
150+
## Support
151+
For issues : [Issues](https://github.com/netscaler/ansible-collection-netscaleradc/issues)
152+
153+
For discussions or feature requests: [Discussions or feature request](https://github.com/netscaler/ansible-collection-netscaleradc/issues)
154+
155+
156+
## Release Notes
157+
158+
Please refer to the [link](https://github.com/netscaler/ansible-collection-netscaleradc/blob/0438f3253b2eca084760984b6564a0a7964a128d/CHANGELOG.md) for the release notes.
159+
160+
## License Information
161+
162+
The collection uses MIT License. You can refer the [link](https://github.com/netscaler/ansible-collection-netscaleradc/blob/0438f3253b2eca084760984b6564a0a7964a128d/LICENSE) to view license information.

examples/(null).yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
- name: Sample (null) playbook
3+
hosts: demo_netscalers
4+
gather_facts: false
5+
tasks:
6+
- name: Configure (null)
7+
delegate_to: localhost
8+
netscaler.adc.(null):
9+
state: present
10+
command: rm /var/netscaler/ssl/crl.pem

examples/aaagroup.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
delegate_to: localhost
88
netscaler.adc.aaagroup:
99
state: present
10-
groupname: External
10+
groupname: clt_scrgrp1

examples/aaagroup_vpnsessionpolicy_binding.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
delegate_to: localhost
88
netscaler.adc.aaagroup_vpnsessionpolicy_binding:
99
state: present
10-
groupname: External
11-
policy: External_receiver_session_pol
12-
priority: '110'
13-
gotopriorityexpression: NEXT
10+
groupname: group1
11+
policy: vpn_sespol2
12+
priority: '15'

examples/aaaldapparams.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
delegate_to: localhost
88
netscaler.adc.aaaldapparams:
99
state: present
10-
sectype: PLAINTEXT
10+
serverip: 10.102.39.101

examples/aaaparameter.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77
delegate_to: localhost
88
netscaler.adc.aaaparameter:
99
state: present
10-
maxaaausers: '4294967295'
11-
aaasessionloglevel: DEBUG
12-
aaadloglevel: ALERT
10+
maxaaausers: '5'

examples/appflowaction.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
delegate_to: localhost
88
netscaler.adc.appflowaction:
99
state: present
10-
name: af_action_log_10.189.64.10_nop
10+
name: af_action_v1_10.102.233.21
1111
collectors:
12-
- af_collector_logstream_10.189.64.10
12+
- af_collector_10.102.233.21
13+
clientsidemeasurements: ENABLED

examples/appflowcollector.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
delegate_to: localhost
88
netscaler.adc.appflowcollector:
99
state: present
10-
name: af_collector_logstream_10.189.64.10
11-
ipaddress: 10.189.64.10
12-
port: 5557
13-
transport: logstream
10+
name: af_collector_10.102.233.21
11+
ipaddress: 10.102.233.21

examples/appflowparam.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@
99
state: present
1010
templaterefresh: 3600
1111
httpurl: ENABLED
12+
httpcookie: ENABLED
13+
httpreferer: ENABLED
1214
httpmethod: ENABLED
1315
httphost: ENABLED
1416
httpuseragent: ENABLED
1517
httpcontenttype: ENABLED
16-
cacheinsight: ENABLED
17-
httpquerywithurl: ENABLED
18-
metrics: ENABLED
19-
events: ENABLED
20-
observationpointid: '843103498'

examples/appflowpolicy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
delegate_to: localhost
88
netscaler.adc.appflowpolicy:
99
state: present
10-
name: af_policy_act_log_10.189.64.10
10+
name: af_policy_v1_10.102.233.21
1111
rule: 'true'
12-
action: af_action_log_10.189.64.10_nop
12+
action: af_action_v1_10.102.233.21

0 commit comments

Comments
 (0)