mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-27 19:39:13 -07:00
Azure load balancer support (#26099)
* (wip) add partial loadbalancer module * (wip) add ability to use a public ip for a load balancer * fix shebang * add backend address pool to load balancer * remove unncessary error variable * add probe support to load balancer * add ability to add load distribution rule to load balancer * add nat pool functionality to azure load balancer * fix pep8 errors from sanity check * add documentation for load balancer * refactor imports * fix license header copyright * add facts module for azure load balancer * fix ansible-test failures * add integration tests for load balancer * fix metadata version * add complex integration test to azure_rm_loadbalancer
This commit is contained in:
parent
48c5b9665a
commit
40b7dffea8
6 changed files with 888 additions and 0 deletions
3
test/integration/targets/azure_rm_loadbalancer/aliases
Normal file
3
test/integration/targets/azure_rm_loadbalancer/aliases
Normal file
|
@ -0,0 +1,3 @@
|
|||
cloud/azure
|
||||
posix/ci/cloud/azure
|
||||
destructive
|
|
@ -0,0 +1,2 @@
|
|||
dependencies:
|
||||
- setup_azure
|
|
@ -0,0 +1,62 @@
|
|||
- name: create public ip
|
||||
azure_rm_publicipaddress:
|
||||
name: ansiblepip3
|
||||
resource_group: '{{ resource_group }}'
|
||||
|
||||
- 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: 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: cleanup public ip
|
||||
azure_rm_publicipaddress:
|
||||
name: ansiblepip3
|
||||
resource_group: '{{ resource_group }}'
|
||||
state: absent
|
Loading…
Add table
Add a link
Reference in a new issue