azure_rm_networkinterface: fixed issue when public ip address should not be created (#36824)

* fixed issue when public ip address should not be created

* adding test for public ip address

* fixed samples

* another fix to sample formatting

* fixed test

* fix test

* fixed test

* another attempt to fix test

* maybe it works now

* still wrong

* improved check per customer request

* removed stupid semicolon

* updated test to match main scenario

* changed ip configurations to list

* another attempt
This commit is contained in:
Zim Kalinowski 2018-03-22 07:16:32 +08:00 committed by Jordan Borean
parent fdc0e5c5fb
commit 89401f13f7
2 changed files with 67 additions and 47 deletions

View file

@ -134,6 +134,22 @@
- not output.state.ip_configuration
- output.state.ip_configurations | length == 2
- name: IP configuration without public IP
azure_rm_networkinterface:
resource_group: "{{ resource_group }}"
name: testnic001noip
security_group: testnic001
virtual_network: "{{ vn.state.id }}"
subnet: testnic001
ip_configurations:
- name: ipconfig1
primary: True
register: output
- assert:
that:
- output.state.ip_configurations[0].public_ip_address == None
- name: Delete the NIC (check mode)
azure_rm_networkinterface:
resource_group: "{{ resource_group }}"