---

- name: Flap servicegroup
  delegate_to: localhost
  register: result
  check_mode: "{{ check_mode }}"
  netscaler_servicegroup:

    nitro_user: "{{nitro_user}}"
    nitro_pass: "{{nitro_pass}}"
    nsip: "{{nsip}}"
    state: present


    servicegroupname: service-group-1
    servicetype: HTTP
    servicemembers:
      - ip: 10.78.78.78
        port: 80
        weight: 100

    disabled: "{{ item|int % 2 }}"
  with_sequence: count=20
  delay: 1

- name: Flap servicegroup
  delegate_to: localhost
  register: result
  check_mode: "{{ check_mode }}"
  netscaler_servicegroup:

    nitro_user: "{{nitro_user}}"
    nitro_pass: "{{nitro_pass}}"
    nsip: "{{nsip}}"
    state: present


    servicegroupname: service-group-1
    servicetype: HTTP
    servicemembers:
      - ip: 10.78.78.78
        port: 80
        weight: 100

    disabled: "{{ item|int % 2 }}"
  with_sequence: count=20
  delay: 5
