GithubHelp home page GithubHelp logo

Comments (5)

chiradeep avatar chiradeep commented on June 18, 2024

Can you show the playbook that causes the error?

from ansible-collection-netscaleradc.

aelrayess avatar aelrayess commented on June 18, 2024

---
- name: Create Load Balanced Server
hosts: localhost
gather_facts: False
vars:
ns_user: ansible
ns_password: XXxxxx!!
ns_ip: 192.168.121.4
service_group_name: service-group-1
web_servers:
- ip: 192.168.122.24
port: 80
weight: 50
- ip: 192.168.122.25
port: 80
weight: 50
lb_vserver_ip: 192.168.122.30
monitor_name: monitor_1

tasks:
- name: Set lb monitor
netscaler_lb_monitor:
nsip: "{{ ns_ip }}"
nitro_user: "{{ ns_user }}"
nitro_pass: "{{ ns_password }}"
validate_certs: False
state: present
monitorname: "{{ monitor_name }}"
type: HTTP-INLINE
action: DOWN
respcode: ['400']
reverse: yes

- name: Setup http service group
netscaler_servicegroup:
nsip: "{{ ns_ip }}"
nitro_user: "{{ ns_user }}"
nitro_pass: "{{ ns_password }}"
validate_certs: False
state: present
servicegroupname: "{{ service_group_name }}"
servicetype: HTTP
servicemembers: "{{ web_servers}}"
monitorbindings:
- monitorname: "{{ monitor_name }}"

- name: Create load balancing vserver bound to servicegroup
netscaler_lb_vserver:
nsip: "{{ ns_ip }}"
nitro_user: "{{ ns_user }}"
nitro_pass: "{{ ns_password }}"
validate_certs: False
state: present
name: lb_vserver_1
servicetype: HTTP
ipv46: "{{ lb_vserver_ip }}"
port: 80
servicegroupbindings:
- servicegroupname: "{{ service_group_name }}"

from ansible-collection-netscaleradc.

aelrayess avatar aelrayess commented on June 18, 2024

I am trying it against netscaler vpx 12.0-41.16

from ansible-collection-netscaleradc.

giorgos-nikolopoulos avatar giorgos-nikolopoulos commented on June 18, 2024

I could not reproduce the error.

I ran the playbook against the same NS version with you with both python2 and python3 but I did not see the error you mention.

The only error I got was a missing weight value from the monitorbindings entry.

Here is the playbook I ran.

---
- name: Create Load Balanced Server
  hosts: localhost
  gather_facts: False
  vars:
    ns_user: nsroot
    ns_password: nsroot
    ns_ip: 10.78.60.202
    service_group_name: service-group-1
    web_servers:
      - ip: 192.168.122.24
        port: 80
        weight: 50
      - ip: 192.168.122.25
        port: 80
        weight: 50
    lb_vserver_ip: 192.168.122.30
    monitor_name: monitor_1

  tasks:
  - name: Set lb monitor
    netscaler_lb_monitor:
      nsip: "{{ ns_ip }}"
      nitro_user: "{{ ns_user }}"
      nitro_pass: "{{ ns_password }}"
      validate_certs: False
      state: present
      monitorname: "{{ monitor_name }}"
      type: HTTP-INLINE
      action: DOWN
      respcode: ['400']
      reverse: yes

  - name: Setup http service group
    netscaler_servicegroup:
      nsip: "{{ ns_ip }}"
      nitro_user: "{{ ns_user }}"
      nitro_pass: "{{ ns_password }}"
      validate_certs: False
      state: present
      servicegroupname: "{{ service_group_name }}"
      servicetype: HTTP
      servicemembers: "{{ web_servers }}"
      monitorbindings:
      - monitorname: "{{ monitor_name }}"
        weight: 100

  - name: Create load balancing vserver bound to servicegroup
    netscaler_lb_vserver:
      nsip: "{{ ns_ip }}"
      nitro_user: "{{ ns_user }}"
      nitro_pass: "{{ ns_password }}"
      validate_certs: False
      state: present
      name: lb_vserver_1
      servicetype: HTTP
      ipv46: "{{ lb_vserver_ip }}"
      port: 80
      servicegroupbindings:
      - servicegroupname: "{{ service_group_name }}"

The only changes I made are the login credentials to the Netscaler node and I added the missing weight value.

Try to install the latest version of the modules from this repo and run the playbook again.

If you encounter an error please run the playbook with -vvv and record the output of the command to help us troubleshoot the issue.

from ansible-collection-netscaleradc.

aelrayess avatar aelrayess commented on June 18, 2024

thank you, the weight did the trick :) it is now working perfectly

from ansible-collection-netscaleradc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.