mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixing three unstable integration tests (#40804)
This commit is contained in:
parent
1645db3cee
commit
8544bc5b2a
6 changed files with 61 additions and 46 deletions
|
@ -1,4 +1,3 @@
|
||||||
cloud/azure
|
cloud/azure
|
||||||
posix/ci/cloud/group3/azure
|
posix/ci/cloud/group3/azure
|
||||||
unstable
|
|
||||||
destructive
|
destructive
|
||||||
|
|
|
@ -1,26 +1,34 @@
|
||||||
|
- name: Prepare random number
|
||||||
|
set_fact:
|
||||||
|
pipaname: "pipa{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||||
|
pipbname: "pipb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||||
|
lbname: "lb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||||
|
lbvnname: "lbvn{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||||
|
run_once: yes
|
||||||
|
|
||||||
- name: create public ip
|
- name: create public ip
|
||||||
azure_rm_publicipaddress:
|
azure_rm_publicipaddress:
|
||||||
name: ansiblepipstandard
|
name: "{{ pipbname }}"
|
||||||
sku: Standard
|
sku: Standard
|
||||||
allocation_method: Static
|
allocation_method: Static
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
|
|
||||||
- name: create public ip
|
- name: create public ip
|
||||||
azure_rm_publicipaddress:
|
azure_rm_publicipaddress:
|
||||||
name: ansiblepip3
|
name: "{{ pipaname }}"
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
|
|
||||||
- name: clear load balancer
|
- name: clear load balancer
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: create load balancer
|
- name: create load balancer
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
public_ip: ansiblepip3
|
public_ip: "{{ pipaname }}"
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
- name: assert load balancer created
|
- name: assert load balancer created
|
||||||
|
@ -30,7 +38,7 @@
|
||||||
- name: delete load balancer
|
- name: delete load balancer
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
|
@ -41,7 +49,7 @@
|
||||||
- name: delete load balancer (idempotent)
|
- name: delete load balancer (idempotent)
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
state: absent
|
state: absent
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
|
@ -52,9 +60,9 @@
|
||||||
- name: create another load balancer with more options
|
- name: create another load balancer with more options
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
sku: Standard
|
sku: Standard
|
||||||
public_ip_address: ansiblepipstandard
|
public_ip_address: "{{ pipbname }}"
|
||||||
probe_protocol: Tcp
|
probe_protocol: Tcp
|
||||||
probe_port: 80
|
probe_port: 80
|
||||||
probe_interval: 10
|
probe_interval: 10
|
||||||
|
@ -79,16 +87,16 @@
|
||||||
- name: delete load balancer
|
- name: delete load balancer
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: create load balancer with multiple parameters
|
- name: create load balancer with multiple parameters
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
frontend_ip_configurations:
|
frontend_ip_configurations:
|
||||||
- name: frontendipconf0
|
- name: frontendipconf0
|
||||||
public_ip_address: ansiblepip3
|
public_ip_address: "{{ pipaname }}"
|
||||||
backend_address_pools:
|
backend_address_pools:
|
||||||
- name: backendaddrpool0
|
- name: backendaddrpool0
|
||||||
probes:
|
probes:
|
||||||
|
@ -117,27 +125,27 @@
|
||||||
- name: delete load balancer
|
- name: delete load balancer
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Create virtual network
|
- name: Create virtual network
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: lbtestfromansiblevn
|
name: "{{ lbvnname }}"
|
||||||
address_prefixes: "10.10.0.0/16"
|
address_prefixes: "10.10.0.0/16"
|
||||||
|
|
||||||
- name: Add subnet
|
- name: Add subnet
|
||||||
azure_rm_subnet:
|
azure_rm_subnet:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: lbtestfromansiblesb
|
name: "lb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}sb"
|
||||||
address_prefix: "10.10.0.0/24"
|
address_prefix: "10.10.0.0/24"
|
||||||
virtual_network: lbtestfromansiblevn
|
virtual_network: "{{ lbvnname }}"
|
||||||
register: subnet
|
register: subnet
|
||||||
|
|
||||||
- name: create internal loadbalancer
|
- name: create internal loadbalancer
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
frontend_ip_configurations:
|
frontend_ip_configurations:
|
||||||
- name: frontendipconf0
|
- name: frontendipconf0
|
||||||
private_ip_address: 10.10.0.10
|
private_ip_address: 10.10.0.10
|
||||||
|
@ -171,7 +179,7 @@
|
||||||
- name: delete load balancer
|
- name: delete load balancer
|
||||||
azure_rm_loadbalancer:
|
azure_rm_loadbalancer:
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
name: lbtestfromansible
|
name: "{{ lbname }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: cleanup public ip
|
- name: cleanup public ip
|
||||||
|
@ -180,18 +188,18 @@
|
||||||
resource_group: '{{ resource_group }}'
|
resource_group: '{{ resource_group }}'
|
||||||
state: absent
|
state: absent
|
||||||
with_items:
|
with_items:
|
||||||
- ansiblepip3
|
- "{{ pipaname }}"
|
||||||
- ansiblepipstandard
|
- "{{ pipbname }}"
|
||||||
|
|
||||||
- name: cleanup subnet
|
- name: cleanup subnet
|
||||||
azure_rm_subnet:
|
azure_rm_subnet:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: lbtestfromansiblesb
|
name: "lb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}sb"
|
||||||
virtual_network: lbtestfromansiblevn
|
virtual_network: "{{ lbvnname }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: cleanup virtual network
|
- name: cleanup virtual network
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: lbtestfromansiblevn
|
name: "{{ lbvnname }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
cloud/azure
|
cloud/azure
|
||||||
posix/ci/cloud/group2/azure
|
posix/ci/cloud/group2/azure
|
||||||
unstable
|
|
||||||
destructive
|
destructive
|
||||||
azure_rm_securitygroup_facts
|
azure_rm_securitygroup_facts
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
|
- name: Prepare random number
|
||||||
|
set_fact:
|
||||||
|
secgroupname: "sg{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||||
|
run_once: yes
|
||||||
|
|
||||||
|
|
||||||
- name: Create security group
|
- name: Create security group
|
||||||
azure_rm_securitygroup:
|
azure_rm_securitygroup:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysecgroup
|
name: "{{ secgroupname }}"
|
||||||
tags:
|
tags:
|
||||||
testing: testing
|
testing: testing
|
||||||
delete: on-exit
|
delete: on-exit
|
||||||
|
@ -39,7 +45,7 @@
|
||||||
- name: Add/Update rules on existing security group
|
- name: Add/Update rules on existing security group
|
||||||
azure_rm_securitygroup:
|
azure_rm_securitygroup:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysecgroup
|
name: "{{ secgroupname }}"
|
||||||
rules:
|
rules:
|
||||||
- name: AllowSSH
|
- name: AllowSSH
|
||||||
protocol: Tcp
|
protocol: Tcp
|
||||||
|
@ -62,7 +68,7 @@
|
||||||
- name: Test idempotence
|
- name: Test idempotence
|
||||||
azure_rm_securitygroup:
|
azure_rm_securitygroup:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysecgroup
|
name: "{{ secgroupname }}"
|
||||||
rules:
|
rules:
|
||||||
- name: AllowSSH
|
- name: AllowSSH
|
||||||
protocol: Tcp
|
protocol: Tcp
|
||||||
|
@ -83,7 +89,7 @@
|
||||||
- name: Update tags
|
- name: Update tags
|
||||||
azure_rm_securitygroup:
|
azure_rm_securitygroup:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysecgroup
|
name: "{{ secgroupname }}"
|
||||||
tags:
|
tags:
|
||||||
testing: testing
|
testing: testing
|
||||||
delete: never
|
delete: never
|
||||||
|
@ -98,7 +104,7 @@
|
||||||
- name: Purge tags
|
- name: Purge tags
|
||||||
azure_rm_securitygroup:
|
azure_rm_securitygroup:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysecgroup
|
name: "{{ secgroupname }}"
|
||||||
tags:
|
tags:
|
||||||
testing: testing
|
testing: testing
|
||||||
delete: on-exit
|
delete: on-exit
|
||||||
|
@ -112,7 +118,7 @@
|
||||||
- name: Gather facts for one accounts
|
- name: Gather facts for one accounts
|
||||||
azure_rm_securitygroup_facts:
|
azure_rm_securitygroup_facts:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysecgroup
|
name: "{{ secgroupname }}"
|
||||||
register: output
|
register: output
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
|
@ -131,7 +137,7 @@
|
||||||
- name: Create security group with source_address_prefixes
|
- name: Create security group with source_address_prefixes
|
||||||
azure_rm_securitygroup:
|
azure_rm_securitygroup:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysecgroup
|
name: "{{ secgroupname }}"
|
||||||
tags:
|
tags:
|
||||||
testing: testing
|
testing: testing
|
||||||
delete: on-exit
|
delete: on-exit
|
||||||
|
@ -159,7 +165,7 @@
|
||||||
- name: Create security group with source_address_prefixes(idempontent)
|
- name: Create security group with source_address_prefixes(idempontent)
|
||||||
azure_rm_securitygroup:
|
azure_rm_securitygroup:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: mysecgroup
|
name: "{{ secgroupname }}"
|
||||||
tags:
|
tags:
|
||||||
testing: testing
|
testing: testing
|
||||||
delete: on-exit
|
delete: on-exit
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
cloud/azure
|
cloud/azure
|
||||||
posix/ci/cloud/group2/azure
|
posix/ci/cloud/group2/azure
|
||||||
destructive
|
destructive
|
||||||
unstable
|
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
|
- name: Prepare random number
|
||||||
|
set_fact:
|
||||||
|
vnetname: "vnet{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
|
||||||
|
|
||||||
- name: Delete virtual network, if it exists
|
- name: Delete virtual network, if it exists
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- name: Create virtual network
|
- name: Create virtual network
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
address_prefixes_cidr:
|
address_prefixes_cidr:
|
||||||
- 10.1.0.0/16
|
- 10.1.0.0/16
|
||||||
- 172.100.0.0/16
|
- 172.100.0.0/16
|
||||||
|
@ -17,7 +21,7 @@
|
||||||
|
|
||||||
- name: Create virtual network
|
- name: Create virtual network
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
address_prefixes_cidr:
|
address_prefixes_cidr:
|
||||||
- 10.1.0.0/16
|
- 10.1.0.0/16
|
||||||
- 172.100.0.0/16
|
- 172.100.0.0/16
|
||||||
|
@ -40,7 +44,7 @@
|
||||||
- name: Gather facts by name, tags
|
- name: Gather facts by name, tags
|
||||||
azure_rm_virtualnetwork_facts:
|
azure_rm_virtualnetwork_facts:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
tags:
|
tags:
|
||||||
- testing
|
- testing
|
||||||
|
|
||||||
|
@ -66,7 +70,7 @@
|
||||||
|
|
||||||
- name: Should be idempotent
|
- name: Should be idempotent
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
address_prefixes_cidr:
|
address_prefixes_cidr:
|
||||||
- 10.1.0.0/16
|
- 10.1.0.0/16
|
||||||
- 172.100.0.0/16
|
- 172.100.0.0/16
|
||||||
|
@ -84,7 +88,7 @@
|
||||||
|
|
||||||
- name: Update tags
|
- name: Update tags
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
tags:
|
tags:
|
||||||
testing: 'no'
|
testing: 'no'
|
||||||
delete: never
|
delete: never
|
||||||
|
@ -97,7 +101,7 @@
|
||||||
|
|
||||||
- name: Purge tags
|
- name: Purge tags
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
tags:
|
tags:
|
||||||
testing: 'always'
|
testing: 'always'
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
|
@ -110,7 +114,7 @@
|
||||||
|
|
||||||
- name: Should require address_prefixes_cidr when purge_address_prefixes
|
- name: Should require address_prefixes_cidr when purge_address_prefixes
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
purge_address_prefixes: true
|
purge_address_prefixes: true
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
register: output
|
register: output
|
||||||
|
@ -121,7 +125,7 @@
|
||||||
|
|
||||||
- name: Purge address prefixes
|
- name: Purge address prefixes
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
address_prefixes_cidr: 10.1.0.0/16
|
address_prefixes_cidr: 10.1.0.0/16
|
||||||
purge_address_prefixes: true
|
purge_address_prefixes: true
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
|
@ -136,7 +140,7 @@
|
||||||
|
|
||||||
- name: Purge DNS servers
|
- name: Purge DNS servers
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
purge_dns_servers: true
|
purge_dns_servers: true
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
register: output
|
register: output
|
||||||
|
@ -147,13 +151,13 @@
|
||||||
- name: Gather facts
|
- name: Gather facts
|
||||||
azure_rm_virtualnetwork_facts:
|
azure_rm_virtualnetwork_facts:
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
that: "azure_virtualnetworks | length == 1"
|
that: "azure_virtualnetworks | length == 1"
|
||||||
|
|
||||||
- name: Delete virtual network
|
- name: Delete virtual network
|
||||||
azure_rm_virtualnetwork:
|
azure_rm_virtualnetwork:
|
||||||
name: my_test_network
|
name: "{{ vnetname }}"
|
||||||
resource_group: "{{ resource_group }}"
|
resource_group: "{{ resource_group }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
Loading…
Reference in a new issue