mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-22 00:49:09 -07:00
* Merge again trickily similar Accelerated networking and IP forwarding * Add type to enable_ip_forwarding documentation * Fix merge error * auth to auto * azure_rm_networkinterface: remove auth_source from tests * azure_rm_networkinterface: remove spurious auth_source from test * azure_rm_networkinterface: Revert formatting on test * azure_rm_networkinterface: Correct indentation
This commit is contained in:
parent
5981a7489b
commit
42257706b6
2 changed files with 92 additions and 4 deletions
|
@ -143,7 +143,7 @@
|
|||
primary: True
|
||||
public_ip_allocation_method: Static
|
||||
- name: ipconfig1
|
||||
public_ip_name: testnic003
|
||||
public_ip_name: "tn{{ rpfx }}3"
|
||||
register: output
|
||||
check_mode: yes
|
||||
|
||||
|
@ -168,7 +168,7 @@
|
|||
primary: True
|
||||
public_ip_allocation_method: Static
|
||||
- name: ipconfig1
|
||||
public_ip_name: testnic003
|
||||
public_ip_name: "tn{{ rpfx }}3"
|
||||
load_balancer_backend_address_pools:
|
||||
- "{{ lb.state.backend_address_pools[0].id }}"
|
||||
- name: backendaddrpool1
|
||||
|
@ -197,7 +197,7 @@
|
|||
primary: True
|
||||
public_ip_allocation_method: Static
|
||||
- name: ipconfig1
|
||||
public_ip_name: testnic003
|
||||
public_ip_name: "tn{{ rpfx }}3"
|
||||
load_balancer_backend_address_pools:
|
||||
- "{{ lb.state.backend_address_pools[0].id }}"
|
||||
- name: backendaddrpool1
|
||||
|
@ -219,7 +219,7 @@
|
|||
subnet: "tn{{ rpfx }}"
|
||||
ip_configurations:
|
||||
- name: ipconfig1
|
||||
public_ip_name: testnic003
|
||||
public_ip_name: "tn{{ rpfx }}3"
|
||||
load_balancer_backend_address_pools:
|
||||
- "{{ lb.state.backend_address_pools[0].id }}"
|
||||
- name: backendaddrpool1
|
||||
|
@ -292,12 +292,71 @@
|
|||
- assert:
|
||||
that:
|
||||
- not output.state.enable_accelerated_networking
|
||||
- output.changed
|
||||
|
||||
- name: Delete AN NIC
|
||||
azure_rm_networkinterface:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "tn{{ rpfx }}an"
|
||||
state: absent
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- output.changed
|
||||
|
||||
- name: NIC with IP forwarding networking enabled
|
||||
azure_rm_networkinterface:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "tn{{ rpfx }}ipf"
|
||||
virtual_network: "{{ vn.state.id }}"
|
||||
subnet: "tn{{ rpfx }}"
|
||||
enable_ip_forwarding: True
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- output.state.enable_ip_forwarding
|
||||
- output.changed
|
||||
|
||||
- name: NIC with IP forwarding enabled (check idempotent)
|
||||
azure_rm_networkinterface:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "tn{{ rpfx }}ipf"
|
||||
virtual_network: "{{ vn.state.id }}"
|
||||
subnet: "tn{{ rpfx }}"
|
||||
enable_ip_forwarding: True
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- output.state.enable_ip_forwarding
|
||||
- not output.changed
|
||||
|
||||
- name: Disable (previously enabled) IP forwarding
|
||||
azure_rm_networkinterface:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "tn{{ rpfx }}ipf"
|
||||
virtual_network: "{{ vn.state.id }}"
|
||||
subnet: "tn{{ rpfx }}"
|
||||
enable_ip_forwarding: False
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- not output.state.enable_ip_forwarding
|
||||
- output.changed
|
||||
|
||||
- name: Delete IP forwarding NIC
|
||||
azure_rm_networkinterface:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: "tn{{ rpfx }}ipf"
|
||||
state: absent
|
||||
register: output
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- output.changed
|
||||
|
||||
- name: Delete the NIC (check mode)
|
||||
azure_rm_networkinterface:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue