Skip to content

Commit 71287b1

Browse files
author
Shiva Shankar Vaddepally
committed
more info is added
Signed-off-by: Shiva Shankar Vaddepally <[email protected]>
1 parent e0cd25a commit 71287b1

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
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.
66

7+
78
## Requirements
89

910
### Ansible version compatibility
@@ -30,7 +31,7 @@ ansible-galaxy collection install netscaler.adc
3031
ansible-galaxy collection install "git+https://github.com/netscaler/ansible-collection-netscaleradc.git" [--force]
3132
```
3233

33-
`--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.
34+
> `--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.
3435
3536
To verify the installation, run the following command:
3637

@@ -47,7 +48,6 @@ Collection Version
4748
------------- -------
4849
netscaler.adc 2.8.x
4950
```
50-
5151
## Usecases
5252

5353
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:
@@ -120,14 +120,42 @@ The modules can be called by their Fully Qualified Collection Name (FQCN) such a
120120
name: lb_dns_01
121121
servicetype: HTTP
122122
```
123+
### NetScaler Console (ADM) as a Proxy Server
124+
125+
The 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.
126+
127+
An example can be found in [examples/netscaler_console_as_proxy_server.yaml](https://github.com/netscaler/ansible-collection-netscaleradc/blob/main/examples/netscaler_console_as_proxy_server.yaml).
128+
129+
Refer to the [NetScaler ADM as an API proxy server](https://docs.netscaler.com/en-us/netscaler-application-delivery-management-software/current-release/adm-as-api-proxy-server.html) for more details.
130+
131+
### Examples and playbook anatomy
132+
Refer to the [sample_playboook](https://github.com/netscaler/ansible-collection-netscaleradc/tree/main/examples) and [playbook_anatomy.md](https://github.com/netscaler/ansible-collection-netscaleradc/blob/main/playbook_anatomy.md).
133+
134+
135+
### SSH_connections
136+
137+
Refer to [SSH_connections examples](https://github.com/netscaler/ansible-collection-netscaleradc/tree/main/examples/ssh_connections) to know how `ansible.builtins.` plugins can be used to configure the NetScaler ADC.
123138

124139
### Authentication
125140

126141
#### Authenticate to NetScaler via username and password
127142

128143
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`.
129144

130-
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.
145+
Refer to the [playbook_anatomy.md](https://github.com/netscaler/ansible-collection-netscaleradc/blob/main/playbook_anatomy.md) and [sessionid_based_authentication_via_login_logout.yaml](https://github.com/netscaler/ansible-collection-netscaleradc/blob/main/examples/sessionid_based_authentication_via_login_logout.yaml) example playbook.
146+
147+
> `login` module requires `username` and `password` parameters to be passed. If you do not wish to pass the username and password, refer below.
148+
149+
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.
150+
151+
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.
152+
153+
> Note: Change the `NETSCALER_NSIP`, `NETSCALER_NITRO_USER` and `NETSCALER_NITRO_PASS`. Install `jq` util if not already installed.
154+
155+
```bash
156+
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)
157+
echo $echo $NETSCALER_NITRO_AUTH_TOKEN
158+
```
131159

132160
### Invocation
133161

0 commit comments

Comments
 (0)