Error while running Netscaler Playbook

Hello,

I have the following playbook to create GLSBs for Netscaler devices using Ansible:

  • hosts: netscaler

gather_facts: False

vars:

state: present

gslb:

name: test_gslb

vserver:

  • port: ‘80’

description: ‘Generic service running on 80’

type: ‘HTTP’

method: ‘ROUNDROBIN’

backupLBMethod: ‘NONE’

servicetype: TCP

backupVServer: test_backup

tolerance: ‘0’

tasks:

  • name: Test GSLB

block:

  • local_action:

module: netscaler_gslb_vserver

nsip: “{{ inventory_hostname }}”

nitro_user: “{{ nitro_user }}”

nitro_pass: “{{ nitro_pass }}”

nitro_protocol: “https”

state: “{{ state }}”

name: “{{ gslb.name }}”

validate_certs: “{{ validate_certs }}”

servicetype: “{{ item.servicetype }}”

backupVServer: “{{ item.backupVServer }}”

with_items: “{{ gslb.vserver }}”

I am looking to replicate the following Netscaler Load Balancer command as an Ansible Task:

set gslb vserver gvs_vip -backupVServer gvs_backup-vip -lbMethod ROUNDROBIN -backupLBMethod NONE -tolerance 0

When I ran the Ansible Playbook, I get the following error:

ansible-playbook main.yml -i inventory.txt

failed: [x.x.x.x → localhost] (item={u’servicetype’: u’TCP’, u’description’: u’Generic service running on 80’, u’backupLBMethod’: u’NONE’, u’backupVServer’: u’test_backup’, u’port’: u’80’, u’tolerance’: u’0’, u’type’: u’HTTP’, u’method’: u’ROUNDROBIN’}) => {“changed”: false, “item”: {“backupLBMethod”: “NONE”, “backupVServer”: “test_backup”, “description”: “Generic service running on 80”, “method”: “ROUNDROBIN”, “port”: “80”, “servicetype”: “TCP”, “tolerance”: “0”, “type”: “HTTP”}, “msg”: “Unsupported parameters for (netscaler_gslb_vserver) module: backupVServer Supported parameters include: appflowlog, backuplbmethod, comment, considereffectivestate, cookie_domain, disabled, disableprimaryondown, dnsrecordtype, domain_bindings, domainname, dynamicweight, lbmethod, mir, name, netmask, nitro_pass, nitro_protocol, nitro_timeout, nitro_user, nsip, persistenceid, persistencetype, persistmask, save_config, service_bindings, servicetype, sobackupaction, somethod, sopersistence, sopersistencetimeout, sothreshold, state, timeout, tolerance, v6netmasklen, v6persistmasklen, validate_certs”}

By looking at the Ansible netscaler_gslb_vserver module, I see that backupVServer is not in the list of available parameters, hence the error. Is there any way to run the Netscaler command that I specified as a task or just have Ansible run the command? Or is it not yet supported?

Hi

This is a 3rd party module that isn’t part of the standard ansible distribution.
https://developer-docs.citrix.com/projects/netscaler-ansible-modules/en/latest/modules/netscaler-gslb-vserver-module/#support

However, without knowing about those module(s) at all, the error is pretty self explanatory: you provided an unsupported module parameter.
See https://developer-docs.citrix.com/projects/netscaler-ansible-modules/en/latest/modules/netscaler-gslb-vserver-module/

Hi Dick,

thanks for the response. I’ll reach out to support.