Fixes some NIC bugs (#39213)

* add loadbalancer

* dict check nullable

* add default vallue when get list

* create backend addr pool

* fix the set

* fix to dict

* fix ideponement

* use param security group name when create

* nic can has no nsg

* add test

* fix

* fix

* fix

* fix idemponet

* add document

* fix test

* add configuration

* fix

* fix

* remove all resources

* fix

* fix test

* add version added

* fix lint

* fix lint

* fix lint

* remove new feature and only submit bugfix

* remove useless test

* fix
This commit is contained in:
Yuwei Zhou 2018-04-25 09:54:19 +08:00 committed by Zim Kalinowski
commit 39ca41eb1b
3 changed files with 66 additions and 26 deletions

View file

@ -12,6 +12,11 @@
address_prefix: "10.10.0.0/24"
virtual_network: testnic001
- name: create public ip
azure_rm_publicipaddress:
name: ansiblepip3
resource_group: '{{ resource_group }}'
- name: Create NIC (check mode)
azure_rm_networkinterface:
resource_group: "{{ resource_group }}"
@ -40,6 +45,22 @@
security_group: testnic001
register: output
- name: Create NIC using virtual_network_resource_group parameter (idempotent)
azure_rm_networkinterface:
resource_group: "{{ resource_group }}"
name: testnic001rg
virtual_network: testnic001
virtual_network_resource_group: "{{ resource_group_secondary }}"
subnet: testnic001
public_ip_name: testnic001
public_ip_allocation_method: Static
security_group: testnic001
register: output
- assert:
that:
- not output.changed
- name: Delete NIC
azure_rm_networkinterface:
resource_group: "{{ resource_group }}"
@ -139,8 +160,8 @@
virtual_network: "{{ vn.state.id }}"
subnet: testnic001
ip_configurations:
- name: ipconfig-add
public_ip_name: testnic002
- name: ipconfig1
public_ip_name: testnic003
- name: default
public_ip_name: testnic001
public_ip_allocation_method: Static
@ -156,7 +177,6 @@
azure_rm_networkinterface:
resource_group: "{{ resource_group }}"
name: testnic001noip
security_group: testnic001
virtual_network: "{{ vn.state.id }}"
subnet: testnic001
ip_configurations:
@ -183,8 +203,11 @@
- name: Delete the NIC
azure_rm_networkinterface:
resource_group: "{{ resource_group }}"
name: testnic001
name: "{{ item }}"
state: absent
with_items:
- testnic001
- testnic001noip
register: output
- assert: