Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to connect network interface to application gateway backend pool #683

Merged
merged 8 commits into from
Nov 29, 2021

Conversation

l3ender
Copy link
Contributor

@l3ender l3ender commented Nov 12, 2021

SUMMARY

This PR adds support so a network interface can be connected to an application gateway backend address pool. This is helpful if the network interface is for a virtual machine and one wants the application gateway to send traffic to the VM.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • azure_rm_networkinterface
  • azure_rm_networkinterface_info
ADDITIONAL INFORMATION

The following playbook can be used at the root of this repo to test:

---
- name: "Playbook for testing."
  hosts: "localhost"
  connection: "local"
  gather_facts: false
  vars:
    resource_group: "automated-testing"
    resource_group_secondary: "automated-testing-secondary"
  collections:
    - azure.azcollection

  tasks:
    - name: "Include tests"
      include_tasks: "tests/integration/targets/azure_rm_networkinterface/tasks/main.yml"
Click to view playbook output
-> ansible-playbook sandbox.yml -v
No config file found; using defaults

PLAY [Playbook for testing.] ***************************************************

TASK [Include tests] ***********************************************************
included: /Users/ross/repos/azure/tests/integration/targets/azure_rm_networkinterface/tasks/main.yml for localhost

TASK [Prepare random number] ***************************************************
ok: [localhost] => {"ansible_facts": {"applicationsecuritygroup_name1": "asgef453363", "applicationsecuritygroup_name2": "asgef45326", "nic_name1": "nic1ef453590", "rpfx": "ef45326232"}, "changed": false}

TASK [Create virtual network] **************************************************
changed: [localhost] => {"changed": true, "check_mode": false, "state": {"address_prefixes": ["10.10.0.0/16", "fdae:f296:2787::/48"], "etag": "W/\"3ae9ce80-b084-4003-a337-fde0d36a17f7\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232", "location": "southcentralus", "name": "tnef45326232", "provisioning_state": "Succeeded", "tags": null, "type": "Microsoft.Network/virtualNetworks"}}

TASK [Add subnet] **************************************************************
changed: [localhost] => {"changed": true, "state": {"address_prefix": null, "address_prefixes": ["10.10.0.0/24", "fdae:f296:2787::/64"], "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "network_security_group": {}, "private_endpoint_network_policies": "Enabled", "private_link_service_network_policies": "Enabled", "provisioning_state": "Succeeded", "route_table": {}}}

TASK [Create public IP addresses] **********************************************
changed: [localhost] => (item={'name': 'pipef45326232', 'version': 'ipv4'}) => {"ansible_loop_var": "item", "changed": true, "item": {"name": "pipef45326232", "version": "ipv4"}, "state": {"dns_settings": {}, "etag": "W/\"29977641-ad91-405e-8fdb-29db71299934\"", "idle_timeout_in_minutes": 4, "ip_address": "20.97.72.100", "location": "southcentralus", "name": "pipef45326232", "provisioning_state": "Succeeded", "public_ip_address_version": "ipv4", "public_ip_allocation_method": "static", "sku": "Standard", "tags": null, "type": "Microsoft.Network/publicIPAddresses"}}
changed: [localhost] => (item={'name': 'tnef45326232', 'version': 'ipv4'}) => {"ansible_loop_var": "item", "changed": true, "item": {"name": "tnef45326232", "version": "ipv4"}, "state": {"dns_settings": {}, "etag": "W/\"179fffd0-297a-4407-bb91-eb5ca99e9f00\"", "idle_timeout_in_minutes": 4, "ip_address": "20.88.202.164", "location": "southcentralus", "name": "tnef45326232", "provisioning_state": "Succeeded", "public_ip_address_version": "ipv4", "public_ip_allocation_method": "static", "sku": "Standard", "tags": null, "type": "Microsoft.Network/publicIPAddresses"}}
changed: [localhost] => (item={'name': 'pipef45326232v6', 'version': 'ipv6'}) => {"ansible_loop_var": "item", "changed": true, "item": {"name": "pipef45326232v6", "version": "ipv6"}, "state": {"dns_settings": {}, "etag": "W/\"fd566360-5a5d-43bb-a7ba-b4057baacac5\"", "idle_timeout_in_minutes": 4, "ip_address": "2603:1030:805:3::2d", "location": "southcentralus", "name": "pipef45326232v6", "provisioning_state": "Succeeded", "public_ip_address_version": "ipv6", "public_ip_allocation_method": "static", "sku": "Standard", "tags": null, "type": "Microsoft.Network/publicIPAddresses"}}
changed: [localhost] => (item={'name': 'tnef45326232v6', 'version': 'ipv6'}) => {"ansible_loop_var": "item", "changed": true, "item": {"name": "tnef45326232v6", "version": "ipv6"}, "state": {"dns_settings": {}, "etag": "W/\"063f6b58-30f0-4a55-b39e-bd55cead5b3a\"", "idle_timeout_in_minutes": 4, "ip_address": "2603:1030:805:3::33", "location": "southcentralus", "name": "tnef45326232v6", "provisioning_state": "Succeeded", "public_ip_address_version": "ipv6", "public_ip_allocation_method": "static", "sku": "Standard", "tags": null, "type": "Microsoft.Network/publicIPAddresses"}}

TASK [create load balancer with multiple parameters] ***************************
changed: [localhost] => {"changed": true, "state": {"backend_address_pools": [{"etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "load_balancer_backend_addresses": [], "load_balancing_rules": [{"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/loadBalancingRules/lbrbalancingrule0"}], "name": "backendaddrpool0", "provisioning_state": "Succeeded", "type": "Microsoft.Network/loadBalancers/backendAddressPools"}, {"etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1", "load_balancer_backend_addresses": [], "name": "backendaddrpool1", "provisioning_state": "Succeeded", "type": "Microsoft.Network/loadBalancers/backendAddressPools"}, {"etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool2", "load_balancer_backend_addresses": [], "load_balancing_rules": [{"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/loadBalancingRules/lbrbalancingrule1"}], "name": "backendaddrpool2", "provisioning_state": "Succeeded", "type": "Microsoft.Network/loadBalancers/backendAddressPools"}], "etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "frontend_ip_configurations": [{"etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/frontendIPConfigurations/frontendipconf0", "inbound_nat_pools": [{"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/inboundNatPools/inboundnatpool0"}], "load_balancing_rules": [{"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/loadBalancingRules/lbrbalancingrule0"}], "name": "frontendipconf0", "private_ip_allocation_method": "Dynamic", "provisioning_state": "Succeeded", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/pipef45326232"}, "type": "Microsoft.Network/loadBalancers/frontendIPConfigurations"}, {"etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/frontendIPConfigurations/frontendipconf1", "inbound_nat_pools": [{"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/inboundNatPools/inboundnatpool1"}], "load_balancing_rules": [{"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/loadBalancingRules/lbrbalancingrule1"}], "name": "frontendipconf1", "private_ip_allocation_method": "Dynamic", "provisioning_state": "Succeeded", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/pipef45326232v6"}, "type": "Microsoft.Network/loadBalancers/frontendIPConfigurations"}], "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232", "inbound_nat_pools": [{"backend_port": 8080, "enable_floating_ip": false, "enable_tcp_reset": false, "etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "frontend_ip_configuration": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/frontendIPConfigurations/frontendipconf0"}, "frontend_port_range_end": 81, "frontend_port_range_start": 80, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/inboundNatPools/inboundnatpool0", "idle_timeout_in_minutes": 4, "name": "inboundnatpool0", "protocol": "Tcp", "provisioning_state": "Succeeded", "type": "Microsoft.Network/loadBalancers/inboundNatPools"}, {"backend_port": 8080, "enable_floating_ip": false, "enable_tcp_reset": false, "etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "frontend_ip_configuration": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/frontendIPConfigurations/frontendipconf1"}, "frontend_port_range_end": 81, "frontend_port_range_start": 80, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/inboundNatPools/inboundnatpool1", "idle_timeout_in_minutes": 4, "name": "inboundnatpool1", "protocol": "Tcp", "provisioning_state": "Succeeded", "type": "Microsoft.Network/loadBalancers/inboundNatPools"}], "inbound_nat_rules": [], "load_balancing_rules": [{"backend_address_pool": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0"}, "backend_port": 80, "disable_outbound_snat": false, "enable_floating_ip": false, "enable_tcp_reset": false, "etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "frontend_ip_configuration": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/frontendIPConfigurations/frontendipconf0"}, "frontend_port": 80, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/loadBalancingRules/lbrbalancingrule0", "idle_timeout_in_minutes": 4, "load_distribution": "Default", "name": "lbrbalancingrule0", "probe": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/probes/prob0"}, "protocol": "Tcp", "provisioning_state": "Succeeded", "type": "Microsoft.Network/loadBalancers/loadBalancingRules"}, {"backend_address_pool": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool2"}, "backend_port": 80, "disable_outbound_snat": false, "enable_floating_ip": false, "enable_tcp_reset": false, "etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "frontend_ip_configuration": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/frontendIPConfigurations/frontendipconf1"}, "frontend_port": 80, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/loadBalancingRules/lbrbalancingrule1", "idle_timeout_in_minutes": 4, "load_distribution": "Default", "name": "lbrbalancingrule1", "probe": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/probes/prob0"}, "protocol": "Tcp", "provisioning_state": "Succeeded", "type": "Microsoft.Network/loadBalancers/loadBalancingRules"}], "location": "southcentralus", "name": "lbef45326232", "outbound_rules": [], "probes": [{"etag": "W/\"90ff2690-cfff-46d7-b87e-e88b361b6c93\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/probes/prob0", "interval_in_seconds": 15, "load_balancing_rules": [{"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/loadBalancingRules/lbrbalancingrule0"}, {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/loadBalancingRules/lbrbalancingrule1"}], "name": "prob0", "number_of_probes": 3, "port": 80, "protocol": "Tcp", "provisioning_state": "Succeeded", "type": "Microsoft.Network/loadBalancers/probes"}], "provisioning_state": "Succeeded", "resource_guid": "38deca19-4f22-46c9-b9bf-2b6ad6488430", "sku": {"name": "Standard"}, "type": "Microsoft.Network/loadBalancers"}}

TASK [Create most simple NIC with virtual_network id (check mode)] *************
changed: [localhost] => {"changed": true, "state": null}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create most simple NIC with virtual_network resource_group] **************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"153fed50-8556-448b-a9dd-c22c3d97af1f\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get fact of the new created NIC] *****************************************
ok: [localhost] => {"changed": false, "networkinterfaces": [{"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "public_ip_allocation_method": null}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "provisioning_state": "Succeeded", "resource_group": "automated-testing", "security_group": null, "subnet": "tnef45326232", "tags": null, "virtual_network": {"name": "tnef45326232", "resource_group": "automated-testing-secondary"}}]}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create most simple NIC with ip configurations (idempotent)] **************
ok: [localhost] => {"changed": false, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"153fed50-8556-448b-a9dd-c22c3d97af1f\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create most simple NIC (idempotent)] *************************************
ok: [localhost] => {"changed": false, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"153fed50-8556-448b-a9dd-c22c3d97af1f\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update security group (check mode)] **************************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"153fed50-8556-448b-a9dd-c22c3d97af1f\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update public ip address (check mode)] ***********************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"153fed50-8556-448b-a9dd-c22c3d97af1f\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update accelerated networking (check mode)] ******************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"153fed50-8556-448b-a9dd-c22c3d97af1f\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update IP forwarding networking (check mode)] ****************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"153fed50-8556-448b-a9dd-c22c3d97af1f\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update dns server (check mode)] ******************************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"153fed50-8556-448b-a9dd-c22c3d97af1f\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "tnef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update NIC] **************************************************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": ["8.9.10.11", "7.8.9.10"], "dns_settings": {"applied_dns_servers": [], "dns_servers": ["8.9.10.11", "7.8.9.10"], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": true, "enable_ip_forwarding": true, "etag": "W/\"3f122f34-3bb6-4e3e-a2bc-edf93caf5706\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": null, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool2"], "name": "ipconfig2", "primary": false, "private_ip_address": "fdae:f296:2787::4", "private_ip_address_version": "IPv6", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232v6", "name": "tnef45326232v6", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": false, "private_ip_address": "10.10.0.5", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "name": "tnef45326232", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": "", "name": "tnef45326232", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/tnef45326232sg", "name": "tnef45326232sg"}, "provisioning_state": "Succeeded", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Complicated NIC (idempontent)] *******************************************
ok: [localhost] => {"changed": false, "state": {"dns_servers": ["8.9.10.11", "7.8.9.10"], "dns_settings": {"applied_dns_servers": [], "dns_servers": ["8.9.10.11", "7.8.9.10"], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": true, "enable_ip_forwarding": true, "etag": "W/\"3f122f34-3bb6-4e3e-a2bc-edf93caf5706\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": null, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool2"], "name": "ipconfig2", "primary": false, "private_ip_address": "fdae:f296:2787::4", "private_ip_address_version": "IPv6", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232v6", "name": "tnef45326232v6", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": false, "private_ip_address": "10.10.0.5", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "name": "tnef45326232", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": "", "name": "tnef45326232", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/tnef45326232sg", "name": "tnef45326232sg"}, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get fact of the new created NIC] *****************************************
ok: [localhost] => {"changed": false, "networkinterfaces": [{"dns_servers": ["8.9.10.11", "7.8.9.10"], "dns_settings": {"applied_dns_servers": [], "dns_servers": ["8.9.10.11", "7.8.9.10"], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": true, "enable_ip_forwarding": true, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "public_ip_allocation_method": null}, {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool2"], "name": "ipconfig2", "primary": false, "private_ip_address": "fdae:f296:2787::4", "private_ip_allocation_method": "Dynamic", "public_ip_address": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232v6", "public_ip_allocation_method": null}, {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": false, "private_ip_address": "10.10.0.5", "private_ip_allocation_method": "Dynamic", "public_ip_address": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "public_ip_allocation_method": null}], "location": "southcentralus", "mac_address": "", "name": "tnef45326232", "provisioning_state": "Succeeded", "resource_group": "automated-testing", "security_group": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/tnef45326232sg", "subnet": "tnef45326232", "tags": null, "virtual_network": {"name": "tnef45326232", "resource_group": "automated-testing-secondary"}}]}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Remove one dns server and ip configuration] ******************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": ["8.9.10.11"], "dns_settings": {"applied_dns_servers": [], "dns_servers": ["8.9.10.11"], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": true, "enable_ip_forwarding": true, "etag": "W/\"f0b66a96-f4fc-4220-a89a-bd8ab82c7fb8\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.5", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "name": "tnef45326232", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.5", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "name": "tnef45326232", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": "", "name": "tnef45326232", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/tnef45326232sg", "name": "tnef45326232sg"}, "provisioning_state": "Succeeded", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create application security group(check mode)] ***************************
changed: [localhost] => {"changed": true}

TASK [Assert check mode creation] **********************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create Application security group] ***************************************
changed: [localhost] => {"changed": true, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363"}

TASK [Assert application security group creation] ******************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get Application security group] ******************************************
ok: [localhost] => {"applicationsecuritygroups": [{"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363", "location": "southcentralus", "name": "asgef453363", "provisioning_state": "Succeeded", "tags": {"testing": "testing"}}], "changed": false}

TASK [Assert facts] ************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create application security group (idempotent)] **************************
ok: [localhost] => {"changed": false}

TASK [Assert idempotent] *******************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update application security group] ***************************************
changed: [localhost] => {"changed": true, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363"}

TASK [Assert update] ***********************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create Application security group in secondary resource group] ***********
changed: [localhost] => {"changed": true, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationSecurityGroups/asgef45326"}

TASK [Create Nic with application security groups] *****************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"9c8a38f9-b3e3-4bfe-8c6a-7705fe8c33b0\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/nic1ef453590", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationSecurityGroups/asgef45326"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationSecurityGroups/asgef45326"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "nic1ef453590", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/nic1ef453590", "name": "nic1ef453590"}, "provisioning_state": "Succeeded", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert creation succeeded] ***********************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create Nic with application security groups (idempotent)] ****************
ok: [localhost] => {"changed": false, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"9c8a38f9-b3e3-4bfe-8c6a-7705fe8c33b0\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/nic1ef453590", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationSecurityGroups/asgef45326"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationSecurityGroups/asgef45326"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "nic1ef453590", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/nic1ef453590", "name": "nic1ef453590"}, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert idempotent] *******************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Update Nic with application security groups] *****************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"4c460561-4269-424c-81f2-59e136fb1afc\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/nic1ef453590", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "nic1ef453590", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/nic1ef453590", "name": "nic1ef453590"}, "provisioning_state": "Succeeded", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert update succeeded] *************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get fact of the new created NIC] *****************************************
ok: [localhost] => {"changed": false, "networkinterfaces": [{"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/nic1ef453590", "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "public_ip_allocation_method": null}], "location": "southcentralus", "mac_address": null, "name": "nic1ef453590", "provisioning_state": "Succeeded", "resource_group": "automated-testing", "security_group": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/nic1ef453590", "subnet": "tnef45326232", "tags": null, "virtual_network": {"name": "tnef45326232", "resource_group": "automated-testing-secondary"}}]}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create subnet for appgw] *************************************************
changed: [localhost] => {"changed": true, "state": {"address_prefix": "10.10.1.0/24", "address_prefixes": null, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/appgw-subnetef45326232", "name": "appgw-subnetef45326232", "network_security_group": {}, "private_endpoint_network_policies": "Enabled", "private_link_service_network_policies": "Enabled", "provisioning_state": "Succeeded", "route_table": {}}}

TASK [Create application gateway to connect NIC to] ****************************
changed: [localhost] => {"changed": true, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationGateways/appgatewayef45326232"}

TASK [Create subnet for appgw connected NIC] ***********************************
changed: [localhost] => {"changed": true, "state": {"address_prefix": "10.10.2.0/24", "address_prefixes": null, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/nic-appgw-subnetef45326232", "name": "nic-appgw-subnetef45326232", "network_security_group": {}, "private_endpoint_network_policies": "Enabled", "private_link_service_network_policies": "Enabled", "provisioning_state": "Succeeded", "route_table": {}}}

TASK [Create NIC attached to application gateway] ******************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"3a76346d-dea2-4d93-87af-36f88f56d8f1\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/networkInterfaces/appgw-nicef45326232", "ip_configuration": {"application_gateway_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationGateways/appgatewayef45326232/backendAddressPools/test_backend_address_pool"], "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.2.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/nic-appgw-subnetef45326232", "name": "nic-appgw-subnetef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationGateways/appgatewayef45326232/backendAddressPools/test_backend_address_pool"], "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.2.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/nic-appgw-subnetef45326232", "name": "nic-appgw-subnetef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "appgw-nicef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Create NIC attached to application gateway - idempotent] *****************
ok: [localhost] => {"changed": false, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"3a76346d-dea2-4d93-87af-36f88f56d8f1\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/networkInterfaces/appgw-nicef45326232", "ip_configuration": {"application_gateway_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationGateways/appgatewayef45326232/backendAddressPools/test_backend_address_pool"], "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.2.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/nic-appgw-subnetef45326232", "name": "nic-appgw-subnetef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationGateways/appgatewayef45326232/backendAddressPools/test_backend_address_pool"], "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.2.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/nic-appgw-subnetef45326232", "name": "nic-appgw-subnetef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "appgw-nicef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "tags": {}, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Get facts for appgw nic] *************************************************
ok: [localhost] => {"changed": false, "networkinterfaces": [{"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/networkInterfaces/appgw-nicef45326232", "ip_configurations": [{"application_gateway_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationGateways/appgatewayef45326232/backendAddressPools/test_backend_address_pool"], "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.2.4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "public_ip_allocation_method": null}], "location": "southcentralus", "mac_address": null, "name": "appgw-nicef45326232", "provisioning_state": "Succeeded", "resource_group": "automated-testing-secondary", "security_group": null, "subnet": "nic-appgw-subnetef45326232", "tags": null, "virtual_network": {"name": "tnef45326232", "resource_group": "automated-testing-secondary"}}]}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete NIC attached to application gateway] ******************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"3a76346d-dea2-4d93-87af-36f88f56d8f1\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/networkInterfaces/appgw-nicef45326232", "ip_configuration": {"application_gateway_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationGateways/appgatewayef45326232/backendAddressPools/test_backend_address_pool"], "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.2.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/nic-appgw-subnetef45326232", "name": "nic-appgw-subnetef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/applicationGateways/appgatewayef45326232/backendAddressPools/test_backend_address_pool"], "application_security_groups": null, "load_balancer_backend_address_pools": null, "name": "default", "primary": true, "private_ip_address": "10.10.2.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/nic-appgw-subnetef45326232", "name": "nic-appgw-subnetef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "appgw-nicef45326232", "network_security_group": null, "provisioning_state": "Succeeded", "status": "Deleted", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete application gateway] **********************************************
changed: [localhost] => {"changed": true}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete the NIC (check mode)] *********************************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": ["8.9.10.11"], "dns_settings": {"applied_dns_servers": [], "dns_servers": ["8.9.10.11"], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": true, "enable_ip_forwarding": true, "etag": "W/\"f0b66a96-f4fc-4220-a89a-bd8ab82c7fb8\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.5", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "name": "tnef45326232", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.5", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "name": "tnef45326232", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": "", "name": "tnef45326232", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/tnef45326232sg", "name": "tnef45326232sg"}, "provisioning_state": "Succeeded", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete the NIC] **********************************************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": ["8.9.10.11"], "dns_settings": {"applied_dns_servers": [], "dns_servers": ["8.9.10.11"], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": true, "enable_ip_forwarding": true, "etag": "W/\"f0b66a96-f4fc-4220-a89a-bd8ab82c7fb8\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/tnef45326232", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.5", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "name": "tnef45326232", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": null, "load_balancer_backend_address_pools": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool0", "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/loadBalancers/lbef45326232/backendAddressPools/backendaddrpool1"], "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.5", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/publicIPAddresses/tnef45326232", "name": "tnef45326232", "public_ip_allocation_method": null}, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": "", "name": "tnef45326232", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/tnef45326232sg", "name": "tnef45326232sg"}, "provisioning_state": "Succeeded", "status": "Deleted", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete the NIC (idempotent)] *********************************************
ok: [localhost] => {"changed": false, "state": null}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [delete load balancer] ****************************************************
changed: [localhost] => {"changed": true, "state": null}

TASK [delete public ip addresses] **********************************************
changed: [localhost] => (item=pipef45326232) => {"ansible_loop_var": "item", "changed": true, "item": "pipef45326232", "state": {"status": "Deleted"}}
changed: [localhost] => (item=pipef45326232v6) => {"ansible_loop_var": "item", "changed": true, "item": "pipef45326232v6", "state": {"status": "Deleted"}}
changed: [localhost] => (item=tnef45326232) => {"ansible_loop_var": "item", "changed": true, "item": "tnef45326232", "state": {"status": "Deleted"}}
changed: [localhost] => (item=tnef45326232v6) => {"ansible_loop_var": "item", "changed": true, "item": "tnef45326232v6", "state": {"status": "Deleted"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete the NIC] **********************************************************
changed: [localhost] => {"changed": true, "state": {"dns_servers": [], "dns_settings": {"applied_dns_servers": [], "dns_servers": [], "internal_dns_name_label": null, "internal_fqdn": null}, "enable_accelerated_networking": false, "enable_ip_forwarding": false, "etag": "W/\"4c460561-4269-424c-81f2-59e136fb1afc\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkInterfaces/nic1ef453590", "ip_configuration": {"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}, "ip_configurations": [{"application_gateway_backend_address_pools": null, "application_security_groups": ["/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/applicationSecurityGroups/asgef453363"], "load_balancer_backend_address_pools": null, "name": "ipconfig1", "primary": true, "private_ip_address": "10.10.0.4", "private_ip_address_version": "IPv4", "private_ip_allocation_method": "Dynamic", "public_ip_address": null, "subnet": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232/subnets/tnef45326232", "name": "tnef45326232", "resource_group": "automated-testing-secondary", "virtual_network_name": "tnef45326232"}}], "location": "southcentralus", "mac_address": null, "name": "nic1ef453590", "network_security_group": {"id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing/providers/Microsoft.Network/networkSecurityGroups/nic1ef453590", "name": "nic1ef453590"}, "provisioning_state": "Succeeded", "status": "Deleted", "tags": null, "type": "Microsoft.Network/networkInterfaces"}}

TASK [Delete the application security group (check mode)] **********************
changed: [localhost] => {"changed": true}

TASK [Assert delete check mode] ************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete the application security group] ***********************************
changed: [localhost] => {"changed": true}

TASK [Assert the deletion] *****************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete second application security group] ********************************
changed: [localhost] => {"changed": true}

TASK [Delete network security groups] ******************************************
changed: [localhost] => (item=nic1ef453590) => {"ansible_loop_var": "item", "changed": true, "item": "nic1ef453590", "state": {"status": "Deleted"}}
changed: [localhost] => (item=tnef45326232sg) => {"ansible_loop_var": "item", "changed": true, "item": "tnef45326232sg", "state": {"status": "Deleted"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [Delete virtual network] **************************************************
changed: [localhost] => {"changed": true, "check_mode": false, "state": {"address_prefixes": ["10.10.0.0/16", "fdae:f296:2787::/48"], "etag": "W/\"fe28886f-5f5e-4761-917b-e7a0e94acc6d\"", "id": "/subscriptions/bc3b87b4-c684-43f6-b76d-a98c0e1568e8/resourceGroups/automated-testing-secondary/providers/Microsoft.Network/virtualNetworks/tnef45326232", "location": "southcentralus", "name": "tnef45326232", "provisioning_state": "Succeeded", "status": "Deleted", "tags": null, "type": "Microsoft.Network/virtualNetworks"}}

TASK [assert] ******************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

PLAY RECAP *********************************************************************
localhost                  : ok=85   changed=35   unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors labels Nov 22, 2021
plugins/modules/azure_rm_networkinterface.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_networkinterface.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_networkinterface_info.py Outdated Show resolved Hide resolved
@l3ender
Copy link
Contributor Author

l3ender commented Nov 23, 2021

@Fred-sun I have updated and also now configured python lint in my vscode. 😄 Thank you!

@Fred-sun Fred-sun added enhancement New feature or request new_feature New feature requirments ready_for_review The PR has been modified and can be reviewed and merged labels Nov 24, 2021
@xuzhang3
Copy link
Collaborator

LGTM

@xuzhang3 xuzhang3 merged commit 917e9f2 into ansible-collections:dev Nov 29, 2021
@xuzhang3 xuzhang3 deleted the nic-appgw-integration branch November 29, 2021 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium_priority Medium priority new_feature New feature requirments ready_for_review The PR has been modified and can be reviewed and merged work in In trying to solve, or in working with contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants