Description
Summary
In maintaining large NetScaler deployments you may have dozens or hundreds of NetScaler systems that you are trying to manage with Ansible. Maintaining an inventory within Ansible can be a duplicative effort when a source of truth for the NetScaler estate already exists within NetScaler Console / NetScaler Console Service.
This feature request is to ask that a custom Ansible inventory plugin be developed to create a NetScaler inventory based upon NetScalers managed in a NetScaler Console / NetScaler Console Service environment.
This could return more than just the hostname/IP of the NetScaler systems as well, the plugin could allow the user to import specific properties into the Ansible inventory.
References:
- https://docs.ansible.com/ansible/latest/plugins/inventory.html
- https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html#developing-inventory-plugins
Issue Type
Feature Idea
Component Name
netscaler_console_inventory
Describe alternatives you've considered
We can create an external process to do the same thing using NetScaler Console APIs today, but it would be more streamlined to see it managed within the NetScaler Ansible collection.
Additional Information
Here is an example of what the plugin might look like to consume
plugin: netscaler.adc.netscaler_console_inventory
console_hostname: 10.65.201.128
console_service: false
username: administrator
password: password
validate_certs: false
hostnames:
- 'hostname'
properties:
- 'version'
- 'device_family'
- 'gateway'
- 'vpx_on_cloud'
- 'ha_master_state'
- 'ha_ip_address'
- 'hostname'
- 'vm_state'
- 'host_ip_address'
with_tags: true
keyed_groups:
- key: ha_master_state
prefix: "netscaler_ha_state_"
separator: ""
with_nested_properties: true
filters:
- "instance_state is 'Up'"