piolink_yhoh.pask_test.pask_slb (1.0.5) — module

Configuring SLB setting

| "added in version" 2.10 of piolink_yhoh.pask_test"

Authors: Yohan Oh (@piolink-yhoh)

Install collection

Install with ansible-galaxy collection install piolink_yhoh.pask_test:==1.0.5


Add to requirements.yml

  collections:
    - name: piolink_yhoh.pask_test
      version: 1.0.5

Description

You can configure SLB setting of the PAS-K.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Create slb Test
  hosts: all
  connection: local
  collections:
  - piolink_yhoh.pask_test

  tasks:
  - name: Create slb
    pask_slb:
      prest_ip: "{{ansible_host}}"
      prest_port: "{{ansible_port}}"
      user_id: "{{user_id}}"
      user_pw: "{{user_pw}}"
      name: "slb_test"
      vip:
          - { ip: "172.118.10.111", protocol: { protocol: "icmp", vport: "1231" }}
          - { ip: "172.118.10.122" }
      priority: "25"
      nat_mode: "dnat"
      lb_method: "wlc"
      real:
          - { id: "10", rport: "5512", status: "enable", graceful_shutdown: "disable" }
          - { id: "14" }
      health_check:
          - "100"
          - "200"
      slow_start:
          rate: "7"
          timer: "444"
      sticky:
          time: "4121"
          source_subnet: "255.255.255.0"
      session_sync: "persistence"
      fail_skip: "inact"
      keep_backup:
          service: "disable"
          real: "disable"
      status: "disable"
      state: "present"

  - name: Delete slb
    pask_slb:
        prest_ip: "{{ansible_host}}"
        prest_port: "{{ansible_port}}"
        user_id: "{{user_id}}"
        user_pw: "{{user_pw}}"
        name: "slb_test"
        state: "absent"

Inputs

    
vip:
    description:
    - Enter virtual IP address, protocol and port number.
    elements: dict
    suboptions:
      ip:
        description:
        - Enter the virtual IP address of the slb service.
        required: true
        type: str
      protocol:
        description:
        - Enter the protocol and port number.
        suboptions:
          protocol:
            description:
            - Enter the protocol of the slb service.
            required: true
            type: str
          vport:
            description:
            - Enter the port number of the slb service.
            type: str
        type: dict
    type: list

name:
    description:
    - Enter the service name.
    required: true
    type: str

real:
    description:
    - Enter the real server information for the slb service.
    elements: dict
    suboptions:
      graceful_shutdown:
        description:
        - Enter whether to use graceful shutdown option of the real server.
        - The value should be 'enable' or 'disable'.
        type: str
      id:
        description:
        - Enter the real server id.
        required: true
        type: str
      rport:
        description:
        - Enter the real server port number.
        type: str
      status:
        description:
        - Enter whether to use real server option.
        - The value should be 'enable' or 'disable'.
        type: str
    type: list

state:
    description:
    - Enter the status of this configuration.
    - If you want to delete this PAS-K configuration, enter 'absent',
    - otherwise, you can enter present or you don't have to do enter anything.
    type: str

backup:
    description:
    - Enter the backup service of the slb service.
    type: str

filter:
    description:
    - Enter filter information for slb service.
    elements: dict
    suboptions:
      dip:
        description:
        - Enter the destination ip address and the number of netmask bits to be used as
          the filtering condition.
        type: str
      dport:
        description:
        - Enter the destination port number to be used as the filtering condition.
        type: str
      id:
        description:
        - Enter the filter id.
        required: true
        type: str
      protocol:
        description:
        - Enter the protocol to be used as the filtering condition.
        - The value should be 'tcp', 'udp', 'icmp' or 'all'.
        type: str
      sip:
        description:
        - Enter the source ip address and the number of netmask bits to  be used as the
          filtering condition.
        type: str
      sport:
        description:
        - Enter the source port number to be used as the filtering condition.
        type: str
      status:
        description:
        - Enter whether to use filter for slb.
        - The value should be 'enable' or 'disable'.
        type: str
      type:
        description:
        - Enter type of the filter.
        - The value should be 'include' or 'exclude'.
        type: str
    type: list

snatip:
    description:
    - Enter source nat ip address.
    - If you enter 'lan-to-lan' as a nat-mode, you can set this value.
    type: str

status:
    description:
    - Enter whether to use the slb service.
    - The value should be 'enable' or 'disable'.
    type: str

sticky:
    description:
    - Enter the sticky information for slb server.
    suboptions:
      source_subnet:
        description:
        - Enter the subnet source ip address to apply persistent connection.
        type: str
      time:
        description:
        - Enter the sticky timeout.
        type: str
    type: dict

user_id:
    description:
    - Enter the PAS-K user id.
    required: true
    type: str

user_pw:
    description:
    - Enter the PAS-K user password.
    required: true
    type: str

nat_mode:
    description:
    - Enter the nat mode of the slb service.
    - The value should be 'both-nat', 'dnat', 'dsr', 'l3dsr-iptunnel' or 'lan-to-lan'
    type: str

prest_ip:
    description:
    - Enter the PAS-K IP address.
    required: true
    type: str

priority:
    description:
    - Enter the priority of the slb service.
    type: str

fail_skip:
    description:
    - Enter how to use fail-skip.
    - The value should be 'all', 'inact' or 'none'.
    type: str

lb_method:
    description:
    - Enter the lb-method of the slb service.
    - The value should be 'dp', 'lc', 'lc-ss', 'lc-total', 'rr', 'sh', 'sh-port', 'srh',
      'swrr', 'wlc', 'wlc-ss', 'wlc-total', 'wrr' or 'wsh'
    type: str

lan_to_lan:
    description:
    - Enter the IP band of servers acting as clients in the LAN area.
    - If you enter 'lan-to-lan' as a nat-mode, you can set this value.
    type: str

prest_port:
    description:
    - Enter the port number of PAS-K used for PREST-API.
    required: true
    type: str

slow_start:
    description:
    - Enter the slow-start information.
    suboptions:
      rate:
        description:
        - Enter the slow-start rate.
        - If you enter 'lc-ss' or 'wlc-ss' as a lb-method, you can set this value.
        type: str
      timer:
        description:
        - Enter the slow-start timer.
        - If you enter 'lc-ss' or 'wlc-ss' as a lb-method, you can set this value.
        type: str
    type: dict

keep_backup:
    description:
    - Enter backup information.
    type: str

health_check:
    description:
    - Enter the health-check id.
    elements: str
    type: list

session_sync:
    description:
    - Enter how to use session-sync.
    - The value should be 'all', 'none' or 'persistence'.
    type: str

active_nodest:
    description:
    - Enter whether to send RST packet to client when all real server is in 'INACT' state.
    - The value should be 'enable' or 'disable'.
    type: str

session_reset:
    description:
    - Enter how to finish session when the real server is in 'INACT' state.
    - The value should be 'active', 'active-timeout', 'none', 'passive', 'passive-timeout'
      or 'timeout'.
    type: str

session_timeout:
    description:
    - Enter the session timeout information.
    - If you enter 'service' as a session-timeout-mode, you can set theses values.
    suboptions:
      generic:
        description:
        - If you want to set session timeout other than ICMP, TCP, and UDP sessions, you
          can set this value.
        type: str
      icmp:
        description:
        - If you want to set session timeout of ICMP, you can set this value.
        type: str
      tcp_close:
        description:
        - If you want to set session timeout of TCP in the'CLOSE' state, you can set this
          value.
        type: str
      tcp_close_wait:
        description:
        - If you want to set session timeout of TCP in the'TCP-CLOSE-WAIT' state, you
          can set this value.
        type: str
      tcp_established:
        description:
        - If you want to set session timeout of TCP in the'TCP-ESTABLISHED' state, you
          can set this value.
        type: str
      tcp_fin_wait:
        description:
        - If you want to set session timeout of TCP in the'TCP-FIN-WAIT' state, you can
          set this value.
        type: str
      tcp_last_ack:
        description:
        - If you want to set session timeout of TCP in the'TCP-LAST-ACK' state, you can
          set this value.
        type: str
      tcp_syn_recv:
        description:
        - If you want to set session timeout of TCP in the'TCP-SYN-RECV' state, you can
          set this value.
        type: str
      tcp_syn_sent:
        description:
        - If you want to set session timeout of TCP in the'TCP-SYN-SENT' state, you can
          set this value.
        type: str
      tcp_unassured:
        description:
        - If you want to set session timeout of TCP in the'UNASSURED' state, you can set
          this value.
        type: str
      tcp_wait:
        description:
        - If you want to set session timeout of TCP in the'TCP-WAIT' state, you can set
          this value.
        type: str
      udp:
        description:
        - If you want to set session timeout of udp, you can set this value.
        type: str
      udp_stream:
        description:
        - If you want to set session timeout of udp-stream, you can set this value.
        type: str
    type: dict

dynamic_proximity:
    description:
    - Enter the information of the dynamic-proximity setting.
    suboptions:
      name:
        description:
        - Enter the name of the dynamic-proximity you created in advance
        - If you enter 'dp' as a lb-method, you can set this value.
        required: true
        type: str
      ratio:
        description:
        - Enter the ratio of dynamic-proximity.
        - If you enter 'dp' as a lb-method, you can set this value.
        type: str
    type: dict

passive_health_check:
    description:
    - Enter the passive-health-check id.
    elements: str
    type: list

session_timeout_mode:
    description:
    - Enter the session-timeout-mode.
    - If you want to apply this value only to slb server, you should enter 'service'
    - Otherwise you can set 'global'.
    type: str