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?





-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3c4e4b88-cc2f-48b5-af4c-6db4d6ca2b1do%40googlegroups.com.

Reply via email to