1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/azure_rm_loadbalancer/tasks/main.yml
Yuwei Zhou 273a3d1d51 Fixes #34913: azure_rm_loadbalance should accpet a list of rules instead of one (#35592)
* azure_rm_loadbalance should accpet a list of rules instead of one

* fix lint

* fix

* fix

* hook up load balancer rules, doc fixes, test updates
2018-02-08 01:32:27 -08:00

117 lines
2.9 KiB
YAML

- name: create public ip
azure_rm_publicipaddress:
name: ansiblepip3
resource_group: '{{ resource_group }}'
- name: clear load balancer
azure_rm_loadbalancer:
resource_group: '{{ resource_group }}'
name: lbtestfromansible
state: absent
- name: create load balancer
azure_rm_loadbalancer:
resource_group: '{{ resource_group }}'
name: lbtestfromansible
public_ip: ansiblepip3
register: output
- name: assert load balancer created
assert:
that: output.changed
- name: delete load balancer
azure_rm_loadbalancer:
resource_group: '{{ resource_group }}'
name: lbtestfromansible
state: absent
register: output
- name: assert load balancer deleted
assert:
that: output.changed
- name: delete load balancer (idempotent)
azure_rm_loadbalancer:
resource_group: '{{ resource_group }}'
name: lbtestfromansible
state: absent
register: output
- name: assert load balancer deleted (idempotent)
assert:
that: not output.changed
- name: create another load balancer with more options
azure_rm_loadbalancer:
resource_group: '{{ resource_group }}'
name: lbtestfromansible
public_ip_address: ansiblepip3
probe_protocol: Tcp
probe_port: 80
probe_interval: 10
probe_fail_count: 3
protocol: Tcp
load_distribution: Default
frontend_port: 80
backend_port: 8080
idle_timeout: 4
natpool_frontend_port_start: 30
natpool_frontend_port_end: 40
natpool_backend_port: 80
natpool_protocol: Tcp
register: output
- name: assert complex load balancer created
assert:
that: output.changed
- name: delete load balancer
azure_rm_loadbalancer:
resource_group: '{{ resource_group }}'
name: lbtestfromansible
state: absent
- name: create load balancer with multiple parameters
azure_rm_loadbalancer:
resource_group: '{{ resource_group }}'
name: lbtestfromansible
frontend_ip_configurations:
- name: frontendipconf0
public_ip_address: ansiblepip3
backend_address_pools:
- name: backendaddrpool0
probes:
- name: prob0
port: 80
inbound_nat_pools:
- name: inboundnatpool0
frontend_ip_configuration_name: frontendipconf0
protocol: Tcp
frontend_port_range_start: 80
frontend_port_range_end: 81
backend_port: 8080
load_balancing_rules:
- name: lbrbalancingrule0
frontend_ip_configuration: frontendipconf0
backend_address_pool: backendaddrpool0
frontend_port: 80
backend_port: 80
probe: prob0
register: output
- name: assert complex load balancer created
assert:
that: output.changed
- name: delete load balancer
azure_rm_loadbalancer:
resource_group: '{{ resource_group }}'
name: lbtestfromansible
state: absent
- name: cleanup public ip
azure_rm_publicipaddress:
name: ansiblepip3
resource_group: '{{ resource_group }}'
state: absent