summaryrefslogtreecommitdiffstats
path: root/collections-debian-merged/ansible_collections/azure/azcollection/tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 20:03:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-14 20:03:01 +0000
commita453ac31f3428614cceb99027f8efbdb9258a40b (patch)
treef61f87408f32a8511cbd91799f9cececb53e0374 /collections-debian-merged/ansible_collections/azure/azcollection/tests
parentInitial commit. (diff)
downloadansible-upstream.tar.xz
ansible-upstream.zip
Adding upstream version 2.10.7+merged+base+2.10.8+dfsg.upstream/2.10.7+merged+base+2.10.8+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collections-debian-merged/ansible_collections/azure/azcollection/tests')
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/tasks/main.yml149
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/tasks/main.yml103
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/tasks/main.yml72
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/tasks/main.yml313
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/files/cert1.txt1
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/files/cert2.txt1
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/tasks/main.yml401
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/tasks/main.yml84
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/tasks/main.yml88
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/tasks/main.yml221
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/tasks/main.yml136
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/tasks/main.yml277
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/tasks/main.yml75
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/tasks/main.yml76
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/aliases5
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/tasks/main.yml276
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/tasks/main.yml210
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/tasks/main.yml116
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/tasks/main.yml249
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/tasks/main.yml63
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/tasks/main.yml185
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/aliases6
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/tasks/main.yml300
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/tasks/main.yml131
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/aliases6
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/tasks/main.yml345
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/aliases6
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/tasks/main.yml244
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/tasks/main.yml174
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/tasks/main.yml172
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/aliases5
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/lookup_plugins/azure_service_principal_attribute.py94
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/tasks/main.yml270
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/lookup_plugins/azure_service_principal_attribute.py94
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/tasks/main.yml84
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/lookup_plugins/azure_service_principal_attribute.py94
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/tasks/main.yml90
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/tasks/main.yml322
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/aliases5
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/tasks/main.yml161
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/tasks/main.yml204
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/aliases8
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/tasks/main.yml640
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/tasks/main.yml104
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/aliases10
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/tasks/main.yml640
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/tasks/main.yml558
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/tasks/main.yml69
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/aliases11
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/tasks/main.yml612
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/tasks/main.yml237
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/tasks/main.yml77
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/tasks/main.yml136
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/tasks/main.yml55
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/aliases6
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/tasks/main.yml317
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/tasks/main.yml78
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/tasks/main.yml134
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/tasks/main.yml158
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/tasks/main.yml50
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/tasks/main.yml186
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/tasks/main.yml211
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/tasks/main.yml195
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/tasks/main.yml306
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/tasks/main.yml169
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/aliases8
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/tasks/main.yml542
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/tasks/main.yml211
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/files/Ratings.pngbin0 -> 35164 bytes
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/tasks/main.yml119
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/tasks/main.yml319
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/tasks/main.yml24
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/tasks/main.yml289
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/inventory.yml66
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/main.yml7
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/runme.sh5
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_deallocate.yml93
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_dual_nic.yml137
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_ephemeral_os.yml113
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_invalid.yml35
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_minimal.yml121
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_no_public_ip.yml44
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_public_ip.yml322
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/setup.yml26
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/aliases5
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/tasks/main.yml183
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/tasks/main.yml43
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/aliases8
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/tasks/main.yml697
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/tasks/main.yml184
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/tasks/main.yml126
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/aliases4
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/tasks/main.yml126
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/aliases3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/tasks/main.yml78
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/aliases5
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/tasks/main.yml434
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/aliases5
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/meta/main.yml2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/tasks/main.yml128
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/aliases2
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/create_inventory_config.yml11
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/empty_inventory_config.yml9
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/setup.yml27
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/teardown.yml26
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/test_inventory.yml42
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/vars.yml14
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/runme.sh17
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/templates/basic.yml3
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/test.azure_rm.yml0
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/setup_azure/aliases0
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.10.txt750
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.11.txt750
-rw-r--r--collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.9.txt186
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/utils/ado/ado.sh138
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/azure.sh34
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/check_matrix.py114
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/cloud.sh34
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/sanity.sh7
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/shippable.sh124
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/timing.py16
-rwxr-xr-xcollections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/timing.sh5
235 files changed, 17994 insertions, 0 deletions
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/aliases
new file mode 100644
index 00000000..99b41786
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+destructive
+unsupported
+shippable/azure/group10
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/tasks/main.yml
new file mode 100644
index 00000000..a35871c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_acs/tasks/main.yml
@@ -0,0 +1,149 @@
+ - name: Create an ACS instance - DCOS
+ azure_rm_acs:
+ name: "acsdcos{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ orchestration_platform: DCOS
+ master_profile:
+ - count: 1
+ dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(10, True, '') }}"
+ vm_size: Standard_A0
+ linux_profile:
+ - admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(12, True, '') }}"
+ vm_size: Standard_A0
+ diagnostics_profile: false
+ register: output
+
+ - name: Assert the ACS instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.state.provisioning_state == 'Succeeded'
+
+ - name: Scale the ACS instance from 1 to 2 - DCOS
+ azure_rm_acs:
+ name: "acsdcos{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ orchestration_platform: DCOS
+ master_profile:
+ - count: 1
+ dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(10, True, '') }}"
+ vm_size: Standard_A0
+ linux_profile:
+ - admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
+ agent_pool_profiles:
+ - name: default
+ count: 2
+ dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(12, True, '') }}"
+ vm_size: Standard_A0
+ diagnostics_profile: false
+ register: output
+
+ - name: Assert the ACS instance is well scaled
+ assert:
+ that:
+ - output.changed
+ - output.state.agent_pool_profiles[0].count == 2
+
+ - name: Delete the DCOS ACS instance - DCOS
+ azure_rm_acs:
+ name: "acsdcos{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ orchestration_platform: DCOS
+ state: absent
+ master_profile:
+ - count: 1
+ dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(10, True, '') }}"
+ vm_size: Standard_A0
+ linux_profile:
+ - admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
+ agent_pool_profiles:
+ - name: default
+ count: 2
+ dns_prefix: "acsdcos{{ resource_group | hash('md5') | truncate(12, True, '') }}"
+ vm_size: Standard_A0
+ diagnostics_profile: false
+
+ - name: Create an ACS instance - Swarm
+ azure_rm_acs:
+ name: "acssw{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ orchestration_platform: Swarm
+ master_profile:
+ - count: 1
+ dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(10, True, '') }}"
+ vm_size: Standard_A0
+ linux_profile:
+ - admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(12, True, '') }}"
+ vm_size: Standard_A0
+ diagnostics_profile: false
+ register: output
+
+ - name: Assert the ACS instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.state.provisioning_state == 'Succeeded'
+
+ - name: Scale the ACS instance from 1 to 2 - Swarm
+ azure_rm_acs:
+ name: "acssw{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ orchestration_platform: Swarm
+ master_profile:
+ - count: 1
+ dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(10, True, '') }}"
+ vm_size: Standard_A0
+ linux_profile:
+ - admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
+ agent_pool_profiles:
+ - name: default
+ count: 2
+ dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(12, True, '') }}"
+ vm_size: Standard_A0
+ diagnostics_profile: false
+ register: output
+
+ - name: Assert the ACS instance is well scaled
+ assert:
+ that:
+ - output.changed
+ - output.state.agent_pool_profiles[0].count == 2
+
+ - name: Delete the ACS instance - Swarm
+ azure_rm_acs:
+ name: "acssw{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ orchestration_platform: Swarm
+ state: absent
+ master_profile:
+ - count: 1
+ dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(10, True, '') }}"
+ vm_size: Standard_A0
+ linux_profile:
+ - admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+io238wdhjkasndq238e2/983289dasjnasey823/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+928dfsjsejk298r/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+dsajda82e78sdja/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt juliens@msft.com
+ agent_pool_profiles:
+ - name: default
+ count: 2
+ dns_prefix: "acssw{{ resource_group | hash('md5') | truncate(12, True, '') }}"
+ vm_size: Standard_A0
+ diagnostics_profile: false \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/aliases
new file mode 100644
index 00000000..fc8bf1e7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group10
+disabled
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/tasks/main.yml
new file mode 100644
index 00000000..7c3782f1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adpassword/tasks/main.yml
@@ -0,0 +1,103 @@
+- set_fact:
+ app_id: "e0a62513-1d81-480e-a6dc-5c99cdd58d9a"
+ tenant_id: "72f988bf-86f1-41af-91ab-2d7cd011db47"
+ app_object_id: "b52e8275-a1ee-4c4a-86ff-15992e0920ed"
+
+- name: create first ad password by app_id
+ azure_rm_adpassword:
+ app_id: "{{ app_id }}"
+ value: "Password@032900001"
+ tenant: "{{ tenant_id }}"
+ state: present
+ register: ad_fact
+
+- assert:
+ that:
+ - ad_fact.changed
+
+- name: create second ad password by app_object_id
+ azure_rm_adpassword:
+ value: "Password@032900002"
+ tenant: "{{ tenant_id }}"
+ app_object_id: "{{ app_object_id }}"
+ state: present
+ register: ad_fact02
+
+- assert:
+ that:
+ - ad_fact02.changed
+
+- name: create ad service principal
+ azure_rm_adserviceprincipal:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ state: present
+
+- name: Get ad service principal info
+ azure_rm_adserviceprincipal_info:
+ tenant: "{{ tenant_id }}"
+ app_id: "{{ app_id }}"
+ register: sp_info
+- debug:
+ var: sp_info
+
+- name: create third ad password by service_principal_object_id
+ azure_rm_adpassword:
+ value: "Password@032900003"
+ tenant: "{{ tenant_id }}"
+ service_principal_object_id: "{{ sp_info.service_principals[0].object_id }}"
+ state: present
+ register: ad_fact03
+
+- assert:
+ that:
+ - ad_fact03.changed
+
+- name: can't update ad password
+ azure_rm_adpassword:
+ app_id: "{{ app_id }}"
+ value: "Password@032900003"
+ tenant: "{{ tenant_id }}"
+ key_id: "{{ ad_fact.key_id }}"
+ app_object_id: "{{ app_object_id }}"
+ state: present
+ register: output
+ ignore_errors: True
+
+- name: Get ad password info
+ azure_rm_adpassword_info:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ key_id: "{{ ad_fact.key_id }}"
+ app_object_id: "{{ app_object_id }}"
+ register: ad_info
+
+- assert:
+ that:
+ - ad_info.passwords[0].start_date == ad_fact.start_date
+ - ad_info.passwords[0].end_date == ad_fact.end_date
+
+- name: delete one ad password
+ azure_rm_adpassword:
+ app_id: "{{ app_id }}"
+ key_id: "{{ ad_fact.key_id }}"
+ tenant: "{{ tenant_id }}"
+ app_object_id: "{{ app_object_id }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: delete all ad password
+ azure_rm_adpassword:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ app_object_id: "{{ app_object_id }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/aliases
new file mode 100644
index 00000000..6feba04a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group10
+destructive
+disabled
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/tasks/main.yml
new file mode 100644
index 00000000..4e4b5016
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_adserviceprincipal/tasks/main.yml
@@ -0,0 +1,72 @@
+- set_fact:
+ app_id: "e0a62513-1d81-480e-a6dc-5c99cdd58d9a"
+ tenant_id: "72f988bf-86f1-41af-91ab-2d7cd011db47"
+
+- name: delete ad service principal
+ azure_rm_adserviceprincipal:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ state: absent
+
+- name: create ad service principal
+ azure_rm_adserviceprincipal:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ state: present
+ register: ad_fact
+
+- assert:
+ that:
+ - ad_fact.changed
+
+- name: create ad service principal (idempontent)
+ azure_rm_adserviceprincipal:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ state: present
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Get ad service principal info by app_id
+ azure_rm_adserviceprincipal_info:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ register: ad_info
+
+- assert:
+ that:
+ - ad_info.service_principals[0].app_display_name == ad_fact.app_display_name
+ - ad_info.service_principals[0].app_role_assignment_required == False
+
+- name: update ad service principal app_role_assignmentrequired to True
+ azure_rm_adserviceprincipal:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ app_role_assignment_required: True
+ state: present
+ register: output
+
+- name: Get ad service principal info by object_id
+ azure_rm_adserviceprincipal_info:
+ tenant: "{{ tenant_id }}"
+ object_id: "{{ ad_info.service_principals[0].object_id }}"
+ register: ad_info
+
+- assert:
+ that:
+ - ad_info.service_principals[0].app_display_name == ad_fact.app_display_name
+ - ad_info.service_principals[0].app_role_assignment_required == True
+
+- name: delete ad service principal
+ azure_rm_adserviceprincipal:
+ app_id: "{{ app_id }}"
+ tenant: "{{ tenant_id }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/aliases
new file mode 100644
index 00000000..7aca0ce4
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+destructive
+shippable/azure/group11
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/tasks/main.yml
new file mode 100644
index 00000000..2bc02494
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_aks/tasks/main.yml
@@ -0,0 +1,313 @@
+ - set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(8, True, '') }}"
+ noderpfx: "{{ resource_group | hash('md5') | truncate(4, True, '') }}"
+
+ - name: Find available k8s version
+ azure_rm_aksversion_info:
+ location: eastus
+ register: versions
+
+ - name: Create an AKS instance (check mode)
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ dns_prefix: "aks{{ rpfx }}"
+ kubernetes_version: "{{ versions.azure_aks_versions[0] }}"
+ service_principal:
+ client_id: "{{ azure_client_id }}"
+ client_secret: "{{ azure_secret }}"
+ linux_profile:
+ admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPmiqkvDH1/+MDAVDZT8381aYqp73Odz8cnD5hegNhqtXajqtiH0umVg7HybX3wt1HjcrwKJovZURcIbbcDvzdH2bnYbF93T4OLXA0bIfuIp6M86x1iutFtXdpN3TTicINrmSXEE2Ydm51iMu77B08ZERjVaToya2F7vC+egfoPvibf7OLxE336a5tPCywavvNihQjL8sjgpDT5AAScjb3YqK/6VLeQ18Ggt8/ufINsYkb+9/Ji/3OcGFeflnDXq80vPUyF3u4iIylob6RSZenC38cXmQB05tRNxS1B6BXCjMRdy0v4pa7oKM2GA4ADKpNrr0RI9ed+peRFwmsclH test@ansible
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ vm_size: Standard_DS1_v2
+ type: VirtualMachineScaleSets
+ enable_auto_scaling: True
+ max_count: 3
+ min_count: 1
+ availability_zones:
+ - 1
+ - 2
+ node_resource_group: "node{{ noderpfx }}"
+ enable_rbac: yes
+ network_profile:
+ load_balancer_sku: standard
+ check_mode: yes
+
+ - name: Check there is no AKS created
+ azure_rm_aks_info:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ register: fact
+
+ - name: Check there is no AKS created
+ assert:
+ that:
+ - "fact.aks | length == 0"
+
+ - name: Create an AKS instance
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ dns_prefix: "aks{{ rpfx }}"
+ kubernetes_version: "{{ versions.azure_aks_versions[0] }}"
+ service_principal:
+ client_id: "{{ azure_client_id }}"
+ client_secret: "{{ azure_secret }}"
+ linux_profile:
+ admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPmiqkvDH1/+MDAVDZT8381aYqp73Odz8cnD5hegNhqtXajqtiH0umVg7HybX3wt1HjcrwKJovZURcIbbcDvzdH2bnYbF93T4OLXA0bIfuIp6M86x1iutFtXdpN3TTicINrmSXEE2Ydm51iMu77B08ZERjVaToya2F7vC+egfoPvibf7OLxE336a5tPCywavvNihQjL8sjgpDT5AAScjb3YqK/6VLeQ18Ggt8/ufINsYkb+9/Ji/3OcGFeflnDXq80vPUyF3u4iIylob6RSZenC38cXmQB05tRNxS1B6BXCjMRdy0v4pa7oKM2GA4ADKpNrr0RI9ed+peRFwmsclH test@ansible
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ vm_size: Standard_DS1_v2
+ type: VirtualMachineScaleSets
+ enable_auto_scaling: True
+ max_count: 3
+ min_count: 1
+ availability_zones:
+ - 1
+ - 2
+ node_resource_group: "node{{ noderpfx }}"
+ enable_rbac: yes
+ network_profile:
+ load_balancer_sku: standard
+ register: output
+
+ - name: Assert the AKS instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.provisioning_state == 'Succeeded'
+
+ - name: Get AKS fact
+ azure_rm_aks_info:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ register: fact
+
+ - name: Assert fact returns the created one
+ assert:
+ that:
+ - "fact.aks | length == 1"
+ - fact.aks[0].id == output.id
+ - fact.aks[0].properties.agentPoolProfiles[0].availabilityZones == ["1", "2"]
+
+ - name: Create an AKS instance (idempotent)
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ dns_prefix: "aks{{ rpfx }}"
+ kubernetes_version: "{{ versions.azure_aks_versions[0] }}"
+ service_principal:
+ client_id: "{{ azure_client_id }}"
+ linux_profile:
+ admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPmiqkvDH1/+MDAVDZT8381aYqp73Odz8cnD5hegNhqtXajqtiH0umVg7HybX3wt1HjcrwKJovZURcIbbcDvzdH2bnYbF93T4OLXA0bIfuIp6M86x1iutFtXdpN3TTicINrmSXEE2Ydm51iMu77B08ZERjVaToya2F7vC+egfoPvibf7OLxE336a5tPCywavvNihQjL8sjgpDT5AAScjb3YqK/6VLeQ18Ggt8/ufINsYkb+9/Ji/3OcGFeflnDXq80vPUyF3u4iIylob6RSZenC38cXmQB05tRNxS1B6BXCjMRdy0v4pa7oKM2GA4ADKpNrr0RI9ed+peRFwmsclH test@ansible
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ vm_size: Standard_DS1_v2
+ type: VirtualMachineScaleSets
+ enable_auto_scaling: True
+ max_count: 3
+ min_count: 1
+ node_resource_group: "node{{ noderpfx }}"
+ enable_rbac: yes
+ network_profile:
+ load_balancer_sku: standard
+ register: output
+
+ - name: Assert idempotent
+ assert:
+ that:
+ - not output.changed
+
+ - name: Get available version
+ azure_rm_aksversion_info:
+ location: eastus
+ version: "{{ versions.azure_aks_versions[0] }}"
+ register: version1
+
+ - name: Upgrade the AKS instance with addon
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ dns_prefix: "aks{{ rpfx }}"
+ kubernetes_version: "{{ version1.azure_aks_versions[0] }}"
+ service_principal:
+ client_id: "{{ azure_client_id }}"
+ linux_profile:
+ admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPmiqkvDH1/+MDAVDZT8381aYqp73Odz8cnD5hegNhqtXajqtiH0umVg7HybX3wt1HjcrwKJovZURcIbbcDvzdH2bnYbF93T4OLXA0bIfuIp6M86x1iutFtXdpN3TTicINrmSXEE2Ydm51iMu77B08ZERjVaToya2F7vC+egfoPvibf7OLxE336a5tPCywavvNihQjL8sjgpDT5AAScjb3YqK/6VLeQ18Ggt8/ufINsYkb+9/Ji/3OcGFeflnDXq80vPUyF3u4iIylob6RSZenC38cXmQB05tRNxS1B6BXCjMRdy0v4pa7oKM2GA4ADKpNrr0RI9ed+peRFwmsclH test@ansible
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ vm_size: Standard_DS1_v2
+ type: VirtualMachineScaleSets
+ node_resource_group: "node{{ noderpfx }}"
+ addon:
+ http_application_routing: {}
+ network_profile:
+ network_plugin: kubenet
+ load_balancer_sku: standard
+ enable_rbac: yes
+ register: output
+
+ - name: Assert the AKS instance is upgraded
+ assert:
+ that:
+ - output.changed
+ - output.kubernetes_version == version1.azure_aks_versions[0]
+ - output.addon.httpApplicationRouting.enabled == True
+ - output.agent_pool_profiles[0].count == 1
+ - output.network_profile.network_plugin == 'kubenet'
+
+ - name: Upgrade the AKS instance with addon (idempontent)
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ dns_prefix: "aks{{ rpfx }}"
+ kubernetes_version: "{{ version1.azure_aks_versions[0] }}"
+ service_principal:
+ client_id: "{{ azure_client_id }}"
+ linux_profile:
+ admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPmiqkvDH1/+MDAVDZT8381aYqp73Odz8cnD5hegNhqtXajqtiH0umVg7HybX3wt1HjcrwKJovZURcIbbcDvzdH2bnYbF93T4OLXA0bIfuIp6M86x1iutFtXdpN3TTicINrmSXEE2Ydm51iMu77B08ZERjVaToya2F7vC+egfoPvibf7OLxE336a5tPCywavvNihQjL8sjgpDT5AAScjb3YqK/6VLeQ18Ggt8/ufINsYkb+9/Ji/3OcGFeflnDXq80vPUyF3u4iIylob6RSZenC38cXmQB05tRNxS1B6BXCjMRdy0v4pa7oKM2GA4ADKpNrr0RI9ed+peRFwmsclH test@ansible
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ vm_size: Standard_DS1_v2
+ type: VirtualMachineScaleSets
+ node_resource_group: "node{{ noderpfx }}"
+ addon:
+ http_application_routing: {}
+ network_profile:
+ network_plugin: kubenet
+ load_balancer_sku: standard
+ enable_rbac: yes
+ register: output
+
+ - assert:
+ that:
+ - not output.changed
+
+ - name: Upgrade the AKS instance with agent pool profiles
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ dns_prefix: "aks{{ rpfx }}"
+ kubernetes_version: "{{ version1.azure_aks_versions[0] }}"
+ service_principal:
+ client_id: "{{ azure_client_id }}"
+ client_secret: "{{ azure_secret }}"
+ linux_profile:
+ admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPmiqkvDH1/+MDAVDZT8381aYqp73Odz8cnD5hegNhqtXajqtiH0umVg7HybX3wt1HjcrwKJovZURcIbbcDvzdH2bnYbF93T4OLXA0bIfuIp6M86x1iutFtXdpN3TTicINrmSXEE2Ydm51iMu77B08ZERjVaToya2F7vC+egfoPvibf7OLxE336a5tPCywavvNihQjL8sjgpDT5AAScjb3YqK/6VLeQ18Ggt8/ufINsYkb+9/Ji/3OcGFeflnDXq80vPUyF3u4iIylob6RSZenC38cXmQB05tRNxS1B6BXCjMRdy0v4pa7oKM2GA4ADKpNrr0RI9ed+peRFwmsclH test@ansible
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ vm_size: Standard_DS1_v2
+ type: VirtualMachineScaleSets
+ enable_auto_scaling: True
+ max_count: 6
+ min_count: 3
+ node_resource_group: "node{{ noderpfx }}"
+ enable_rbac: yes
+ network_profile:
+ load_balancer_sku: standard
+ register: output
+
+ - name: Assert the AKS instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.provisioning_state == 'Succeeded'
+
+ - name: Upgrade the AKS instance with agent pool profiles (idempontent)
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus
+ dns_prefix: "aks{{ rpfx }}"
+ kubernetes_version: "{{ version1.azure_aks_versions[0] }}"
+ service_principal:
+ client_id: "{{ azure_client_id }}"
+ client_secret: "{{ azure_secret }}"
+ linux_profile:
+ admin_username: azureuser
+ ssh_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDSPmiqkvDH1/+MDAVDZT8381aYqp73Odz8cnD5hegNhqtXajqtiH0umVg7HybX3wt1HjcrwKJovZURcIbbcDvzdH2bnYbF93T4OLXA0bIfuIp6M86x1iutFtXdpN3TTicINrmSXEE2Ydm51iMu77B08ZERjVaToya2F7vC+egfoPvibf7OLxE336a5tPCywavvNihQjL8sjgpDT5AAScjb3YqK/6VLeQ18Ggt8/ufINsYkb+9/Ji/3OcGFeflnDXq80vPUyF3u4iIylob6RSZenC38cXmQB05tRNxS1B6BXCjMRdy0v4pa7oKM2GA4ADKpNrr0RI9ed+peRFwmsclH test@ansible
+ agent_pool_profiles:
+ - name: default
+ count: 1
+ vm_size: Standard_DS1_v2
+ type: VirtualMachineScaleSets
+ enable_auto_scaling: True
+ max_count: 6
+ min_count: 3
+ node_resource_group: "node{{ noderpfx }}"
+ enable_rbac: yes
+ network_profile:
+ load_balancer_sku: standard
+ register: output
+
+ - name: Assert the AKS instance is well created
+ assert:
+ that:
+ - not output.changed
+
+ - name: Get AKS fact
+ azure_rm_aks_info:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ show_kubeconfig: user
+ register: fact
+
+ - name: Assert fact returns the created one
+ assert:
+ that:
+ - "fact.aks | length == 1"
+ - fact.aks[0].kube_config == output.kube_config
+
+ - name: Delete the AKS instance
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: output
+
+ - name: Assert the AKS instance is well deleted
+ assert:
+ that:
+ - output.changed
+
+ - name: Delete the AKS instance (idempotent)
+ azure_rm_aks:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: output
+
+ - name: Assert idempotent
+ assert:
+ that:
+ - not output.changed
+
+ - name: Get AKS fact
+ azure_rm_aks_info:
+ name: "aks{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ register: fact
+
+ - name: Assert fact returns empty
+ assert:
+ that:
+ - "fact.aks | length == 0"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/aliases
new file mode 100644
index 00000000..3b050cbc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+destructive
+shippable/azure/group6
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/files/cert1.txt b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/files/cert1.txt
new file mode 100644
index 00000000..82a13f4c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/files/cert1.txt
@@ -0,0 +1 @@
+MIIMAjCCCeqgAwIBAgITLQAAMpnXBx230XCKQgAAAAAymTANBgkqhkiG9w0BAQsFADCBizELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEVMBMGA1UECxMMTWljcm9zb2Z0IElUMR4wHAYDVQQDExVNaWNyb3NvZnQgSVQgVExTIENBIDUwHhcNMTcwNzIwMTc0NzA4WhcNMTkwNzEwMTc0NzA4WjAXMRUwEwYDVQQDEwx3d3cuYmluZy5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6jsg+/7DlIrdgFOcaDlK3RQ9sIgkJsgpj+ZxAbIe3ziyimIxjVlHX87pqgXcNhaYNbCFD0iPm+aUfbv4GDTLR+AIr8eSegqxZ+CBToYM67NhpVYra1KAvY4XgqxorO4FB9IWYJRqhI3SZeZ3lLK5t9XuUMicG8l52nJfpPdXXvBca2wUCq8FHEObG81vJzESA0htLLPTjdUWBQnXPiW5bqzlGHzzv8ISV6jtDLNNa5JRlhSlXho+6pCedhNF7MP4yTaantPvAELLRWX13VhjgoCcRCCu0s8rxW5DuVWl2Pb2iw35MFnNWlcoVwq0AjAfGA+xEba/WLid6qfkQctYjAgMBAAGjggfQMIIHzDAdBgNVHQ4EFgQUCYflhSl4MCAls91+3GztpSmoA3AwCwYDVR0PBAQDAgSwMB8GA1UdIwQYMBaAFAj+JZ906ocEwry7jqg4XzPG0WxlMIGsBgNVHR8EgaQwgaEwgZ6ggZuggZiGS2h0dHA6Ly9tc2NybC5taWNyb3NvZnQuY29tL3BraS9tc2NvcnAvY3JsL01pY3Jvc29mdCUyMElUJTIwVExTJTIwQ0ElMjA1LmNybIZJaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraS9tc2NvcnAvY3JsL01pY3Jvc29mdCUyMElUJTIwVExTJTIwQ0ElMjA1LmNybDCBhQYIKwYBBQUHAQEEeTB3MFEGCCsGAQUFBzAChkVodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL21zY29ycC9NaWNyb3NvZnQlMjBJVCUyMFRMUyUyMENBJTIwNS5jcnQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLm1zb2NzcC5jb20wPgYJKwYBBAGCNxUHBDEwLwYnKwYBBAGCNxUIh9qGdYPu2QGCyYUbgbWeYYX062CBXYTS30KC55N6AgFkAgEQMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATBNBgNVHSAERjBEMEIGCSsGAQQBgjcqATA1MDMGCCsGAQUFBwIBFidodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpL21zY29ycC9jcHMwJwYJKwYBBAGCNxUKBBowGDAKBggrBgEFBQcDAjAKBggrBgEFBQcDATCCBW0GA1UdEQSCBWQwggVgggx3d3cuYmluZy5jb22CEGRpY3QuYmluZy5jb20uY26CEyoucGxhdGZvcm0uYmluZy5jb22CCiouYmluZy5jb22CCGJpbmcuY29tghZpZW9ubGluZS5taWNyb3NvZnQuY29tghMqLndpbmRvd3NzZWFyY2guY29tghljbi5pZW9ubGluZS5taWNyb3NvZnQuY29tghEqLm9yaWdpbi5iaW5nLmNvbYINKi5tbS5iaW5nLm5ldIIOKi5hcGkuYmluZy5jb22CGGVjbi5kZXYudmlydHVhbGVhcnRoLm5ldIINKi5jbi5iaW5nLm5ldIINKi5jbi5iaW5nLmNvbYIQc3NsLWFwaS5iaW5nLmNvbYIQc3NsLWFwaS5iaW5nLm5ldIIOKi5hcGkuYmluZy5uZXSCDiouYmluZ2FwaXMuY29tgg9iaW5nc2FuZGJveC5jb22CFmZlZWRiYWNrLm1pY3Jvc29mdC5jb22CG2luc2VydG1lZGlhLmJpbmcub2ZmaWNlLm5ldIIOci5iYXQuYmluZy5jb22CECouci5iYXQuYmluZy5jb22CEiouZGljdC5iaW5nLmNvbS5jboIPKi5kaWN0LmJpbmcuY29tgg4qLnNzbC5iaW5nLmNvbYIQKi5hcHBleC5iaW5nLmNvbYIWKi5wbGF0Zm9ybS5jbi5iaW5nLmNvbYINd3AubS5iaW5nLmNvbYIMKi5tLmJpbmcuY29tgg9nbG9iYWwuYmluZy5jb22CEXdpbmRvd3NzZWFyY2guY29tgg5zZWFyY2gubXNuLmNvbYIRKi5iaW5nc2FuZGJveC5jb22CGSouYXBpLnRpbGVzLmRpdHUubGl2ZS5jb22CDyouZGl0dS5saXZlLmNvbYIYKi50MC50aWxlcy5kaXR1LmxpdmUuY29tghgqLnQxLnRpbGVzLmRpdHUubGl2ZS5jb22CGCoudDIudGlsZXMuZGl0dS5saXZlLmNvbYIYKi50My50aWxlcy5kaXR1LmxpdmUuY29tghUqLnRpbGVzLmRpdHUubGl2ZS5jb22CCzNkLmxpdmUuY29tghNhcGkuc2VhcmNoLmxpdmUuY29tghRiZXRhLnNlYXJjaC5saXZlLmNvbYIVY253ZWIuc2VhcmNoLmxpdmUuY29tggxkZXYubGl2ZS5jb22CDWRpdHUubGl2ZS5jb22CEWZhcmVjYXN0LmxpdmUuY29tgg5pbWFnZS5saXZlLmNvbYIPaW1hZ2VzLmxpdmUuY29tghFsb2NhbC5saXZlLmNvbS5hdYIUbG9jYWxzZWFyY2gubGl2ZS5jb22CFGxzNGQuc2VhcmNoLmxpdmUuY29tgg1tYWlsLmxpdmUuY29tghFtYXBpbmRpYS5saXZlLmNvbYIObG9jYWwubGl2ZS5jb22CDW1hcHMubGl2ZS5jb22CEG1hcHMubGl2ZS5jb20uYXWCD21pbmRpYS5saXZlLmNvbYINbmV3cy5saXZlLmNvbYIcb3JpZ2luLmNud2ViLnNlYXJjaC5saXZlLmNvbYIWcHJldmlldy5sb2NhbC5saXZlLmNvbYIPc2VhcmNoLmxpdmUuY29tghJ0ZXN0Lm1hcHMubGl2ZS5jb22CDnZpZGVvLmxpdmUuY29tgg92aWRlb3MubGl2ZS5jb22CFXZpcnR1YWxlYXJ0aC5saXZlLmNvbYIMd2FwLmxpdmUuY29tghJ3ZWJtYXN0ZXIubGl2ZS5jb22CE3dlYm1hc3RlcnMubGl2ZS5jb22CFXd3dy5sb2NhbC5saXZlLmNvbS5hdYIUd3d3Lm1hcHMubGl2ZS5jb20uYXUwDQYJKoZIhvcNAQELBQADggIBADTpW/UWeupk40OP6k4yxihKStswxwqPAfMRmx4XyqmTAawAKRNM+6EZth1BQdPdOplwRTvs69kkmUHJH+ZjYXBezEACWkzEiNUQnzkRWajdSQIz08Ubj/mBD6U8xLYD+NXgiB0xNWabd8aiPsqPaj6I3qkNw4JvtgtHZQG1zlwC5/Lu6yV3DM3sKpQMyBmOnX6nVUiS0MTOzLgZOQzRk07nO7EXWGcKTmDBjE8cqv5IA/jQ6gtaxCI5pDxfXK4ct7oQyoChfxOXcEDKMmMndFmg9ch5c4an/FRM2cgzDfjR01A71LNUpLUdOjNV0T+ZEStqEpdyDFfjrHGDtzLyqEz3iyvvQFyjmlGh6OtZXwjCPpnVSrKCmfJKio0kUxyq+6t5tZAQbPVgFKiMrVnU+sgvmNVip1toijyz8vMVCkwJ2G++7xjJukoELMxZ50W4/SAMZLy1Asx02NBwYCu9+CTQPVnmPe7rmxhlQRBOfDNa1+5jwRHY64YudEzKhWR1uqS3ABd/fk+TL86yuNYGAgxnOm1FtOGieRgViV3+NzC+bDbuUOtmbD/GvDGmRwJRcCTHL7jBmkHePh2ABY93NE/IbkaDP6l1Kw98AfqkzSUxhqHXuThe7KIoX9/0zv4AA1WZFis1QvAG7dpl9eio6vCdC/73HvBAlqRL+7Mb1uu0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/files/cert2.txt b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/files/cert2.txt
new file mode 100644
index 00000000..a539dbca
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/files/cert2.txt
@@ -0,0 +1 @@
+MIIKsQIBAzCCCm0GCSqGSIb3DQEHAaCCCl4EggpaMIIKVjCCBg8GCSqGSIb3DQEHAaCCBgAEggX8MIIF+DCCBfQGCyqGSIb3DQEMCgECoIIE/jCCBPowHAYKKoZIhvcNAQwBAzAOBAj37r+wRsc6/gICB9AEggTY1V5HNscO+2bZb7JSMme1ljERe7DCiRE2cJsPKlwW2/NEiSqAUX7gXKK0ISr6Dto71rFdza0uPwbcQoPN1QwkJHSAkxWg4OcAx2kf7077tlHhf5rzxTn5V3wXM0Q3h6NsDjSqSHjYVISIiXItUzlDaBpMY/NUFNCTyJR5I91MWsljrJ/bQaAIo57HJR9nzjY5DaBA9P3bAhmX5LJRGsJWoCEaGeeVQ3Yn6yD06ordiJnf6dNxqQGN+o2x54gqfmw+RnoC2f8VAsTIfb3fwJPKdg2JiJIa6Ms2Sc8VR7VGmZt34qZwTPBrzeqJjtIMT41bBae46lmma8ypYwErqzOYSrHqXPXzaxlloYy81HYWAsJTWyBxTsVBcLom5m9ru79+SKG35xY1wSkzZmWMNFfVRFCJy/X+h2ErrGYjogCHYaIUmiosvUccwRUXGU083ul9iTcz/Dl79VBz63OFX/CnZMDTQ8ugbqpvW78pAnBU0r8MUubHciD1sJG2zmMlxCAzan6BLm9OMyhTNIbzYOjQQw99MQQys/ZeyNLqTFHTeGRfU2ewqgHjbH2PYCQfjipXSmdmsSsGxlLA9AOtwAk3QKJ77P03HRGOeXmy/I4iIHuIQuaQcjfprNR2fI36dftDo7U4gvRQHkiti+zNVqpi3/hIc2k7O8bCcMeSvfIlUvWIPUrUceZmpVPpLdcFcQbN9+1nZwiFYydOhrPnlp40rSO3RM08EmQUfRYt8fwRFcoWBX3b411vOqZVGeMfMtThMYI53R4Cmh5tUp93FslHNmIfnuewhHfIm+vtCicLcW6TaC2l4EqmNf0flK5m5nANotCfqj87MPsB83qPwol/91BTKaxuH2hKrZDgU1ibPE8NhzBinp2ANi0BHK3Sl0CsC2MPyZpFY+4MWvk/SI9ex4VsKYKmhubOFkhDLLBZH0UEmUdNTH4Gd76GsDnfI9arR2ctM9ecTPeu74hKiHlNZhc4U3TX20FBeqF5tZYnfCLRhvdiNM9AlwEKqqQEe0W7PrALcNVdjhJl0X9+0Br28E3RKZQRITWa10Vjmh0WcYrzEQ3/qEZYbqVpHMp+kdrHxB65v0zlGxjdwyKzafLzqYXmaHOyVlFnkayNaAkVVxOCzNrxB9HfhjvhjWafeMvA0p7O9CxTD2xPEhUaHQ5j7L8F0alfMYcg73SdGHAcY6AV8+eh0jqs3IF68cquXOl5Bm8uYKRjtgl9nY6hYc0lRDdtFHZo8ayNDr0cltNU7XZTaCKVNSDTRn92rTNJY0E3PD5HSKcRi58WJrIgEDGasyleRkRlGTY7512Qut0rg7m1Eyp6MK+sNmSSA7cR70pH7I1dwy4VrJMODdMH11y1QJF2EQWQdN00Js54tjVgTIO3btb5N7jhNYpRedv0a4UZ8TdDI4ZMCMf3SdP3xbQ06M1pFrS8WQzwp3KTk8vmnseJL84n0hC8KqWmGmTWHTa9dwmopeM6Xh/Jm1pkrgrloxqfSlscGEJE0plAnk1mLx29FxswfZ6a7pNKg7CydK4SiDkqM+pWukPbgKODqYPUvS0nk3RGGXvZSIzTbvm77tF+MqXOb6Rn+IflIk4yZsjIBQA0I/bQ78YDzXUVsrtAi9waRoCZs+L48NUy4zpKn25FMqkrziVn+TGB4jANBgkrBgEEAYI3EQIxADATBgkqhkiG9w0BCRUxBgQEAQAAADBdBgkqhkiG9w0BCRQxUB5OAHQAZQAtAGMANwBmADEAYwBhADYAMQAtADQAOAA1ADQALQA0ADgAZQBmAC0AYQAwADgANQAtAGQANABhADIAZgA1AGYAOAAyADcAZAAxMF0GCSsGAQQBgjcRATFQHk4ATQBpAGMAcgBvAHMAbwBmAHQAIABTAHQAcgBvAG4AZwAgAEMAcgB5AHAAdABvAGcAcgBhAHAAaABpAGMAIABQAHIAbwB2AGkAZABlAHIwggQ/BgkqhkiG9w0BBwagggQwMIIELAIBADCCBCUGCSqGSIb3DQEHATAcBgoqhkiG9w0BDAEDMA4ECFcAfrkm3ibUAgIH0ICCA/hlBog8GY9GCpucTwAxBGa0cOGQ29EK0xfrmY/Dv59IeJhRr47Mvl1XNk5PIInb64RsOVr00jrJAbfgLLKMBowcQLT7k6jGbGBdOzC57x9DNP0VuHsIIym0Z+SpJgEWBbtdBTGzgNw/YoXYxT4Rtka9ScSyCFjmmCzXz7bGLqC7yrGb7BzigQ9y4u4bg0pf75pERzN8rJM29Ob2IydkgARfpmbNKjdMCtD6dI7tafG2lQfUX6sgQY+Sy5HTz3ansN8X1yv2WQTu8Drxf2ce55v4WrFbPTTND94ubgDt7jvbCe1DuNP1DAYmQ5pbW0GGqF1x2csK5WWD7J8FD08VaQFM8y8pGIUeUkN4rYU3eTdTAQe+ec2hOr9QZn1Sb/p5u4KqIMn4MSCQ8EU0gXa2JETdUjXPr/5JFZTidJYagRyMIkYnwg9uusikctulaBsHMBKMYQ0Z19CEbcd2phdoxWTrtp7kwwjnu64zPgE6ALe9yJOT8AFEB6H1c16Z+aPGj9hbhkh6tcdGWUvzDYq08wjKjP3nA78StIisUmeZPfAXJUquPzRZr0pmcwYWfyP54TdC2BvPlLW/QXVV44IGxUdLuI6mz4p+O2+xKu9QMFwdcpij2ZK4uMrBLDo7ZoTQ4rBRnn471AMUKgeP0D5tbl8PygUU1RqHv34ok3fwx0WglzdMQJyt53PiPWW4lipwUtUfd0eD8CXoMccf8XJmugVUBCD1wQsyCW6RrR9RX8HXVBrm5O2HKfJcQYznl3qHqXb6ofvbOQ3S+v0ALN+sma8Tn6JceVTAOH+UuMdcu0FIDYnpmrvMecnJ2kbs1Y35mj4rSJyP5PGLg+ygb9VlBPwCCem/jHL+YivN38+0oWqfn2slyI4FNKX+5U8M6xpiEaq6McKwKZC1d51A4dUdMAkO2d1Z6rVjqhKeqE6HWD9A0cyPBFZpNQskUfNDW8qILLEfEjhBi+s1LkHzKDykCN/ReFfRiQS84DekoC59cymM8Hs1geMWCMFWfut4HTd7ItYaiJz5qpYVY4U/8myhyWnrktjLjQ6OkdM9bBDIpRHj95MYEC26NlWQZwjk+yynPTZf0w5p2Ok6Dq2shJFykuJ1VkelgvsPe8qMa55Wp11dpREIFzXouPXNP/vFpziZcl1OKTd7Dwa+ruQFRfsoZGzupsBOYxrmYqr6kOm5mzMW0HAlsWwl5mY2aSQMvXBE6k32xTkPIlIp763Ee4m6cmx4+SDcO5D+a9t05QY4JmssL+x3T9qsbXSXDPEsg0cfVvuQYy9AYkIFOes4G45IagRAvhQQj9bEh8kTvp8CFDDtIrbWjX50zreb51VcAcEkIOLyROtIdLem0zA7MB8wBwYFKw4DAhoEFC0i4I5iwNYQug0vTVS0JC/Qm+/NBBTsUM0D9QxIZYUi+qlDy14sOcEaUwICB9A=
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/tasks/main.yml
new file mode 100644
index 00000000..ca52c7b0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appgateway/tasks/main.yml
@@ -0,0 +1,401 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create a virtual network
+ azure_rm_virtualnetwork:
+ name: vnet{{ rpfx }}
+ resource_group: "{{ resource_group }}"
+ address_prefixes_cidr:
+ - 10.1.0.0/16
+ - 172.100.0.0/16
+ dns_servers:
+ - 127.0.0.1
+ - 127.0.0.2
+- name: Create a subnet
+ azure_rm_subnet:
+ name: subnet{{ rpfx }}
+ virtual_network_name: vnet{{ rpfx }}
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: 10.1.0.0/24
+ register: subnet_output
+
+- name: Create instance of Application Gateway -- check mode
+ azure_rm_appgateway:
+ resource_group: "{{ resource_group }}"
+ name: "appgateway{{ rpfx }}"
+ sku:
+ name: standard_small
+ tier: standard
+ capacity: 2
+ ssl_policy:
+ policy_type: predefined
+ policy_name: ssl_policy20150501
+ disabled_ssl_protocols:
+ - tls_v1_0
+ cipher_suites:
+ - tls_ecdhe_ecdsa_with_aes_256_gcm_sha384
+ authentication_certificates:
+ - name: cert1
+ data: "{{ lookup('file', 'cert1.txt') }}"
+ ssl_certificates:
+ - name: cert2
+ password: your-password
+ data: "{{ lookup('file', 'cert2.txt') }}"
+ gateway_ip_configurations:
+ - subnet:
+ id: "{{ subnet_output.state.id }}"
+ name: app_gateway_ip_config
+ frontend_ip_configurations:
+ - subnet:
+ id: "{{ subnet_output.state.id }}"
+ name: sample_gateway_frontend_ip_config
+ frontend_ports:
+ - port: 90
+ name: ag_frontend_port
+ - port: 80
+ name: http_frontend_port
+ backend_address_pools:
+ - backend_addresses:
+ - ip_address: 10.0.0.4
+ name: test_backend_address_pool
+ probes:
+ - name: custom_probe
+ protocol: http
+ host: 10.0.0.4
+ path: /healthz
+ interval: 30
+ timeout: 30
+ unhealthy_threshold: 3
+ backend_http_settings_collection:
+ - port: 80
+ protocol: http
+ cookie_based_affinity: enabled
+ probe: custom_probe
+ name: sample_appgateway_http_settings
+ http_listeners:
+ - frontend_ip_configuration: sample_gateway_frontend_ip_config
+ frontend_port: ag_frontend_port
+ protocol: https
+ ssl_certificate: cert2
+ name: sample_http_listener
+ - frontend_ip_configuration: sample_gateway_frontend_ip_config
+ frontend_port: http_frontend_port
+ protocol: http
+ name: http_listener
+ request_routing_rules:
+ - rule_type: basic
+ backend_address_pool: test_backend_address_pool
+ backend_http_settings: sample_appgateway_http_settings
+ http_listener: sample_http_listener
+ name: rule1
+ - rule_type: basic
+ http_listener: http_listener
+ redirect_configuration: redirect_site_to_https
+ name: http_redirect_rule
+ redirect_configurations:
+ - redirect_type: permanent
+ target_listener: sample_http_listener
+ include_path: true
+ include_query_string: true
+ name: redirect_site_to_https
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: dump
+ debug:
+ var: output
+
+- name: Create instance of Application Gateway
+ azure_rm_appgateway:
+ resource_group: "{{ resource_group }}"
+ name: "appgateway{{ rpfx }}"
+ sku:
+ name: standard_small
+ tier: standard
+ capacity: 2
+ ssl_policy:
+ policy_type: predefined
+ policy_name: ssl_policy20150501
+ disabled_ssl_protocols:
+ - tls_v1_0
+ cipher_suites:
+ - tls_ecdhe_ecdsa_with_aes_256_gcm_sha384
+ authentication_certificates:
+ - name: cert1
+ data: "{{ lookup('file', 'cert1.txt') }}"
+ ssl_certificates:
+ - name: cert2
+ password: your-password
+ data: "{{ lookup('file', 'cert2.txt') }}"
+ gateway_ip_configurations:
+ - subnet:
+ id: "{{ subnet_output.state.id }}"
+ name: app_gateway_ip_config
+ frontend_ip_configurations:
+ - subnet:
+ id: "{{ subnet_output.state.id }}"
+ name: sample_gateway_frontend_ip_config
+ frontend_ports:
+ - port: 90
+ name: ag_frontend_port
+ - port: 80
+ name: http_frontend_port
+ backend_address_pools:
+ - backend_addresses:
+ - ip_address: 10.0.0.4
+ name: test_backend_address_pool
+ probes:
+ - name: custom_probe
+ protocol: http
+ host: 10.0.0.4
+ path: /healthz
+ interval: 30
+ timeout: 30
+ unhealthy_threshold: 3
+ backend_http_settings_collection:
+ - port: 80
+ protocol: http
+ cookie_based_affinity: enabled
+ probe: custom_probe
+ name: sample_appgateway_http_settings
+ http_listeners:
+ - frontend_ip_configuration: sample_gateway_frontend_ip_config
+ frontend_port: ag_frontend_port
+ protocol: https
+ ssl_certificate: cert2
+ name: sample_http_listener
+ - frontend_ip_configuration: sample_gateway_frontend_ip_config
+ frontend_port: http_frontend_port
+ protocol: http
+ name: http_listener
+ request_routing_rules:
+ - rule_type: Basic
+ backend_address_pool: test_backend_address_pool
+ backend_http_settings: sample_appgateway_http_settings
+ http_listener: sample_http_listener
+ name: rule1
+ - rule_type: Basic
+ http_listener: http_listener
+ redirect_configuration: redirect_site_to_https
+ name: http_redirect_rule
+ redirect_configurations:
+ - redirect_type: permanent
+ target_listener: sample_http_listener
+ include_path: true
+ include_query_string: true
+ name: redirect_site_to_https
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Try to update instance of Application Gateway - no change
+ azure_rm_appgateway:
+ resource_group: "{{ resource_group }}"
+ name: "appgateway{{ rpfx }}"
+ sku:
+ name: standard_small
+ tier: standard
+ capacity: 2
+ ssl_policy:
+ policy_type: predefined
+ policy_name: ssl_policy20150501
+ disabled_ssl_protocols:
+ - tls_v1_0
+ cipher_suites:
+ - tls_ecdhe_ecdsa_with_aes_256_gcm_sha384
+ authentication_certificates:
+ - name: cert1
+ data: "{{ lookup('file', 'cert1.txt') }}"
+ ssl_certificates:
+ - name: cert2
+ password: your-password
+ data: "{{ lookup('file', 'cert2.txt') }}"
+ gateway_ip_configurations:
+ - subnet:
+ id: "{{ subnet_output.state.id }}"
+ name: app_gateway_ip_config
+ frontend_ip_configurations:
+ - subnet:
+ id: "{{ subnet_output.state.id }}"
+ name: sample_gateway_frontend_ip_config
+ frontend_ports:
+ - port: 90
+ name: ag_frontend_port
+ - port: 80
+ name: http_frontend_port
+ backend_address_pools:
+ - backend_addresses:
+ - ip_address: 10.0.0.4
+ name: test_backend_address_pool
+ probes:
+ - name: custom_probe
+ protocol: http
+ host: 10.0.0.4
+ path: /healthz
+ interval: 30
+ timeout: 30
+ unhealthy_threshold: 3
+ backend_http_settings_collection:
+ - port: 80
+ protocol: http
+ cookie_based_affinity: enabled
+ probe: custom_probe
+ name: sample_appgateway_http_settings
+ http_listeners:
+ - frontend_ip_configuration: sample_gateway_frontend_ip_config
+ frontend_port: ag_frontend_port
+ protocol: https
+ ssl_certificate: cert2
+ name: sample_http_listener
+ - frontend_ip_configuration: sample_gateway_frontend_ip_config
+ frontend_port: http_frontend_port
+ protocol: http
+ name: http_listener
+ request_routing_rules:
+ - rule_type: Basic
+ backend_address_pool: test_backend_address_pool
+ backend_http_settings: sample_appgateway_http_settings
+ http_listener: sample_http_listener
+ name: rule1
+ - rule_type: Basic
+ http_listener: http_listener
+ redirect_configuration: redirect_site_to_https
+ name: http_redirect_rule
+ redirect_configurations:
+ - redirect_type: permanent
+ target_listener: sample_http_listener
+ include_path: true
+ include_query_string: true
+ name: redirect_site_to_https
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - not output.changed
+
+- name: Try to update instance of Application Gateway - single change
+ azure_rm_appgateway:
+ resource_group: "{{ resource_group }}"
+ name: "appgateway{{ rpfx }}"
+ sku:
+ name: standard_small
+ tier: standard
+ capacity: 2
+ ssl_policy:
+ policy_type: predefined
+ policy_name: ssl_policy20150501
+ disabled_ssl_protocols:
+ - tls_v1_0
+ cipher_suites:
+ - tls_ecdhe_ecdsa_with_aes_256_gcm_sha384
+ authentication_certificates:
+ - name: cert1
+ data: "{{ lookup('file', 'cert1.txt') }}"
+ ssl_certificates:
+ - name: cert2
+ password: your-password
+ data: "{{ lookup('file', 'cert2.txt') }}"
+ gateway_ip_configurations:
+ - subnet:
+ id: "{{ subnet_output.state.id }}"
+ name: app_gateway_ip_config
+ frontend_ip_configurations:
+ - subnet:
+ id: "{{ subnet_output.state.id }}"
+ name: sample_gateway_frontend_ip_config
+ frontend_ports:
+ - port: 90
+ name: ag_frontend_port
+ - port: 80
+ name: http_frontend_port
+ backend_address_pools:
+ - backend_addresses:
+ - ip_address: 10.0.0.4
+ name: test_backend_address_pool
+ probes:
+ - name: custom_probe
+ protocol: http
+ host: 10.0.0.4
+ path: /healthz
+ interval: 30
+ timeout: 30
+ unhealthy_threshold: 3
+ backend_http_settings_collection:
+ - port: 81
+ protocol: http
+ cookie_based_affinity: enabled
+ probe: custom_probe
+ name: sample_appgateway_http_settings
+ http_listeners:
+ - frontend_ip_configuration: sample_gateway_frontend_ip_config
+ frontend_port: ag_frontend_port
+ protocol: https
+ ssl_certificate: cert2
+ name: sample_http_listener
+ - frontend_ip_configuration: sample_gateway_frontend_ip_config
+ frontend_port: http_frontend_port
+ protocol: http
+ name: http_listener
+ request_routing_rules:
+ - rule_type: Basic
+ backend_address_pool: test_backend_address_pool
+ backend_http_settings: sample_appgateway_http_settings
+ http_listener: sample_http_listener
+ name: rule1
+ - rule_type: Basic
+ http_listener: http_listener
+ redirect_configuration: redirect_site_to_https
+ name: http_redirect_rule
+ redirect_configurations:
+ - redirect_type: permanent
+ target_listener: sample_http_listener
+ include_path: true
+ include_query_string: true
+ name: redirect_site_to_https
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of Application Gateway -- check mode
+ azure_rm_appgateway:
+ resource_group: "{{ resource_group }}"
+ name: "appgateway{{ rpfx }}"
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of Application Gateway
+ azure_rm_appgateway:
+ resource_group: "{{ resource_group }}"
+ name: "appgateway{{ rpfx }}"
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of Application Gateway
+ azure_rm_appgateway:
+ resource_group: "{{ resource_group }}"
+ name: "appgateway{{ rpfx }}"
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/aliases
new file mode 100644
index 00000000..a6b233ed
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group4
+unstable
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/tasks/main.yml
new file mode 100644
index 00000000..f5746232
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_appserviceplan/tasks/main.yml
@@ -0,0 +1,84 @@
+- name: Prepare facts
+ set_fact:
+ linux_plan_resource_group: "{{ resource_group_secondary }}"
+ win_plan_name: "{{ (resource_prefix | replace('-','x'))[-8:] }}winplan"
+ linux_plan_name: "{{ (resource_prefix | replace('-','x'))[-8:] }}linplan"
+
+- name: create a windows plan
+ azure_rm_appserviceplan:
+ name: "{{ win_plan_name }}1"
+ resource_group: "{{ resource_group }}"
+ sku: B1
+ register: output
+
+- name: assert app service was created
+ assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: create a linux plan
+ azure_rm_appserviceplan:
+ resource_group: "{{ linux_plan_resource_group }}"
+ name: "{{ linux_plan_name }}1"
+ sku: S1
+ is_linux: true
+ number_of_workers: 1
+ register: output
+
+- name: assert app service was created
+ assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: get app service plan by name
+ azure_rm_appserviceplan_info:
+ resource_group: "{{ linux_plan_resource_group }}"
+ name: "{{ linux_plan_name }}1"
+ register: output
+
+- name: assert is_linux is True
+ assert:
+ that:
+ - output.appserviceplans | length == 1
+ - output.appserviceplans[0].is_linux == True
+
+- name: create linux app service plan idempotent
+ azure_rm_appserviceplan:
+ resource_group: "{{ linux_plan_resource_group }}"
+ name: "{{ linux_plan_name }}1"
+ sku: S1
+ is_linux: true
+ number_of_workers: 1
+ register: output
+
+- name: assert app service was created
+ assert:
+ that: not output.changed
+
+- name: update a windows plan sku
+ azure_rm_appserviceplan:
+ name: "{{ win_plan_name }}1"
+ resource_group: "{{ resource_group }}"
+ sku: B2
+ register: output
+
+- name: assert app service was updated
+ assert:
+ that:
+ - output.changed
+
+- name: update a linux plan number of workers
+ azure_rm_appserviceplan:
+ resource_group: "{{ linux_plan_resource_group }}"
+ name: "{{ linux_plan_name }}1"
+ sku: S1
+ is_linux: true
+ number_of_workers: 2
+ register: output
+
+- name: assert app service was updated
+ assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/aliases
new file mode 100644
index 00000000..bd71a19e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group11
+destructive
+azure_rm_automationaccount_facts
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/tasks/main.yml
new file mode 100644
index 00000000..1e00eb9a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_automationaccount/tasks/main.yml
@@ -0,0 +1,88 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ name: "account{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create automation account
+ azure_rm_automationaccount:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create automation account
+ azure_rm_automationaccount:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: Create automation account
+ azure_rm_automationaccount:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Get automation account
+ azure_rm_automationaccount_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ list_statistics: yes
+ list_usages: yes
+ list_keys: yes
+ register: facts
+
+- assert:
+ that:
+ - facts.automation_accounts | length == 1
+ - facts.automation_accounts[0].keys
+ - facts.automation_accounts[0].usages
+ - facts.automation_accounts[0].statistics
+ - facts.automation_accounts[0].state == "Ok"
+
+- name: Delete account
+ azure_rm_automationaccount:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Delete account
+ azure_rm_automationaccount:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Delete account
+ azure_rm_automationaccount:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - not output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/aliases
new file mode 100644
index 00000000..ed266f35
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group14
+destructive
+azure_rm_autoscale
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/tasks/main.yml
new file mode 100644
index 00000000..c7b6f5c0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_autoscale/tasks/main.yml
@@ -0,0 +1,221 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ name: "scale{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: testVnet
+ address_prefixes: "10.0.0.0/16"
+
+- name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: testSubnet
+ address_prefix: "10.0.1.0/24"
+ virtual_network: testVnet
+
+- name: Create VMSS
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}
+ vm_size: Standard_DS1_v2
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ capacity: 2
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ upgrade_policy: Manual
+ tier: Standard
+ managed_disk_type: Standard_LRS
+ os_disk_caching: ReadWrite
+ image:
+ offer: CentOS
+ publisher: OpenLogic
+ sku: "8_2"
+ version: latest
+ data_disks:
+ - lun: 0
+ disk_size_gb: 64
+ caching: ReadWrite
+ managed_disk_type: Standard_LRS
+ register: vmss
+
+- name: create auto scaling (check mode)
+ azure_rm_autoscale:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ target: "{{ vmss.ansible_facts.azure_vmss.id }}"
+ enabled: true
+ profiles:
+ - count: '1'
+ recurrence_days:
+ - Monday
+ name: Auto created scale condition
+ recurrence_timezone: China Standard Time
+ recurrence_mins:
+ - '0'
+ min_count: '1'
+ max_count: '1'
+ recurrence_frequency: Week
+ recurrence_hours:
+ - '18'
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: create auto scaling
+ azure_rm_autoscale:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ target:
+ name: "testVMSS{{ rpfx }}"
+ types: "virtualMachineScaleSets"
+ namespace: "Microsoft.Compute"
+ enabled: true
+ profiles:
+ - count: '1'
+ recurrence_days:
+ - Monday
+ name: Auto created scale condition
+ recurrence_timezone: China Standard Time
+ recurrence_mins:
+ - '0'
+ min_count: '1'
+ max_count: '1'
+ recurrence_frequency: Week
+ recurrence_hours:
+ - '18'
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: create auto scaling (idemponent)
+ azure_rm_autoscale:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ target: "{{ vmss.ansible_facts.azure_vmss.id }}"
+ enabled: true
+ profiles:
+ - count: '1'
+ recurrence_days:
+ - Monday
+ name: Auto created scale condition
+ recurrence_timezone: China Standard Time
+ recurrence_mins:
+ - '0'
+ min_count: '1'
+ max_count: '1'
+ recurrence_frequency: Week
+ recurrence_hours:
+ - '18'
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+ - output.id
+
+- name: update auto scaling
+ azure_rm_autoscale:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ target: "{{ vmss.ansible_facts.azure_vmss.id }}"
+ enabled: true
+ profiles:
+ - count: '1'
+ recurrence_days:
+ - Monday
+ name: Auto created scale condition 0
+ rules:
+ - time_aggregation: Average
+ time_window: 10
+ direction: Increase
+ metric_name: Percentage CPU
+ metric_resource_uri: "{{ vmss.ansible_facts.azure_vmss.id }}"
+ value: '1'
+ threshold: 70
+ cooldown: 5
+ time_grain: 1
+ statistic: Average
+ operator: GreaterThan
+ type: ChangeCount
+ max_count: '1'
+ recurrence_mins:
+ - '0'
+ min_count: '1'
+ recurrence_timezone: China Standard Time
+ recurrence_frequency: Week
+ recurrence_hours:
+ - '6'
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.profiles[0].rules[0].metric_resource_uri == vmss.ansible_facts.azure_vmss.id
+
+- name: delete auto scaling (check mode)
+ azure_rm_autoscale:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ state: absent
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: delete auto scaling
+ azure_rm_autoscale:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: delete auto scaling (idemponetent)
+ azure_rm_autoscale:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Clean VMSS
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ vm_size: Standard_DS1_v2
+ name: testVMSS{{ rpfx }}
+ state: absent
+
+- name: Clean subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: testSubnet
+ virtual_network: testVnet
+ state: absent
+
+- name: Clean virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: testVnet
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/aliases
new file mode 100644
index 00000000..17456633
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group2
+destructive
+azure_rm_availalibityset_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/tasks/main.yml
new file mode 100644
index 00000000..8127d3c1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_availabilityset/tasks/main.yml
@@ -0,0 +1,136 @@
+- name: Create an availability set with default options
+ azure_rm_availabilityset:
+ name: myavailabilityset1
+ resource_group: "{{ resource_group }}"
+ tags:
+ tag1: testtag
+ register: results
+
+- assert:
+ that: results.changed
+
+- name: Create an availability set with advanced options
+ azure_rm_availabilityset:
+ name: myavailabilityset2
+ resource_group: "{{ resource_group }}"
+ platform_update_domain_count: 5
+ platform_fault_domain_count: 2
+ sku: Aligned
+ register: results
+
+- assert:
+ that: results.changed
+
+- name: Modify availabilty set immutable options - no changes, fail for immutable options
+ azure_rm_availabilityset:
+ name: myavailabilityset2
+ resource_group: "{{ resource_group }}"
+ platform_update_domain_count: 2
+ platform_fault_domain_count: 2
+ sku: Aligned
+ register: results
+ ignore_errors: yes
+
+- assert:
+ that:
+ - not results.changed
+ - results.msg == 'You tried to change platform_update_domain_count but is was unsuccessful. An Availability Set is immutable, except tags'
+
+- name: Modify availabilty set immutable options and set tags - change tags and fail for immutable options
+ azure_rm_availabilityset:
+ name: myavailabilityset2
+ resource_group: "{{ resource_group }}"
+ platform_update_domain_count: 2
+ platform_fault_domain_count: 2
+ sku: Aligned
+ tags:
+ test1: modified
+ register: results
+ ignore_errors: yes
+
+- assert:
+ that:
+ - not results.changed
+ - results.msg == 'You tried to change platform_update_domain_count but is was unsuccessful. An Availability Set is immutable, except tags'
+
+- name: Modify availabilty set options to update tags
+ azure_rm_availabilityset:
+ name: myavailabilityset2
+ resource_group: "{{ resource_group }}"
+ platform_update_domain_count: 5
+ platform_fault_domain_count: 2
+ sku: Aligned
+ tags:
+ test2: modified
+ register: results
+
+- assert:
+ that:
+ - results.state.tags.test2 == 'modified'
+
+- name: Create availability set with incorrect fault domain parameter
+ azure_rm_availabilityset:
+ name: myavailabilityset3
+ resource_group: "{{ resource_group }}"
+ platform_update_domain_count: 5
+ platform_fault_domain_count: 4
+ sku: Aligned
+ register: results
+ ignore_errors: yes
+
+- assert:
+ { that: "'The specified fault domain count 4 must fall in the range 1 to' in results['msg']" }
+
+- name: Test check_mode
+ azure_rm_availabilityset:
+ name: myavailabilityset2
+ resource_group: "{{ resource_group }}"
+ platform_update_domain_count: 5
+ platform_fault_domain_count: 2
+ sku: Aligned
+ tags:
+ checktest1: modified1
+ checktest2: modified2
+ check_mode: yes
+ register: results
+
+- assert:
+ that:
+ - not results.changed
+ - results.state.tags.checktest1 == 'modified1'
+
+#
+# azure_rm_availabilityset_facts tests
+#
+- name: Get facts for created availability set
+ azure_rm_availabilityset_info:
+ name: myavailabilityset2
+ resource_group: "{{ resource_group }}"
+ register: results
+
+- assert:
+ that:
+ - not results.changed
+ - not results.failed
+ - results.ansible_info.azure_availabilitysets[0].properties.platformFaultDomainCount == 2
+ - results.ansible_info.azure_availabilitysets[0].properties.platformUpdateDomainCount == 5
+ - results.ansible_info.azure_availabilitysets[0].sku == 'Aligned'
+
+
+- name: Delete an availability set
+ azure_rm_availabilityset:
+ name: myavailabilityset1
+ resource_group: "{{ resource_group }}"
+ state: absent
+
+- name: Delete an availability set
+ azure_rm_availabilityset:
+ name: myavailabilityset2
+ resource_group: "{{ resource_group }}"
+ state: absent
+
+- name: Delete an availability set
+ azure_rm_availabilityset:
+ name: myavailabilityset3
+ resource_group: "{{ resource_group }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/aliases
new file mode 100644
index 00000000..239e3657
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group4
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/tasks/main.yml
new file mode 100644
index 00000000..face59c2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_azurefirewall/tasks/main.yml
@@ -0,0 +1,277 @@
+- name: Fix resource prefix
+ set_fact:
+ virtual_network_name: myVirtualNetwork
+ subnet_name: AzureFirewallSubnet
+ public_ipaddress_name: myPublicIpAddress
+ azure_firewall_name: myFirewall
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ name: "{{ virtual_network_name }}"
+ address_prefixes_cidr:
+ - 10.1.0.0/16
+ - 172.100.0.0/16
+ dns_servers:
+ - 127.0.0.1
+ - 127.0.0.3
+ tags:
+ testing: testing
+ delete: on-exit
+ resource_group: "{{ resource_group }}"
+
+- name: Create subnet
+ azure_rm_subnet:
+ name: "{{ subnet_name }}"
+ virtual_network_name: "{{ virtual_network_name }}"
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0.0/24"
+
+- name: Create public IP address
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Static
+ name: "{{ public_ipaddress_name }}"
+ sku: Standard
+ register: pip_output
+
+- debug:
+ var: pip_output
+
+- name: Create Azure Firewall
+ azure_rm_azurefirewall:
+ resource_group: '{{resource_group}}'
+ name: '{{azure_firewall_name}}'
+ #tags:
+ # key1: value1
+ application_rule_collections:
+ - priority: 110
+ action: deny
+ rules:
+ - name: rule1
+ description: Deny inbound rule
+ source_addresses:
+ - 216.58.216.164
+ - 10.0.0.0/25
+ protocols:
+ - type: https
+ port: '443'
+ target_fqdns:
+ - www.test.com
+ name: apprulecoll
+ nat_rule_collections:
+ - priority: 112
+ action: dnat
+ rules:
+ - name: DNAT-HTTPS-traffic
+ description: D-NAT all outbound web traffic for inspection
+ source_addresses:
+ - '*'
+ destination_addresses:
+ - "{{ pip_output.state.ip_address }}"
+ destination_ports:
+ - '443'
+ protocols:
+ - tcp
+ translated_address: 1.2.3.5
+ translated_port: '8443'
+ name: natrulecoll
+ network_rule_collections:
+ - priority: 112
+ action: deny
+ rules:
+ - name: L4-traffic
+ description: Block traffic based on source IPs and ports
+ protocols:
+ - tcp
+ source_addresses:
+ - 192.168.1.1-192.168.1.12
+ - 10.1.4.12-10.1.4.255
+ destination_addresses:
+ - '*'
+ destination_ports:
+ - 443-444
+ - '8443'
+ name: netrulecoll
+ ip_configurations:
+ - subnet:
+ virtual_network_name: "{{ virtual_network_name }}"
+ name: "{{ subnet_name }}"
+ public_ip_address:
+ name: "{{ public_ipaddress_name }}"
+ name: azureFirewallIpConfiguration
+ register: output
+
+- debug:
+ var: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Create Azure Firewall -- idempotent
+ azure_rm_azurefirewall:
+ resource_group: '{{resource_group}}'
+ name: '{{azure_firewall_name}}'
+ application_rule_collections:
+ - priority: 110
+ action: deny
+ rules:
+ - name: rule1
+ description: Deny inbound rule
+ source_addresses:
+ - 216.58.216.164
+ - 10.0.0.0/25
+ protocols:
+ - type: https
+ port: '443'
+ target_fqdns:
+ - www.test.com
+ name: apprulecoll
+ nat_rule_collections:
+ - priority: 112
+ action: dnat
+ rules:
+ - name: DNAT-HTTPS-traffic
+ description: D-NAT all outbound web traffic for inspection
+ source_addresses:
+ - '*'
+ destination_addresses:
+ - "{{ pip_output.state.ip_address }}"
+ destination_ports:
+ - '443'
+ protocols:
+ - tcp
+ translated_address: 1.2.3.5
+ translated_port: '8443'
+ name: natrulecoll
+ network_rule_collections:
+ - priority: 112
+ action: deny
+ rules:
+ - name: L4-traffic
+ description: Block traffic based on source IPs and ports
+ protocols:
+ - tcp
+ source_addresses:
+ - 192.168.1.1-192.168.1.12
+ - 10.1.4.12-10.1.4.255
+ destination_addresses:
+ - '*'
+ destination_ports:
+ - 443-444
+ - '8443'
+ name: netrulecoll
+ ip_configurations:
+ - subnet:
+ virtual_network_name: "{{ virtual_network_name }}"
+ name: "{{ subnet_name }}"
+ public_ip_address:
+ name: "{{ public_ipaddress_name }}"
+ name: azureFirewallIpConfiguration
+ register: output
+
+- debug:
+ var: output
+
+- name: Assert that output has not changed
+ assert:
+ that:
+ - not output.changed
+
+- name: Create Azure Firewall -- change something
+ azure_rm_azurefirewall:
+ resource_group: '{{resource_group}}'
+ name: '{{azure_firewall_name}}'
+ application_rule_collections:
+ - priority: 110
+ action: deny
+ rules:
+ - name: rule1
+ description: Deny inbound rule
+ source_addresses:
+ - 216.58.216.165
+ - 10.0.0.0/25
+ protocols:
+ - type: https
+ port: '443'
+ target_fqdns:
+ - www.test.com
+ name: apprulecoll
+ nat_rule_collections:
+ - priority: 112
+ action: dnat
+ rules:
+ - name: DNAT-HTTPS-traffic
+ description: D-NAT all outbound web traffic for inspection
+ source_addresses:
+ - '*'
+ destination_addresses:
+ - "{{ pip_output.state.ip_address }}"
+ destination_ports:
+ - '443'
+ protocols:
+ - tcp
+ translated_address: 1.2.3.6
+ translated_port: '8443'
+ name: natrulecoll
+ network_rule_collections:
+ - priority: 112
+ action: deny
+ rules:
+ - name: L4-traffic
+ description: Block traffic based on source IPs and ports
+ protocols:
+ - tcp
+ source_addresses:
+ - 192.168.1.1-192.168.1.12
+ - 10.1.4.12-10.1.4.255
+ destination_addresses:
+ - '*'
+ destination_ports:
+ - 443-445
+ - '8443'
+ name: netrulecoll
+ ip_configurations:
+ - subnet:
+ virtual_network_name: "{{ virtual_network_name }}"
+ name: "{{ subnet_name }}"
+ public_ip_address:
+ name: "{{ public_ipaddress_name }}"
+ name: azureFirewallIpConfiguration
+ check_mode: yes
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Get info of the Azure Firewall
+ azure_rm_azurefirewall_info:
+ resource_group: '{{resource_group}}'
+ name: '{{azure_firewall_name}}'
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+ - output.firewalls['id'] != None
+ - output.firewalls['name'] != None
+ - output.firewalls['location'] != None
+ - output.firewalls['etag'] != None
+ - output.firewalls['nat_rule_collections'] != None
+ - output.firewalls['network_rule_collections'] != None
+ - output.firewalls['ip_configurations'] != None
+ - output.firewalls['provisioning_state'] != None
+
+- name: Delete Azure Firewall
+ azure_rm_azurefirewall:
+ resource_group: '{{resource_group}}'
+ name: '{{azure_firewall_name}}'
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/aliases
new file mode 100644
index 00000000..6c4c0f4c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group12
+destructive
+disabled \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/meta/main.yml
new file mode 100644
index 00000000..48f5726d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/tasks/main.yml
new file mode 100644
index 00000000..98a1fdff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_backupazurevm/tasks/main.yml
@@ -0,0 +1,75 @@
+- name: Fix resource prefix
+ set_fact:
+ resource_group: 'MyResourceGroup'
+ recovery_vault_name: 'MyRecoveryVault'
+ resource_id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/MyVM"
+ backup_policy_id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.recoveryservices/vaults/testVault/backupPolicies/DefaultPolicy"
+
+- name: Enabling/Updating protection for the Azure VM
+ azure_rm_backupazurevm:
+ resource_group: "{{ resource_group }}"
+ recovery_vault_name: "{{ recovery_vault_name }}"
+ resource_id: "{{ resource_id }}"
+ backup_policy_id: "{{ backup_policy_id }}"
+ state: "create"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Trigger an on-demand backup for a protected Azure VM
+ azure_rm_backupazurevm:
+ resource_group: "{{ resource_group }}"
+ recovery_vault_name: "{{ recovery_vault_name }}"
+ resource_id: "{{ resource_id }}"
+ backup_policy_id: "{{ backup_policy_id }}"
+ state: "backup"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Stop protection but retain existing data
+ azure_rm_backupazurevm:
+ resource_group: "{{ resource_group }}"
+ recovery_vault_name: "{{ recovery_vault_name }}"
+ resource_id: "{{ resource_id }}"
+ backup_policy_id: "{{ backup_policy_id }}"
+ state: "stop"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Get backup azure vm info
+ azure_rm_backupazurevm_info:
+ resource_group: "{{ resource_group }}"
+ recovery_vault_name: "{{ recovery_vault_name }}"
+ resource_id: "{{ resource_id }}"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.response.id != None
+ - output.response.name != None
+
+- name: Stop protection and delete data
+ azure_rm_backupazurevm:
+ resource_group: "{{ resource_group }}"
+ recovery_vault_name: "{{ recovery_vault_name }}"
+ resource_id: "{{ resource_id }}"
+ backup_policy_id: "{{ backup_policy_id }}"
+ state: "delete"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/aliases
new file mode 100644
index 00000000..bbfe7e8c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+destructive
+shippable/azure/group12
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/tasks/main.yml
new file mode 100644
index 00000000..e62cb67c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_batchaccount/tasks/main.yml
@@ -0,0 +1,76 @@
+---
+# ----------------------------------------------------------------------------
+#
+# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
+#
+# ----------------------------------------------------------------------------
+#
+# This file is automatically generated by Magic Modules and manual
+# changes will be clobbered when the file is regenerated.
+#
+#
+# ----------------------------------------------------------------------------
+- name: Prepare random number
+ set_fact:
+ storage_account_name: "st{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ batch_account_name: "ba{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create Storage Account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account_name }}"
+ location: eastus
+ account_type: Standard_LRS
+
+- name: Create Batch Account
+ azure_rm_batchaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ batch_account_name }}"
+ location: eastus
+ auto_storage_account:
+ name: "{{ storage_account_name }}"
+ pool_allocation_mode: batch_service
+ register: output
+
+- name: Assert the resource was created
+ assert:
+ that:
+ - output.changed
+
+- name: Create Batch Account -- idempotent
+ azure_rm_batchaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ batch_account_name }}"
+ location: eastus
+ auto_storage_account:
+ name: "{{ storage_account_name }}"
+ pool_allocation_mode: batch_service
+ register: output
+
+- name: Assert the resource was created
+ assert:
+ that:
+ - not output.changed
+
+- name: Delete Batch Account
+ azure_rm_batchaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ batch_account_name }}"
+ location: eastus
+ auto_storage_account:
+ name: "{{ storage_account_name }}"
+ pool_allocation_mode: batch_service
+ state: absent
+ register: output
+
+- name: Assert that state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Clean up storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account_name }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/aliases
new file mode 100644
index 00000000..42643220
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/aliases
@@ -0,0 +1,5 @@
+cloud/azure
+shippable/azure/group13
+destructive
+azure_rm_cdnprofile_info
+azure_rm_cdnendpoint
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/tasks/main.yml
new file mode 100644
index 00000000..657881a5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cdnprofile/tasks/main.yml
@@ -0,0 +1,276 @@
+- name: Prepare random number
+ set_fact:
+ cdnprofilename: "cdnprofile{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ endpointname: "endpoint{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+
+- name: Create a CDN profile(check mode)
+ azure_rm_cdnprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ sku: standard_akamai
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ check_mode: yes
+
+- name: Check there is no CDN profile created
+ azure_rm_cdnprofile_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ register: fact
+
+- name: Check there is no CDN profile created
+ assert: { that: "{{ fact.cdnprofiles | length }} == 0" }
+
+- name: Create a CDN profile
+ azure_rm_cdnprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ sku: standard_akamai
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ register: output
+
+- name: Assert the CDN profile is well created
+ assert:
+ that:
+ - output.changed
+ - output.id != ''
+
+- name: Gather CDN profile facts
+ azure_rm_cdnprofile_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ register: fact
+
+- name: Assert fact returns the created one
+ assert:
+ that:
+ - "fact.cdnprofiles | length == 1"
+ - fact.cdnprofiles[0].sku == 'Standard_Akamai'
+ - fact.cdnprofiles[0].tags.foo == 'bar'
+
+- name: Create a CDN profile (idempotent)
+ azure_rm_cdnprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ sku: standard_akamai
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ register: output
+
+- name: Assert idempotent
+ assert:
+ that:
+ - not output.changed
+
+- name: Update the CDN profile
+ azure_rm_cdnprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ sku: standard_akamai
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ baz: qux
+ register: output
+
+- name: Assert the CDN profile is updated
+ assert:
+ that:
+ - output.changed
+
+- name: Delete the CDN profile(check mode)
+ azure_rm_cdnprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ state: absent
+ check_mode: yes
+
+- name: Gather CDN profile facts
+ azure_rm_cdnprofile_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ register: fact
+
+- name: Assert the CDN is still there
+ assert:
+ that:
+ - "fact.cdnprofiles | length == 1"
+ - fact.cdnprofiles[0].sku == 'Standard_Akamai'
+ - fact.cdnprofiles[0].tags.foo == 'bar'
+ - fact.cdnprofiles[0].tags.baz == 'qux'
+
+- name: Create a Azure CDN endpoint(check mode)
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ origins:
+ - name: "org{{ endpointname }}"
+ host_name: "www.google.com"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ check_mode: yes
+
+- name: Create a Azure CDN endpoint
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ origins:
+ - name: "org{{ endpointname }}"
+ host_name: "www.google.com"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ register: output
+
+- name: Assert the Azure CDN endpoint is well created
+ assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: Get facts of a Azure CDN endpoint
+ azure_rm_cdnendpoint_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ register: facts
+
+- name: Assert facts output
+ assert:
+ that:
+ - facts['cdnendpoints'] | length == 1
+ - facts['cdnendpoints'][0]['id']
+ - facts['cdnendpoints'][0]['name']
+ - facts['cdnendpoints'][0]['profile_name']
+ - facts['cdnendpoints'][0]['origin']
+ - facts['cdnendpoints'][0]['location']
+ - facts['cdnendpoints'][0]['provisioning_state']
+ - facts['cdnendpoints'][0]['resource_state']
+
+- name: Create a Azure CDN endpoint(idempotent)
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ origins:
+ - name: "org{{ endpointname }}"
+ host_name: "www.google.com"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ register: output
+
+- name: Assert idempotent
+ assert:
+ that:
+ - not output.changed
+
+- name: Stop a Azure CDN endpoint
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ started: False
+ register: output
+
+- name: Assert stopped
+ assert:
+ that:
+ - output.changed
+
+- name: Stop a Azure CDN endpoint(idempotent)
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ started: False
+ register: output
+
+- name: Assert still stopped and not changed
+ assert:
+ that:
+ - not output.changed
+
+- name: Start a Azure CDN endpoint
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ started: True
+ register: output
+
+- name: Assert started
+ assert:
+ that:
+ - output.changed
+
+- name: Update the Azure CDN endpoint
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ origin_path: /test/
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: baz
+ register: output
+
+- name: Assert the Azure CDN endpoint is updated
+ assert:
+ that:
+ - output.changed
+
+- name: Delete a Azure CDN endpoint(check mode)
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ state: absent
+ check_mode: yes
+
+- name: Delete a Azure CDN endpoint
+ azure_rm_cdnendpoint:
+ resource_group: "{{ resource_group }}"
+ name: "{{ endpointname }}"
+ profile_name: "{{ cdnprofilename }}"
+ state: absent
+
+- name: Delete the CDN profile
+ azure_rm_cdnprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ state: absent
+ register: output
+
+- name: Assert the CDN profile is well deleted
+ assert:
+ that:
+ - output.changed
+
+- name: Get CDN profile fact
+ azure_rm_cdnprofile_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cdnprofilename }}"
+ register: fact
+
+- name: Assert fact returns empty
+ assert:
+ that:
+ - "fact.cdnprofiles | length == 0"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/aliases
new file mode 100644
index 00000000..93066dcc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+destructive
+shippable/azure/group2
+azure_rm_containerinstance_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/tasks/main.yml
new file mode 100644
index 00000000..22aac50f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerinstance/tasks/main.yml
@@ -0,0 +1,210 @@
+- name: Create sample container instance
+ azure_rm_containerinstance:
+ resource_group: "{{ resource_group }}"
+ name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ os_type: linux
+ ip_address: public
+ location: eastus
+ ports:
+ - 80
+ containers:
+ - name: mycontainer1
+ image: httpd
+ memory: 1.5
+ ports:
+ - 80
+ - 81
+ register: output
+
+- debug:
+ var: output
+
+- name: Assert the container instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.provisioning_state == 'Succeeded'
+
+- name: Create sample container instance -- same parameters
+ azure_rm_containerinstance:
+ resource_group: "{{ resource_group }}"
+ name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ os_type: linux
+ ip_address: public
+ location: eastus
+ ports:
+ - 80
+ containers:
+ - name: mycontainer1
+ image: httpd
+ memory: 1.5
+ ports:
+ - 80
+ - 81
+ register: output
+
+- name: Assert the container instance is well created
+ assert:
+ that:
+ - output.changed == False
+
+- name: Create sample container instance -- force update
+ azure_rm_containerinstance:
+ resource_group: "{{ resource_group }}"
+ name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ os_type: linux
+ ip_address: public
+ location: eastus
+ ports:
+ - 80
+ containers:
+ - name: mycontainer1
+ image: httpd
+ memory: 1.5
+ ports:
+ - 80
+ - 81
+ force_update: yes
+ register: output
+
+- name: Assert the container instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.provisioning_state == 'Succeeded'
+
+- name: Create second container instance for testing purposes
+ azure_rm_containerinstance:
+ resource_group: "{{ resource_group }}"
+ name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}sec"
+ os_type: linux
+ ip_address: public
+ dns_name_label: mydnslabel{{ resource_group | hash('md5') | truncate(7, True, '') }}
+ location: eastus
+ restart_policy: on_failure
+ ports:
+ - 80
+ containers:
+ - name: mycontainer1
+ image: httpd
+ memory: 1.5
+ ports:
+ - 80
+ - 81
+ environment_variables:
+ - name: myvar
+ value: myvarvalue
+ register: output
+
+- name: Gather facts for single Container Instance
+ azure_rm_containerinstance_info:
+ resource_group: "{{ resource_group }}"
+ name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}sec"
+ register: output
+
+- debug:
+ var: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.containerinstances[0]['resource_group'] != None
+ - output.containerinstances[0]['name'] != None
+ - output.containerinstances[0]['os_type'] != None
+ - output.containerinstances[0]['location'] != None
+ - output.containerinstances[0]['ip_address'] != None
+ - output.containerinstances[0]['ports'] != None
+ - output.containerinstances[0]['containers'] != None
+ - output.containerinstances[0]['containers'][0]['environment_variables'] | length == 1
+ - output.containerinstances[0]['restart_policy'] == 'on_failure'
+
+- name: Gather facts for all Container Instances in the resource group
+ azure_rm_containerinstance_info:
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.containerinstances[0]['resource_group'] != None
+ - output.containerinstances[0]['name'] != None
+ - output.containerinstances[0]['os_type'] != None
+ - output.containerinstances[0]['location'] != None
+ - output.containerinstances[0]['ip_address'] != None
+ - output.containerinstances[0]['ports'] != None
+ - output.containerinstances[0]['containers'] != None
+ - output.containerinstances[1]['resource_group'] != None
+ - output.containerinstances[1]['name'] != None
+ - output.containerinstances[1]['os_type'] != None
+ - output.containerinstances[1]['location'] != None
+ - output.containerinstances[1]['ip_address'] != None
+ - output.containerinstances[1]['ports'] != None
+ - output.containerinstances[1]['containers'] != None
+
+- name: Remove container instance
+ azure_rm_containerinstance:
+ resource_group: "{{ resource_group }}"
+ name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ os_type: linux
+ ip_address: public
+ location: eastus
+ ports:
+ - 80
+ containers:
+ - name: mycontainer1
+ image: httpd
+ memory: 1.5
+ ports:
+ - 80
+ - 81
+ state: absent
+ register: output
+
+- name: Assert the container instance is deleted
+ assert:
+ that:
+ - output.changed
+
+- name: Remove container instance
+ azure_rm_containerinstance:
+ resource_group: "{{ resource_group }}"
+ name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}sec"
+ os_type: linux
+ ip_address: public
+ location: eastus
+ ports:
+ - 80
+ containers:
+ - name: mycontainer1
+ image: httpd
+ memory: 1.5
+ ports:
+ - 80
+ - 81
+ state: absent
+
+- name: Remove container instance again
+ azure_rm_containerinstance:
+ resource_group: "{{ resource_group }}"
+ name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ os_type: linux
+ ip_address: public
+ location: eastus
+ ports:
+ - 80
+ containers:
+ - name: mycontainer1
+ image: httpd
+ memory: 1.5
+ ports:
+ - 80
+ - 81
+ state: absent
+ register: output
+
+- name: Assert the changed is false
+ assert:
+ that:
+ - output.changed == False
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/aliases
new file mode 100644
index 00000000..2615d3fe
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group2
+destructive
+azure_rm_containerregistry_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/tasks/main.yml
new file mode 100644
index 00000000..7c83c5c5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_containerregistry/tasks/main.yml
@@ -0,0 +1,116 @@
+ - name: Create an container registry
+ azure_rm_containerregistry:
+ name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus2
+ admin_user_enabled: true
+ sku: Premium
+ tags:
+ Release: beta1
+ Environment: Production
+ register: output
+
+ - name: Assert the container registry instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.admin_user_enabled
+ - output.location == 'eastus2'
+ - output.sku == 'Premium'
+ - output.tags['Environment'] == 'Production'
+ - output.tags['Release'] == 'beta1'
+ - output.provisioning_state == 'Succeeded'
+ - output.credentials['password'] is defined
+ - output.credentials['password2'] is defined
+
+ - name: Update the ACR instance sku, tags and admin_user_enabled
+ azure_rm_containerregistry:
+ name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ location: eastus2
+ admin_user_enabled: false
+ sku: Standard
+ tags:
+ NewTag: newtag
+ Release: beta1
+ Environment: Production
+ register: output
+
+ - name: Create second container registry (to test facts)
+ azure_rm_containerregistry:
+ name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}sec"
+ resource_group: "{{ resource_group }}"
+ location: eastus2
+ admin_user_enabled: false
+ sku: Premium
+ tags:
+ Release: beta1
+ Environment: Production
+
+ - name: Assert the ACR instance is well updated
+ assert:
+ that:
+ - output.changed == True
+ - output.admin_user_enabled == False
+ - output.sku == 'Standard'
+ - output.tags['NewTag'] == 'newtag'
+ - output.credentials | length == 0
+ - output.credentials['password'] is not defined
+ - output.credentials['password2'] is not defined
+
+ - name: Gather facts for single Container Registry
+ azure_rm_containerregistry_info:
+ resource_group: "{{ resource_group }}"
+ name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ register: output
+
+ - name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.registries[0]['name'] != None
+ - output.registries[0]['location'] != None
+ - output.registries[0]['admin_user_enabled'] != None
+ - output.registries[0]['sku'] != None
+ - output.registries[0]['provisioning_state'] != None
+ - output.registries[0]['login_server'] != None
+ - output.registries[0]['id'] != None
+ - output.registries[0]['credentials'] != None
+
+ - name: Gather facts for all Container Registries in the resource group
+ azure_rm_containerregistry_info:
+ resource_group: "{{ resource_group }}"
+ register: output
+
+ - name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.registries[0]['name'] != None
+ - output.registries[0]['location'] != None
+ - output.registries[0]['admin_user_enabled'] != None
+ - output.registries[0]['sku'] != None
+ - output.registries[0]['provisioning_state'] != None
+ - output.registries[0]['login_server'] != None
+ - output.registries[0]['id'] != None
+ - output.registries[0]['credentials'] != None
+ - output.registries[1]['name'] != None
+ - output.registries[1]['location'] != None
+ - output.registries[1]['admin_user_enabled'] != None
+ - output.registries[1]['sku'] != None
+ - output.registries[1]['provisioning_state'] != None
+ - output.registries[1]['login_server'] != None
+ - output.registries[1]['id'] != None
+ - output.registries[1]['credentials'] != None
+
+ - name: Delete first container registry
+ azure_rm_containerregistry:
+ name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+
+ - name: Delete second container registry
+ azure_rm_containerregistry:
+ name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}sec"
+ resource_group: "{{ resource_group }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/aliases
new file mode 100644
index 00000000..8f0d8a0e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+destructive
+shippable/azure/group14
+azure_rm_cosmosdbaccount_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/tasks/main.yml
new file mode 100644
index 00000000..f50aa47c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_cosmosdbaccount/tasks/main.yml
@@ -0,0 +1,249 @@
+- name: Prepare random number
+ set_fact:
+ dbname: "cosmos{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ vnname: "vn{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ subnetname: "subnet{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vnname }}"
+ address_prefixes_cidr:
+ - 10.1.0.0/16
+ - 172.100.0.0/16
+ dns_servers:
+ - 127.0.0.1
+ - 127.0.0.3
+
+- name: Add subnet
+ azure_rm_subnet:
+ name: "{{ subnetname }}"
+ virtual_network_name: "{{ vnname }}"
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0.0/24"
+
+- name: Create instance of Database Account -- check mode
+ azure_rm_cosmosdbaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ location: eastus
+ geo_rep_locations:
+ - name: eastus
+ failover_priority: 0
+ database_account_offer_type: Standard
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Database Account
+ azure_rm_cosmosdbaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ location: eastus
+ kind: global_document_db
+ geo_rep_locations:
+ - name: eastus
+ failover_priority: 0
+ - name: westus
+ failover_priority: 1
+ database_account_offer_type: Standard
+ is_virtual_network_filter_enabled: yes
+ virtual_network_rules:
+ - subnet:
+ resource_group: "{{ resource_group }}"
+ virtual_network_name: "{{ vnname }}"
+ subnet_name: "{{ subnetname }}"
+ ignore_missing_vnet_service_endpoint: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create again instance of Database Account
+ azure_rm_cosmosdbaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ location: eastus
+ kind: global_document_db
+ geo_rep_locations:
+ - name: eastus
+ failover_priority: 0
+ - name: westus
+ failover_priority: 1
+ database_account_offer_type: Standard
+ is_virtual_network_filter_enabled: yes
+ virtual_network_rules:
+ - subnet:
+ resource_group: "{{ resource_group }}"
+ virtual_network_name: "{{ vnname }}"
+ subnet_name: "{{ subnetname }}"
+ ignore_missing_vnet_service_endpoint: yes
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Create again instance of Database Account -- change something
+ azure_rm_cosmosdbaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ location: eastus
+ kind: global_document_db
+ geo_rep_locations:
+ - name: eastus
+ failover_priority: 0
+ - name: westus
+ failover_priority: 1
+ database_account_offer_type: Standard
+ is_virtual_network_filter_enabled: yes
+ virtual_network_rules:
+ - subnet:
+ resource_group: "{{ resource_group }}"
+ virtual_network_name: "{{ vnname }}"
+ subnet_name: "{{ subnetname }}"
+ ignore_missing_vnet_service_endpoint: yes
+ enable_automatic_failover: yes
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed
+
+- name: Get facts of single account
+ azure_rm_cosmosdbaccount_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.accounts[0]['id'] != None
+ - output.accounts[0]['resource_group'] != None
+ - output.accounts[0]['name'] != None
+ - output.accounts[0]['location'] != None
+ - output.accounts[0]['kind'] != None
+ - output.accounts[0]['consistency_policy'] != None
+ - output.accounts[0]['failover_policies'] != None
+ - output.accounts[0]['read_locations'] != None
+ - output.accounts[0]['write_locations'] != None
+ - output.accounts[0]['database_account_offer_type'] != None
+ - output.accounts[0]['ip_range_filter'] != None
+ - output.accounts[0]['is_virtual_network_filter_enabled'] != None
+ - output.accounts[0]['enable_automatic_failover'] != None
+ - output.accounts[0]['enable_cassandra'] != None
+ - output.accounts[0]['enable_table'] != None
+ - output.accounts[0]['enable_gremlin'] != None
+ - output.accounts[0]['virtual_network_rules'] != None
+ - output.accounts[0]['enable_multiple_write_locations'] != None
+ - output.accounts[0]['document_endpoint'] != None
+ - output.accounts[0]['provisioning_state'] != None
+ - output.accounts[0]['tags'] != None
+
+- name: Get facts with keys
+ azure_rm_cosmosdbaccount_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ retrieve_keys: all
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.accounts[0]['primary_master_key'] != None
+ - output.accounts[0]['secondary_master_key'] != None
+ - output.accounts[0]['primary_readonly_master_key'] != None
+ - output.accounts[0]['secondary_readonly_master_key'] != None
+
+- name: Get facts with readonly keys
+ azure_rm_cosmosdbaccount_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ retrieve_keys: readonly
+ retrieve_connection_strings: yes
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - "'primary_master_key' not in output.accounts[0]"
+ - "'secondary_master_key' not in output.accounts[0]"
+ - output.accounts[0]['primary_readonly_master_key'] != None
+ - output.accounts[0]['secondary_readonly_master_key'] != None
+ - output.accounts[0]['connection_strings'] | length > 0
+
+- name: List acounts by resource group
+ azure_rm_cosmosdbaccount_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.accounts[0]['id'] != None
+ - output.accounts[0]['resource_group'] != None
+ - output.accounts[0]['name'] != None
+ - output.accounts[0]['location'] != None
+ - output.accounts[0]['kind'] != None
+ - output.accounts[0]['consistency_policy'] != None
+ - output.accounts[0]['failover_policies'] != None
+ - output.accounts[0]['read_locations'] != None
+ - output.accounts[0]['write_locations'] != None
+ - output.accounts[0]['database_account_offer_type'] != None
+ - output.accounts[0]['ip_range_filter'] != None
+ - output.accounts[0]['is_virtual_network_filter_enabled'] != None
+ - output.accounts[0]['enable_automatic_failover'] != None
+ - output.accounts[0]['enable_cassandra'] != None
+ - output.accounts[0]['enable_table'] != None
+ - output.accounts[0]['enable_gremlin'] != None
+ - output.accounts[0]['virtual_network_rules'] != None
+ - output.accounts[0]['enable_multiple_write_locations'] != None
+ - output.accounts[0]['document_endpoint'] != None
+ - output.accounts[0]['provisioning_state'] != None
+ - output.accounts[0]['tags'] != None
+
+- name: Delete instance of Database Account -- check mode
+ azure_rm_cosmosdbaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of Database Account
+ azure_rm_cosmosdbaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dbname }}"
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+# currently disabled as there's a bug in SDK / Service
+#- name: Delete unexisting instance of Database Account
+# azure_rm_cosmosdbaccount:
+# resource_group: "{{ resource_group }}"
+# name: "{{ dbname }}"
+# state: absent
+# register: output
+#- name: Assert the state has changed
+# assert:
+# that:
+# - output.changed == false
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/aliases
new file mode 100644
index 00000000..2cc24937
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+destructive
+disabled
+shippable/azure/group1
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/tasks/main.yml
new file mode 100644
index 00000000..bbe5c98e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_deployment/tasks/main.yml
@@ -0,0 +1,63 @@
+- name: Create random dns label
+ set_fact:
+ dns_label: "test{{ resource_group | hash('md5') | truncate(16, True, '') + (65535 | random | string) }}"
+
+- name: Error Create Azure Deploy
+ azure_rm_deployment:
+ resource_group: "{{ resource_group }}"
+ location: "eastus"
+ template_link: 'https://raw.githubusercontent.com/Azure/azure-quickstart-templates/d01a5c06f4f1bc03a049ca17bbbd6e06d62657b3/101-vm-simple-linux/azuredeploy.json'
+ deployment_name: "{{ dns_label }}"
+ parameters:
+ adminUsername:
+ value: chouseknecht
+ adminPassword:
+ value: password123!
+ dnsLabelPrefix:
+ value: "{{ dns_label }}"
+ ubuntuOSVersion:
+ value: "Never-LTS"
+ register: output
+ ignore_errors: yes
+
+- name: Create Azure Deploy
+ azure_rm_deployment:
+ resource_group: "{{ resource_group }}"
+ location: "eastus"
+ template_link: 'https://raw.githubusercontent.com/Azure/azure-quickstart-templates/d01a5c06f4f1bc03a049ca17bbbd6e06d62657b3/101-vm-simple-linux/azuredeploy.json'
+ deployment_name: "{{ dns_label }}"
+ parameters:
+ adminUsername:
+ value: chouseknecht
+ adminPassword:
+ value: password123!
+ dnsLabelPrefix:
+ value: "{{ dns_label }}"
+ ubuntuOSVersion:
+ value: "16.04.0-LTS"
+ register: output
+
+- name: Add new instance to host group
+ add_host:
+ hostname: "{{ item.vm_name }}"
+ ansible_host: "{{ item['ips'][0].public_ip }}"
+ ansible_user: chouseknecht
+ ansible_ssh_pass: password123!
+ groupname: azure_vms
+ with_items: "{{ output.deployment.instances }}"
+
+- name: Get Deployment Facts
+ azure_rm_deployment_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ dns_label }}"
+ register: output
+- debug:
+ var: output
+
+- name: Assert that values are returned
+ assert:
+ that:
+ - not output.changed
+ - output.deployments[0]['provisioning_state'] != None
+ - output.deployments[0]['output_resources'] | length > 0
+ - output.deployments[0]['outputs'] | length > 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/aliases
new file mode 100644
index 00000000..8f7a9a2e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group1
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/tasks/main.yml
new file mode 100644
index 00000000..800f292c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnsrecordset/tasks/main.yml
@@ -0,0 +1,185 @@
+- name: Create random domain name
+ set_fact:
+ domain_name: "{{ resource_group | hash('md5') | truncate(16, True, '') + (65535 | random | string) }}"
+
+- name: Create a DNS zone
+ azure_rm_dnszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ state: present
+ register: results
+
+- name: Assert that DNS zone was created
+ assert:
+ that: results.changed
+
+- name: create "A" record set with multiple records
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that A record set was created
+ assert:
+ that: results.changed
+
+- name: re-run "A" record with same values
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that A record set was not changed
+ assert:
+ that: not results.changed
+
+- name: Update "A" record set with additional record
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ record_mode: append
+ records:
+ - entry: 192.168.100.104
+ register: results
+
+- name: Assert that new record was appended
+ assert:
+ that:
+ - results.changed
+
+- name: re-update "A" record set with additional record
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ record_mode: append
+ records:
+ - entry: 192.168.100.104
+ register: results
+
+- name: Assert that A record set was not changed
+ assert:
+ that:
+ - not results.changed
+
+- name: Remove 1 record from record set
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that record was deleted
+ assert:
+ that:
+ - results.changed
+
+- name: Check_mode test
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.105
+ check_mode: yes
+ register: results
+
+- name: Assert that check_mode returns new state
+ assert:
+ that:
+ - results.changed
+
+# FUTURE: add facts module calls to ensure that we really didn't touch anything
+
+- name: delete a record set
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ state: absent
+ register: results
+
+- name: Assert that record set deleted
+ assert:
+ that: results.changed
+
+- name: (idempotence test) re-run record set absent
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ state: absent
+ register: results
+
+- name:
+ assert:
+ that: not results.changed
+
+- name: create SRV records in a new record set
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: "_sip._tcp.{{ domain_name }}.com"
+ zone_name: "{{ domain_name }}.com"
+ time_to_live: 7200
+ record_type: SRV
+ state: present
+ records:
+ - entry: sip.{{ domain_name }}.com
+ priority: 20
+ weight: 10
+ port: 5060
+ register: results
+
+- name: Assert that SRV record set was created
+ assert:
+ that:
+ - results.changed
+
+- name: create TXT records in a new record set
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: "_txt.{{ domain_name }}.com"
+ zone_name: "{{ domain_name }}.com"
+ record_type: TXT
+ state: present
+ records:
+ - entry: "v=spf1 a -all"
+ - entry: "foo"
+ - entry:
+ - "bar"
+ - "baz"
+ register: results
+
+- name: Assert that TXT record set was created
+ assert:
+ that:
+ - results.changed
+
+- name: Delete DNS zone
+ azure_rm_dnszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/aliases
new file mode 100644
index 00000000..b048b01f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/aliases
@@ -0,0 +1,6 @@
+cloud/azure
+shippable/azure/group2
+destructive
+azure_rm_dnszone_info
+azure_rm_dnsrecordset
+azure_rm_dnsrecordset_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/tasks/main.yml
new file mode 100644
index 00000000..1e883878
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_dnszone/tasks/main.yml
@@ -0,0 +1,300 @@
+- name: Create random domain name
+ set_fact:
+ domain_name: "{{ resource_group | hash('md5') | truncate(16, True, '') + (65535 | random | string) }}"
+
+- name: Create a DNS zone (check mode)
+ azure_rm_dnszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ register: results
+ check_mode: yes
+
+- assert:
+ that: results.changed
+
+- name: Create a DNS zone
+ azure_rm_dnszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ register: results
+
+- assert:
+ that: results.changed
+
+- name: Update DNS zone with tags
+ azure_rm_dnszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ tags:
+ test: modified
+ register: results
+
+- assert:
+ that:
+ - results.changed
+ - results.state.tags.test == 'modified'
+
+- name: Retrieve DNS Zone Facts
+ azure_rm_dnszone_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ register: zones
+
+- name: Assert that facts module returned result
+ assert:
+ that:
+ - zones.dnszones[0].tags.test == 'modified'
+ - zones.dnszones[0].type == 'public'
+
+- name: Test idempotent
+ azure_rm_dnszone:
+ name: "{{ domain_name }}.com"
+ resource_group: "{{ resource_group }}"
+ register: results
+
+- assert:
+ that:
+ - not results.changed
+
+#
+# azure_rm_dnsrecordset test
+#
+
+- name: create "A" record set with multiple records
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that A record set was created
+ assert:
+ that:
+ - results.changed
+ - 'results.state.arecords | length == 3'
+
+- name: re-run "A" record with same values
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that A record set was not changed
+ assert:
+ that: not results.changed
+
+- name: Update "A" record set with additional record
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ record_mode: append
+ records:
+ - entry: 192.168.100.104
+ register: results
+
+- name: Assert that new record was appended
+ assert:
+ that:
+ - results.changed
+ - 'results.state.arecords | length == 4'
+
+- name: re-update "A" record set with additional record
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ record_mode: append
+ records:
+ - entry: 192.168.100.104
+ register: results
+
+- name: Assert that A record set was not changed
+ assert:
+ that:
+ - not results.changed
+
+- name: Remove 1 record from record set
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that record was deleted
+ assert:
+ that:
+ - results.changed
+ - 'results.state.arecords | length == 3'
+
+- name: Check_mode test
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.105
+ check_mode: yes
+ register: results
+
+- name: Assert that check_mode returns new state
+ assert:
+ that:
+ - results.changed
+
+# FUTURE: add facts module calls to ensure that we really didn't touch anything
+
+- name: create SRV records in a new record set
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: "_sip._tcp.{{ domain_name }}.com"
+ zone_name: "{{ domain_name }}.com"
+ time_to_live: 7200
+ record_type: SRV
+ records:
+ - entry: sip.{{ domain_name }}.com
+ priority: 20
+ weight: 10
+ port: 5060
+ register: results
+
+- name: Assert that SRV record set was created
+ assert:
+ that:
+ - results.changed
+
+- name: create TXT records in a new record set
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: "_txt.{{ domain_name }}.com"
+ zone_name: "{{ domain_name }}.com"
+ record_type: TXT
+ records:
+ - entry: "v=spf1 a -all"
+ - entry: "foo"
+ - entry:
+ - "bar"
+ - "baz"
+ register: results
+
+- name: Assert that TXT record set was created
+ assert:
+ that:
+ - results.changed
+
+#
+# azure_rm_dnsrecordset_info
+#
+
+- name: Retrieve DNS Record Set Facts for single Record Set
+ azure_rm_dnsrecordset_info:
+ resource_group: "{{ resource_group }}"
+ zone_name: "{{ domain_name }}.com"
+ relative_name: www
+ record_type: A
+ register: results
+
+- name: Assert that facts module returned result for single Record Set
+ assert:
+ that:
+ - not results.changed
+# - azure_dnsrecordset[0].name == 'www'
+ - results.dnsrecordsets[0].relative_name == 'www'
+ - 'results.dnsrecordsets[0].records | length == 3'
+ - results.dnsrecordsets[0].record_type == 'A'
+
+- name: Retrieve DNS Record Set Facts for all Record Sets
+ azure_rm_dnsrecordset_info:
+ resource_group: "{{ resource_group }}"
+ zone_name: "{{ domain_name }}.com"
+ register: facts
+
+- name: Assert that facts module returned result for all Record Sets
+ assert:
+ that:
+ - not facts.changed
+# - facts.ansible_facts.azure_dnsrecordset[0].name == '@'
+# - facts.ansible_facts.azure_dnsrecordset[1].name == '@'
+# - facts.ansible_facts.azure_dnsrecordset[4].name == 'www'
+
+#
+# azure_rm_dnsrecordset cleanup
+#
+- name: delete all record sets except for @
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: "{{ item.relative_name }}"
+ zone_name: "{{ domain_name }}.com"
+ record_type: "{{ item.record_type }}"
+ state: absent
+ with_items: "{{ facts.dnsrecordsets }}"
+ when:
+ - item.relative_name != '@'
+ register: results
+
+- name: Assert that record set deleted
+ assert:
+ that: results.changed
+
+- name: Retrieve DNS Record Set Facts for all Record Sets
+ azure_rm_dnsrecordset_info:
+ resource_group: "{{ resource_group }}"
+ zone_name: "{{ domain_name }}.com"
+ register: facts
+
+- name: Assert all record set deleted
+ assert:
+ that:
+ - item.relative_name == '@'
+ with_items: "{{ facts.dnsrecordsets }}"
+
+- name: (idempotence test) re-run record set absent
+ azure_rm_dnsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ state: absent
+ register: results
+
+- name:
+ assert:
+ that: not results.changed
+
+#
+# azure_rm_dnszone cleanup
+#
+- name: Delete DNS zone
+ azure_rm_dnszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ state: absent
+
+- name: Delete DNS zone (idempotent)
+ azure_rm_dnszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ state: absent
+ register: results
+
+- assert:
+ that: not results.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/aliases
new file mode 100644
index 00000000..759eafa2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group3
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/tasks/main.yml
new file mode 100644
index 00000000..e618e703
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_functionapp/tasks/main.yml
@@ -0,0 +1,131 @@
+- name: Fix resource prefix
+ set_fact:
+ fixed_resource_prefix: "fa{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+
+- name: Fix resource prefix
+ set_fact:
+ funcapp_name_basic: "fa{{ fixed_resource_prefix }}basic"
+ funcapp_name_container: "fa{{ fixed_resource_prefix }}container"
+ funcapp_name_params: "fa{{ fixed_resource_prefix }}params"
+ storage_account_name: "sa{{ fixed_resource_prefix }}"
+ plan_name: "ap{{ fixed_resource_prefix }}"
+
+- name: create storage account for function apps
+ azure_rm_storageaccount:
+ resource_group: '{{ resource_group }}'
+ name: "{{ storage_account_name }}"
+ account_type: Standard_LRS
+
+- name: create basic function app
+ azure_rm_functionapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ funcapp_name_basic }}"
+ storage_account: "{{ storage_account_name }}"
+ register: output
+
+- name: assert the function was created
+ assert:
+ that: output.changed
+
+- name: list facts for function
+ azure_rm_functionapp_info:
+ resource_group: '{{ resource_group }}'
+ name: "{{ funcapp_name_basic }}"
+ register: results
+
+- name: assert the facts were retrieved
+ assert:
+ that:
+ - results.ansible_info.azure_functionapps|length == 1
+ - results.ansible_info.azure_functionapps[0].name == "{{ funcapp_name_basic }}"
+
+- name: delete basic function app
+ azure_rm_functionapp:
+ resource_group: '{{ resource_group }}'
+ name: "{{ funcapp_name_basic }}"
+ state: absent
+ register: output
+
+- name: assert the function was deleted
+ assert:
+ that: output.changed
+
+- name: create a function with app settings
+ azure_rm_functionapp:
+ resource_group: '{{ resource_group }}'
+ name: "{{ funcapp_name_params }}"
+ storage_account: "{{ storage_account_name }}"
+ app_settings:
+ hello: world
+ things: more stuff
+ FUNCTIONS_EXTENSION_VERSION: "~2"
+ register: output
+
+- name: assert the function with app settings was created
+ assert:
+ that: output.changed
+
+- name: change app settings
+ azure_rm_functionapp:
+ resource_group: '{{ resource_group }}'
+ name: "{{ funcapp_name_params }}"
+ storage_account: "{{ storage_account_name }}"
+ app_settings:
+ hello: world
+ things: more stuff
+ FUNCTIONS_EXTENSION_VERSION: "~2"
+ another: one
+ register: output
+
+- name: assert the function was changed
+ assert:
+ that: output.changed
+
+- name: delete the function app
+ azure_rm_functionapp:
+ resource_group: '{{ resource_group }}'
+ name: "{{ funcapp_name_params }}"
+ state: absent
+ register: output
+
+- name: assert the function was deleted
+ assert:
+ that: output.changed
+
+- name: Create a linux app service plan
+ azure_rm_appserviceplan:
+ resource_group: "{{ resource_group }}"
+ name: "{{ plan_name }}"
+ sku: S1
+ is_linux: true
+ number_of_workers: 1
+
+- name: "Create azure function app {{ function_app }}"
+ azure_rm_functionapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ funcapp_name_container }}"
+ storage_account: "{{ storage_account_name }}"
+ plan:
+ resource_group: "{{ resource_group }}"
+ name: "{{ plan_name }}"
+ container_settings:
+ name: httpd
+ app_settings:
+ FUNCTIONS_EXTENSION_VERSION: "~2"
+ register: output
+
+- name: assert the function was changed
+ assert:
+ that: output.changed
+
+- name: delete the function app
+ azure_rm_functionapp:
+ resource_group: '{{ resource_group }}'
+ name: "{{ funcapp_name_container }}"
+ state: absent
+
+- name: delete storage account
+ azure_rm_storageaccount:
+ resource_group: '{{ resource_group }}'
+ name: "{{ storage_account_name }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/aliases
new file mode 100644
index 00000000..df49fa1e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/aliases
@@ -0,0 +1,6 @@
+cloud/azure
+shippable/azure/group4
+destructive
+azure_rm_galleryimage
+azure_rm_galleryimageversion
+azure_rm_snapshot
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/tasks/main.yml
new file mode 100644
index 00000000..676fcaa5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_gallery/tasks/main.yml
@@ -0,0 +1,345 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: testVnet
+ address_prefixes: "10.0.0.0/16"
+
+- name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: testSubnet
+ address_prefix: "10.0.1.0/24"
+ virtual_network: testVnet
+
+- name: Create public IP address
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Static
+ name: testPublicIP
+
+- name: Create virtual network inteface cards for VM A and B
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "vmforimage{{ rpfx }}nic"
+ virtual_network: testVnet
+ subnet: testSubnet
+
+- name: Create VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "vmforimage{{ rpfx }}"
+ location: eastus
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_B1ms
+ network_interfaces: "vmforimage{{ rpfx }}nic"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+
+- name: Get VM facts
+ azure_rm_virtualmachine_info:
+ resource_group: "{{ resource_group }}"
+ name: "vmforimage{{ rpfx }}"
+ register: output
+
+- name: Create a snapshot by importing an unmanaged blob from the same subscription.
+ azure_rm_snapshot:
+ resource_group: "{{ resource_group }}"
+ name: "mySnapshot-{{ rpfx }}"
+ location: eastus
+ creation_data:
+ create_option: Import
+ source_uri: 'https://{{ output.vms[0].storage_account_name }}.blob.core.windows.net/{{ output.vms[0].storage_container_name }}/{{ output.vms[0].storage_blob_name }}'
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Generalize VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "vmforimage{{ rpfx }}"
+ generalized: yes
+- name: Create custom image
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ name: testimagea
+ source: "vmforimage{{ rpfx }}"
+- name: Create or update a simple gallery.
+ azure_rm_gallery:
+ resource_group: "{{ resource_group }}"
+ name: myGallery{{ rpfx }}
+ location: eastus
+ description: This is the gallery description.
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create or update a simple gallery - idempotent
+ azure_rm_gallery:
+ resource_group: "{{ resource_group }}"
+ name: myGallery{{ rpfx }}
+ location: eastus
+ description: This is the gallery description.
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Create or update a simple gallery - change description
+ azure_rm_gallery:
+ resource_group: "{{ resource_group }}"
+ name: myGallery{{ rpfx }}
+ location: eastus
+ description: This is the gallery description - xxx.
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get a gallery info.
+ azure_rm_gallery_info:
+ resource_group: "{{ resource_group }}"
+ name: myGallery{{ rpfx }}
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+ - output.galleries['id'] != None
+ - output.galleries['name'] != None
+ - output.galleries['location'] != None
+ - output.galleries['description'] != None
+ - output.galleries['provisioning_state'] != None
+
+- name: Create or update gallery image
+ azure_rm_galleryimage:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ name: myImage
+ location: eastus
+ os_type: linux
+ os_state: generalized
+ identifier:
+ publisher: myPublisherName
+ offer: myOfferName
+ sku: mySkuName
+ description: Image Description
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create or update gallery image - idempotent
+ azure_rm_galleryimage:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ name: myImage
+ location: eastus
+ os_type: linux
+ os_state: generalized
+ identifier:
+ publisher: myPublisherName
+ offer: myOfferName
+ sku: mySkuName
+ description: Image Description
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Create or update gallery image - change description
+ azure_rm_galleryimage:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ name: myImage
+ location: eastus
+ os_type: linux
+ os_state: generalized
+ identifier:
+ publisher: myPublisherName
+ offer: myOfferName
+ sku: mySkuName
+ description: Image Description XXXs
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get a gallery image info.
+ azure_rm_galleryimage_info:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ name: myImage
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+ - output.images['id'] != None
+ - output.images['name'] != None
+ - output.images['location'] != None
+ - output.images['os_state'] != None
+ - output.images['os_type'] != None
+ - output.images['identifier'] != None
+
+- name: Create or update a simple gallery Image Version.
+ azure_rm_galleryimageversion:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ gallery_image_name: myImage
+ name: 10.1.3
+ location: eastus
+ publishing_profile:
+ end_of_life_date: "2050-10-01t00:00:00+00:00"
+ exclude_from_latest: yes
+ replica_count: 3
+ storage_account_type: Standard_LRS
+ target_regions:
+ - name: eastus
+ regional_replica_count: 1
+ - name: westus
+ regional_replica_count: 2
+ storage_account_type: Standard_ZRS
+ managed_image:
+ name: testimagea
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create or update a simple gallery Image Version - idempotent
+ azure_rm_galleryimageversion:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ gallery_image_name: myImage
+ name: 10.1.3
+ location: eastus
+ publishing_profile:
+ end_of_life_date: "2050-10-01t00:00:00+00:00"
+ exclude_from_latest: yes
+ replica_count: 3
+ storage_account_type: Standard_LRS
+ target_regions:
+ - name: eastus
+ regional_replica_count: 1
+ - name: westus
+ regional_replica_count: 2
+ storage_account_type: Standard_ZRS
+ managed_image:
+ name: testimagea
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Create or update a simple gallery Image Version - change end of life
+ azure_rm_galleryimageversion:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ gallery_image_name: myImage
+ name: 10.1.3
+ location: eastus
+ publishing_profile:
+ end_of_life_date: "2051-10-01t00:00:00+00:00"
+ exclude_from_latest: yes
+ replica_count: 3
+ storage_account_type: Standard_LRS
+ target_regions:
+ - name: eastus
+ regional_replica_count: 1
+ - name: westus
+ regional_replica_count: 2
+ storage_account_type: Standard_ZRS
+ managed_image:
+ name: testimagea
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get a simple gallery Image Version info.
+ azure_rm_galleryimageversion_info:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ gallery_image_name: myImage
+ name: 10.1.3
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+ - output.versions['id'] != None
+ - output.versions['name'] != None
+ - output.versions['location'] != None
+ - output.versions['publishing_profile'] != None
+ - output.versions['provisioning_state'] != None
+
+- name: Delete gallery image Version.
+ azure_rm_galleryimageversion:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ gallery_image_name: myImage
+ name: 10.1.3
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: pasue 2 minutes, wait for deletion complete
+ pause:
+ minutes: 2
+
+- name: Delete gallery image
+ azure_rm_galleryimage:
+ resource_group: "{{ resource_group }}"
+ gallery_name: myGallery{{ rpfx }}
+ name: myImage
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: pasue 2 minutes, wait for deletion complete
+ pause:
+ minutes: 2
+
+- name: Delete gallery
+ azure_rm_gallery:
+ resource_group: "{{ resource_group }}"
+ name: myGallery{{ rpfx }}
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/aliases
new file mode 100644
index 00000000..b61052b3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/aliases
@@ -0,0 +1,6 @@
+cloud/azure
+destructive
+shippable/azure/group14
+unstable # test is slow (~30 minute run time), not unstable, but this is better than unsupported
+azure_rm_hdinsightcluster_info
+disabled
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/tasks/main.yml
new file mode 100644
index 00000000..edb99c4c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_hdinsightcluster/tasks/main.yml
@@ -0,0 +1,244 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "storage{{ rpfx }}"
+ account_type: Standard_LRS
+ location: eastus2
+
+- name: Sample for Azure REST API - StorageAccounts_ListKeys
+ azure_rm_resource:
+ api_version: '2018-07-01'
+ method: POST
+ resource_group: "{{ resource_group }}"
+ provider: storage
+ resource_type: storageaccounts
+ resource_name: "storage{{ rpfx }}"
+ subresource:
+ - type: listkeys
+ register: storage_output
+
+- debug:
+ var: storage_output
+
+- name: Create instance of Cluster -- check mode
+ azure_rm_hdinsightcluster:
+ resource_group: "{{ resource_group }}"
+ name: "cluster{{ rpfx }}"
+ location: eastus2
+ cluster_version: 3.6
+ os_type: linux
+ tier: standard
+ cluster_definition:
+ kind: spark
+ gateway_rest_username: http-user
+ gateway_rest_password: Password123!
+ storage_accounts:
+ - name: storage{{ rpfx }}.blob.core.windows.net
+ is_default: yes
+ container: "cluster{{ rpfx }}"
+ key: "{{ storage_output['response']['keys'][0]['value'] }}"
+ compute_profile_roles:
+ - name: headnode
+ target_instance_count: 1
+ vm_size: Standard_D3
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ - name: workernode
+ target_instance_count: 1
+ vm_size: Standard_D3
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ - name: zookeepernode
+ target_instance_count: 3
+ vm_size: Medium
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Cluster
+ azure_rm_hdinsightcluster:
+ resource_group: "{{ resource_group }}"
+ name: "cluster{{ rpfx }}"
+ location: eastus2
+ cluster_version: 3.6
+ os_type: linux
+ tier: standard
+ cluster_definition:
+ kind: spark
+ gateway_rest_username: http-user
+ gateway_rest_password: Password123!
+ storage_accounts:
+ - name: storage{{ rpfx }}.blob.core.windows.net
+ is_default: yes
+ container: "cluster{{ rpfx }}"
+ key: "{{ storage_output['response']['keys'][0]['value'] }}"
+ compute_profile_roles:
+ - name: headnode
+ target_instance_count: 1
+ vm_size: Standard_D3
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ - name: workernode
+ target_instance_count: 1
+ vm_size: Standard_D3
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ - name: zookeepernode
+ target_instance_count: 3
+ vm_size: Medium
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ register: output
+
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create again instance of Cluster -- idempotent
+ azure_rm_hdinsightcluster:
+ resource_group: "{{ resource_group }}"
+ name: "cluster{{ rpfx }}"
+ location: eastus2
+ cluster_version: 3.6
+ os_type: linux
+ tier: standard
+ cluster_definition:
+ kind: spark
+ gateway_rest_username: http-user
+ gateway_rest_password: Password123!
+ storage_accounts:
+ - name: storage{{ rpfx }}.blob.core.windows.net
+ is_default: yes
+ container: "cluster{{ rpfx }}"
+ key: "{{ storage_output['response']['keys'][0]['value'] }}"
+ compute_profile_roles:
+ - name: headnode
+ target_instance_count: 1
+ vm_size: Standard_D3
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ - name: workernode
+ target_instance_count: 1
+ vm_size: Standard_D3
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ - name: zookeepernode
+ target_instance_count: 3
+ vm_size: Medium
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Create again instance of Cluster -- resize and add tags
+ azure_rm_hdinsightcluster:
+ resource_group: "{{ resource_group }}"
+ name: "cluster{{ rpfx }}"
+ location: eastus2
+ cluster_version: 3.6
+ os_type: linux
+ tier: standard
+ cluster_definition:
+ kind: spark
+ gateway_rest_username: http-user
+ gateway_rest_password: Password123!
+ storage_accounts:
+ - name: storage{{ rpfx }}.blob.core.windows.net
+ is_default: yes
+ container: "cluster{{ rpfx }}"
+ key: "{{ storage_output['response']['keys'][0]['value'] }}"
+ compute_profile_roles:
+ - name: headnode
+ target_instance_count: 1
+ vm_size: Standard_D3
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ - name: workernode
+ target_instance_count: 2
+ vm_size: Standard_D3
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ - name: zookeepernode
+ target_instance_count: 3
+ vm_size: Medium
+ linux_profile:
+ username: sshuser
+ password: Password123!
+ tags:
+ aaa: bbb
+ register: output
+- debug:
+ var: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Get facts of Cluster
+ azure_rm_hdinsightcluster_info:
+ resource_group: "{{ resource_group }}"
+ name: "cluster{{ rpfx }}"
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.clusters[0]['id'] != None
+ - output.clusters[0]['resource_group'] != None
+ - output.clusters[0]['name'] != None
+ - output.clusters[0]['location'] != None
+ - output.clusters[0]['cluster_version'] != None
+ - output.clusters[0]['os_type'] != None
+ - output.clusters[0]['tier'] != None
+ - output.clusters[0]['cluster_definition'] != None
+ - output.clusters[0]['compute_profile_roles'] != None
+ - output.clusters[0]['connectivity_endpoints'] != None
+
+- name: Delete instance of Cluster -- check mode
+ azure_rm_hdinsightcluster:
+ resource_group: "{{ resource_group }}"
+ name: "cluster{{ rpfx }}"
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of Cluster
+ azure_rm_hdinsightcluster:
+ resource_group: "{{ resource_group }}"
+ name: "cluster{{ rpfx }}"
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/aliases
new file mode 100644
index 00000000..2d7dea2c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group3
+destructive
+azure_rm_image_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/tasks/main.yml
new file mode 100644
index 00000000..ba06e86a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_image/tasks/main.yml
@@ -0,0 +1,174 @@
+- name: Create storage account name
+ set_fact:
+ vm_name: "vm{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}x"
+ public_ip_name: "pip{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ security_group_name: "sg{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ empty_disk_name: "emptydisk{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ address_prefixes: "10.10.0.0/16"
+
+- name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ address_prefix: "10.10.0.0/24"
+ virtual_network: "{{ vm_name }}"
+
+- name: Create public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Static
+ name: "{{ public_ip_name }}"
+
+- name: Create security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ security_group_name }}"
+
+- name: Create NIC
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ virtual_network: "{{ vm_name }}"
+ subnet: "{{ vm_name }}"
+ public_ip_name: "{{ public_ip_name }}"
+ security_group: "{{ security_group_name }}"
+
+- name: Create virtual machine
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ vm_size: Standard_A0
+ managed_disk_type: Standard_LRS
+ admin_username: adminuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/adminuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ os_type: Linux
+ network_interfaces: "{{ vm_name }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: vm
+
+- name: Create new empty managed disk
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "{{ empty_disk_name }}"
+ storage_account_type: "Standard_LRS"
+ disk_size_gb: 1
+ register: emptydisk
+
+- name: Create an image from VM (check mode)
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ source: "{{ vm.ansible_facts.azure_vm.properties.storageProfile.osDisk.managedDisk.id }}"
+ name: testimage001
+ os_type: Linux
+ data_disk_sources:
+ - "{{ empty_disk_name }}"
+ check_mode: yes
+ register: output
+
+- assert:
+ that: output.changed
+
+- name: Create an image from VM
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ source:
+ name: "{{ vm_name }}"
+ type: disks
+ name: testimage001
+ os_type: Linux
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: Create an image from VM (idempotent)
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ source: "{{ vm.ansible_facts.azure_vm.properties.storageProfile.osDisk.managedDisk.id }}"
+ name: testimage001
+ os_type: Linux
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+ - output.id
+
+- name: Gather information about image created
+ azure_rm_image_info:
+ resource_group: "{{ resource_group }}"
+ name: testimage001
+ register: output
+
+- assert:
+ that:
+ - output.images != []
+
+- name: Delete image (check mode)
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ name: testimage001
+ state: absent
+ register: output
+ check_mode: yes
+
+- assert:
+ that:
+ - output.changed
+
+- name: Delete image
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ name: testimage001
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Delete image (idempotent)
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ name: testimage001
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Delete empty disk
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "{{ empty_disk_name }}"
+ state: absent
+
+- name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ state: absent
+ vm_size: Standard_A0
+ register: output
+
+- name: Delete public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Static
+ name: "{{ public_ip_name }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/aliases
new file mode 100644
index 00000000..aa77c071
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group2
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/tasks/main.yml
new file mode 100644
index 00000000..6055ea1f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_iothub/tasks/main.yml
@@ -0,0 +1,172 @@
+- set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(8, True, '') }}"
+
+- name: Create IoT Hub (check mode)
+ azure_rm_iothub:
+ name: "hub{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ ip_filters:
+ - name: filter1
+ action: reject
+ ip_mask: 40.60.80.10
+ check_mode: yes
+ register: iothub
+
+- assert:
+ that:
+ - iothub.changed
+
+- name: Query IoT Hub
+ azure_rm_iothub_info:
+ name: "hub{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ register: iothub
+ ignore_errors: yes
+
+- name: Create IoT Hub
+ azure_rm_iothub:
+ name: "hub{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ ip_filters:
+ - name: filter1
+ action: reject
+ ip_mask: 40.60.80.10
+ register: iothub
+
+- assert:
+ that:
+ - iothub.changed
+
+- name: Create IoT Hub (idempontent)
+ azure_rm_iothub:
+ name: "hub{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ ip_filters:
+ - name: filter1
+ action: reject
+ ip_mask: 40.60.80.10
+ register: iothub
+
+- assert:
+ that:
+ - not iothub.changed
+
+- name: Query IoT Hub
+ azure_rm_iothub_info:
+ name: "hub{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ list_keys: yes
+ register: iothub
+
+- assert:
+ that:
+ - iothub.iothubs | length == 1
+
+- set_fact:
+ registry_write_name: "{{ item.key_name }}"
+ registry_write_key: "{{ item.primary_key }}"
+ with_items: "{{ iothub.iothubs[0]['keys'] }}"
+ when: item.rights == 'RegistryWrite, ServiceConnect, DeviceConnect'
+
+- name: Create devices
+ azure_rm_iotdevice:
+ hub: "hub{{ rpfx }}"
+ hub_policy_name: "{{ registry_write_name }}"
+ hub_policy_key: "{{ registry_write_key }}"
+ name: "mydevice{{ item }}"
+ twin_tags:
+ location:
+ country: US
+ city: Redmond
+ sensor: humidity
+ with_items:
+ - 1
+ - 2
+
+- name: Query devices
+ azure_rm_iotdevice_info:
+ hub: "hub{{ rpfx }}"
+ hub_policy_name: "{{ registry_write_name }}"
+ hub_policy_key: "{{ registry_write_key }}"
+ register: devices
+
+- assert:
+ that:
+ - devices.iot_devices | length == 2
+
+- name: Query devices
+ azure_rm_iotdevice_info:
+ hub: "hub{{ rpfx }}"
+ name: "mydevice1"
+ hub_policy_name: "{{ registry_write_name }}"
+ hub_policy_key: "{{ registry_write_key }}"
+ register: devices
+
+- assert:
+ that:
+ - devices.iot_devices | length == 1
+ - devices.iot_devices[0].deviceId == 'mydevice1'
+
+- name: Query devices twin
+ azure_rm_iotdevice_info:
+ hub: "hub{{ rpfx }}"
+ query: "SELECT * FROM devices WHERE tags.location.country = 'US'"
+ hub_policy_name: "{{ registry_write_name }}"
+ hub_policy_key: "{{ registry_write_key }}"
+ register: devices
+
+- assert:
+ that:
+ - devices.iot_devices | length == 2
+
+- name: Update devices
+ azure_rm_iotdevice:
+ hub: "hub{{ rpfx }}"
+ hub_policy_name: "{{ registry_write_name }}"
+ hub_policy_key: "{{ registry_write_key }}"
+ name: "mydevice{{ item }}"
+ edge_enabled: yes
+ twin_tags:
+ location:
+ country: China
+ city: Shanghai
+ sensor: humidity
+ with_items:
+ - 1
+ - 3
+
+- name: Query devices twin
+ azure_rm_iotdevice_info:
+ hub: "hub{{ rpfx }}"
+ query: "SELECT * FROM devices WHERE tags.location.country = 'US'"
+ hub_policy_name: "{{ registry_write_name }}"
+ hub_policy_key: "{{ registry_write_key }}"
+ register: devices
+
+- assert:
+ that:
+ - devices.iot_devices | length == 1
+ - devices.iot_devices[0].deviceId == 'mydevice2'
+
+- name: Delete IoT Hub (check mode)
+ azure_rm_iothub:
+ name: "hub{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ check_mode: yes
+ register: iothub
+
+- assert:
+ that:
+ - iothub.changed
+
+- name: Delete IoT Hub
+ azure_rm_iothub:
+ name: "hub{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: iothub
+
+- assert:
+ that:
+ - iothub.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/aliases
new file mode 100644
index 00000000..c256751e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/aliases
@@ -0,0 +1,5 @@
+cloud/azure
+destructive
+shippable/azure/group9
+azure_rm_keyvaultkey
+azure_rm_keyvaultsecret
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/lookup_plugins/azure_service_principal_attribute.py b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/lookup_plugins/azure_service_principal_attribute.py
new file mode 100644
index 00000000..1b7d0318
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/lookup_plugins/azure_service_principal_attribute.py
@@ -0,0 +1,94 @@
+# (c) 2018 Yunge Zhu, <yungez@microsoft.com>
+# (c) 2017 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = """
+lookup: azure_service_principal_attribute
+
+requirements:
+ - azure-graphrbac
+
+author:
+ - Yunge Zhu <yungez@microsoft.com>
+
+version_added: "2.7"
+
+short_description: Look up Azure service principal attributes.
+
+description:
+ - Describes object id of your Azure service principal account.
+options:
+ azure_client_id:
+ description: azure service principal client id.
+ azure_secret:
+ description: azure service principal secret
+ azure_tenant:
+ description: azure tenant
+ azure_cloud_environment:
+ description: azure cloud environment
+"""
+
+EXAMPLES = """
+set_fact:
+ object_id: "{{ lookup('azure_service_principal_attribute',
+ azure_client_id=azure_client_id,
+ azure_secret=azure_secret,
+ azure_tenant=azure_secret) }}"
+"""
+
+RETURN = """
+_raw:
+ description:
+ Returns object id of service principal.
+"""
+
+from ansible.errors import AnsibleError
+from ansible.plugins import AnsiblePlugin
+from ansible.plugins.lookup import LookupBase
+from ansible.module_utils._text import to_native
+
+try:
+ from azure.common.credentials import ServicePrincipalCredentials
+ from azure.graphrbac import GraphRbacManagementClient
+ from msrestazure import azure_cloud
+ from msrestazure.azure_exceptions import CloudError
+except ImportError:
+ raise AnsibleError(
+ "The lookup azure_service_principal_attribute requires azure.graphrbac, msrest")
+
+
+class LookupModule(LookupBase):
+ def run(self, terms, variables, **kwargs):
+
+ self.set_options(direct=kwargs)
+
+ credentials = {}
+ credentials['azure_client_id'] = self.get_option('azure_client_id', None)
+ credentials['azure_secret'] = self.get_option('azure_secret', None)
+ credentials['azure_tenant'] = self.get_option('azure_tenant', 'common')
+
+ if credentials['azure_client_id'] is None or credentials['azure_secret'] is None:
+ raise AnsibleError("Must specify azure_client_id and azure_secret")
+
+ _cloud_environment = azure_cloud.AZURE_PUBLIC_CLOUD
+ if self.get_option('azure_cloud_environment', None) is not None:
+ cloud_environment = azure_cloud.get_cloud_from_metadata_endpoint(credentials['azure_cloud_environment'])
+
+ try:
+ azure_credentials = ServicePrincipalCredentials(client_id=credentials['azure_client_id'],
+ secret=credentials['azure_secret'],
+ tenant=credentials['azure_tenant'],
+ resource=_cloud_environment.endpoints.active_directory_graph_resource_id)
+
+ client = GraphRbacManagementClient(azure_credentials, credentials['azure_tenant'],
+ base_url=_cloud_environment.endpoints.active_directory_graph_resource_id)
+
+ response = list(client.service_principals.list(filter="appId eq '{0}'".format(credentials['azure_client_id'])))
+ sp = response[0]
+
+ return sp.object_id.split(',')
+ except CloudError as ex:
+ raise AnsibleError("Failed to get service principal object id: %s" % to_native(ex))
+ return False
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/tasks/main.yml
new file mode 100644
index 00000000..7b1bd61e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvault/tasks/main.yml
@@ -0,0 +1,270 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ tenant_id: "{{ azure_tenant }}"
+ run_once: yes
+
+- name: lookup service principal object id
+ set_fact:
+ object_id: "{{ lookup('azure_service_principal_attribute',
+ azure_client_id=azure_client_id,
+ azure_secret=azure_secret,
+ azure_tenant=tenant_id) }}"
+ register: object_id_facts
+
+- name: Create instance of Key Vault -- check mode
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ enabled_for_deployment: yes
+ vault_tenant: "{{ tenant_id }}"
+ sku:
+ name: standard
+ family: A
+ access_policies:
+ - tenant_id: "{{ tenant_id }}"
+ object_id: "{{ object_id }}"
+ keys:
+ - get
+ - list
+ - update
+ - create
+ - import
+ - delete
+ - recover
+ - backup
+ - restore
+ secrets:
+ - get
+ - list
+ - set
+ - delete
+ - recover
+ - backup
+ - restore
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Key Vault
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ enabled_for_deployment: yes
+ vault_tenant: "{{ tenant_id }}"
+ sku:
+ name: standard
+ family: A
+ access_policies:
+ - tenant_id: "{{ tenant_id }}"
+ object_id: "{{ object_id }}"
+ secrets:
+ - get
+ - list
+ - set
+ - delete
+ - recover
+ - backup
+ - restore
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Key Vault again
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ enabled_for_deployment: yes
+ vault_tenant: "{{ tenant_id }}"
+ sku:
+ name: standard
+ family: A
+ access_policies:
+ - tenant_id: "{{ tenant_id }}"
+ object_id: "{{ object_id }}"
+ secrets:
+ - get
+ - list
+ - set
+ - delete
+ - recover
+ - backup
+ - restore
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Update existing Key Vault (add a rule and tags)
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ enabled_for_deployment: yes
+ vault_tenant: "{{ tenant_id }}"
+ sku:
+ name: standard
+ family: A
+ access_policies:
+ - tenant_id: "{{ tenant_id }}"
+ object_id: "{{ object_id }}"
+ keys:
+ - get
+ - list
+ - update
+ - create
+ - import
+ - delete
+ - recover
+ - backup
+ - restore
+ secrets:
+ - get
+ - list
+ - set
+ - delete
+ - recover
+ - backup
+ - restore
+ tags:
+ aaa: bbb
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == true
+
+- name: Get key vault facts
+ azure_rm_keyvault_info:
+ resource_group: "{{ resource_group }}"
+ name: "vault{{ rpfx }}"
+ register: facts
+
+- name: Assert the facts are properly set
+ assert:
+ that:
+ - facts['keyvaults'] | length == 1
+ - facts['keyvaults'][0]['vault_uri'] != None
+ - facts['keyvaults'][0]['name'] != None
+ - facts['keyvaults'][0]['access_policies'] != None
+ - facts['keyvaults'][0]['sku'] != None
+ - facts['keyvaults'][0]['id'] != None
+#
+# azure_rm_keyvaultkey tests
+#
+
+- name: create a keyvault key
+ block:
+ - azure_rm_keyvaultkey:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ key_name: testkey
+ tags:
+ testing: test
+ delete: on-exit
+ register: output
+ - assert:
+ that: output.changed
+ rescue:
+ - azure_rm_keyvaultkey:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ state: absent
+ key_name: testkey
+
+- name: Get key current version
+ azure_rm_keyvaultkey_info:
+ vault_uri: https://vault{{ rpfx }}.vault.azure.net
+ name: testkey
+ register: facts
+
+- name: Assert key facts
+ assert:
+ that:
+ - facts['keys'] | length == 1
+ - facts['keys'][0]['kid']
+ - facts['keys'][0]['permitted_operations'] | length > 0
+ - facts['keys'][0]['type']
+ - facts['keys'][0]['version']
+
+- name: delete a kevyault key
+ azure_rm_keyvaultkey:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ state: absent
+ key_name: testkey
+ register: output
+
+- assert:
+ that: output.changed
+
+#
+# azure_rm_keyvaultsecret tests
+#
+- name: create a keyvault secret
+ block:
+ - azure_rm_keyvaultsecret:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ secret_name: testsecret
+ secret_value: 'mysecret'
+ tags:
+ testing: test
+ delete: on-exit
+ register: output
+ - assert:
+ that: output.changed
+ rescue:
+ - azure_rm_keyvaultsecret:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ state: absent
+ secret_name: testsecret
+
+- name: delete a keyvault secret
+ azure_rm_keyvaultsecret:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ state: absent
+ secret_name: testsecret
+ register: output
+
+- assert:
+ that: output.changed
+
+#
+# azure_rm_keyvault finalize & clean up
+#
+
+- name: Delete instance of Key Vault -- check mode
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of Key Vault
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of Key Vault
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/aliases
new file mode 100644
index 00000000..8f7a9a2e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group1
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/lookup_plugins/azure_service_principal_attribute.py b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/lookup_plugins/azure_service_principal_attribute.py
new file mode 100644
index 00000000..1b7d0318
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/lookup_plugins/azure_service_principal_attribute.py
@@ -0,0 +1,94 @@
+# (c) 2018 Yunge Zhu, <yungez@microsoft.com>
+# (c) 2017 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = """
+lookup: azure_service_principal_attribute
+
+requirements:
+ - azure-graphrbac
+
+author:
+ - Yunge Zhu <yungez@microsoft.com>
+
+version_added: "2.7"
+
+short_description: Look up Azure service principal attributes.
+
+description:
+ - Describes object id of your Azure service principal account.
+options:
+ azure_client_id:
+ description: azure service principal client id.
+ azure_secret:
+ description: azure service principal secret
+ azure_tenant:
+ description: azure tenant
+ azure_cloud_environment:
+ description: azure cloud environment
+"""
+
+EXAMPLES = """
+set_fact:
+ object_id: "{{ lookup('azure_service_principal_attribute',
+ azure_client_id=azure_client_id,
+ azure_secret=azure_secret,
+ azure_tenant=azure_secret) }}"
+"""
+
+RETURN = """
+_raw:
+ description:
+ Returns object id of service principal.
+"""
+
+from ansible.errors import AnsibleError
+from ansible.plugins import AnsiblePlugin
+from ansible.plugins.lookup import LookupBase
+from ansible.module_utils._text import to_native
+
+try:
+ from azure.common.credentials import ServicePrincipalCredentials
+ from azure.graphrbac import GraphRbacManagementClient
+ from msrestazure import azure_cloud
+ from msrestazure.azure_exceptions import CloudError
+except ImportError:
+ raise AnsibleError(
+ "The lookup azure_service_principal_attribute requires azure.graphrbac, msrest")
+
+
+class LookupModule(LookupBase):
+ def run(self, terms, variables, **kwargs):
+
+ self.set_options(direct=kwargs)
+
+ credentials = {}
+ credentials['azure_client_id'] = self.get_option('azure_client_id', None)
+ credentials['azure_secret'] = self.get_option('azure_secret', None)
+ credentials['azure_tenant'] = self.get_option('azure_tenant', 'common')
+
+ if credentials['azure_client_id'] is None or credentials['azure_secret'] is None:
+ raise AnsibleError("Must specify azure_client_id and azure_secret")
+
+ _cloud_environment = azure_cloud.AZURE_PUBLIC_CLOUD
+ if self.get_option('azure_cloud_environment', None) is not None:
+ cloud_environment = azure_cloud.get_cloud_from_metadata_endpoint(credentials['azure_cloud_environment'])
+
+ try:
+ azure_credentials = ServicePrincipalCredentials(client_id=credentials['azure_client_id'],
+ secret=credentials['azure_secret'],
+ tenant=credentials['azure_tenant'],
+ resource=_cloud_environment.endpoints.active_directory_graph_resource_id)
+
+ client = GraphRbacManagementClient(azure_credentials, credentials['azure_tenant'],
+ base_url=_cloud_environment.endpoints.active_directory_graph_resource_id)
+
+ response = list(client.service_principals.list(filter="appId eq '{0}'".format(credentials['azure_client_id'])))
+ sp = response[0]
+
+ return sp.object_id.split(',')
+ except CloudError as ex:
+ raise AnsibleError("Failed to get service principal object id: %s" % to_native(ex))
+ return False
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/tasks/main.yml
new file mode 100644
index 00000000..4db30c58
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultkey/tasks/main.yml
@@ -0,0 +1,84 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ tenant_id: "{{ azure_tenant }}"
+ run_once: yes
+
+- name: lookup service principal object id
+ set_fact:
+ object_id: "{{ lookup('azure_service_principal_attribute',
+ azure_client_id=azure_client_id,
+ azure_secret=azure_secret,
+ azure_tenant=tenant_id) }}"
+ register: object_id_facts
+
+- name: Create instance of Key Vault
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ enabled_for_deployment: yes
+ vault_tenant: "{{ tenant_id }}"
+ sku:
+ name: standard
+ family: A
+ access_policies:
+ - tenant_id: "{{ tenant_id }}"
+ object_id: '{{ object_id }}'
+ keys:
+ - get
+ - list
+ - update
+ - create
+ - import
+ - delete
+ - recover
+ - backup
+ - restore
+ - encrypt
+ - decrypt
+ - wrapkey
+ - unwrapkey
+ - sign
+ - verify
+ secrets:
+ - get
+ - list
+ - set
+ - delete
+ - recover
+ - backup
+ - restore
+ register: output
+
+- name: create a kevyault key
+ block:
+ - azure_rm_keyvaultkey:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ key_name: testkey
+ tags:
+ testing: test
+ delete: on-exit
+ register: output
+ - assert:
+ that: output.changed
+ rescue:
+ - azure_rm_keyvaultkey:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ state: absent
+ key_name: testkey
+
+- name: delete a kevyault key
+ azure_rm_keyvaultkey:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ state: absent
+ key_name: testkey
+ register: output
+
+- assert:
+ that: output.changed
+
+- name: Delete instance of Key Vault
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/aliases
new file mode 100644
index 00000000..fd1a5ed5
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group1
+destructive \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/lookup_plugins/azure_service_principal_attribute.py b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/lookup_plugins/azure_service_principal_attribute.py
new file mode 100644
index 00000000..1b7d0318
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/lookup_plugins/azure_service_principal_attribute.py
@@ -0,0 +1,94 @@
+# (c) 2018 Yunge Zhu, <yungez@microsoft.com>
+# (c) 2017 Ansible Project
+# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+DOCUMENTATION = """
+lookup: azure_service_principal_attribute
+
+requirements:
+ - azure-graphrbac
+
+author:
+ - Yunge Zhu <yungez@microsoft.com>
+
+version_added: "2.7"
+
+short_description: Look up Azure service principal attributes.
+
+description:
+ - Describes object id of your Azure service principal account.
+options:
+ azure_client_id:
+ description: azure service principal client id.
+ azure_secret:
+ description: azure service principal secret
+ azure_tenant:
+ description: azure tenant
+ azure_cloud_environment:
+ description: azure cloud environment
+"""
+
+EXAMPLES = """
+set_fact:
+ object_id: "{{ lookup('azure_service_principal_attribute',
+ azure_client_id=azure_client_id,
+ azure_secret=azure_secret,
+ azure_tenant=azure_secret) }}"
+"""
+
+RETURN = """
+_raw:
+ description:
+ Returns object id of service principal.
+"""
+
+from ansible.errors import AnsibleError
+from ansible.plugins import AnsiblePlugin
+from ansible.plugins.lookup import LookupBase
+from ansible.module_utils._text import to_native
+
+try:
+ from azure.common.credentials import ServicePrincipalCredentials
+ from azure.graphrbac import GraphRbacManagementClient
+ from msrestazure import azure_cloud
+ from msrestazure.azure_exceptions import CloudError
+except ImportError:
+ raise AnsibleError(
+ "The lookup azure_service_principal_attribute requires azure.graphrbac, msrest")
+
+
+class LookupModule(LookupBase):
+ def run(self, terms, variables, **kwargs):
+
+ self.set_options(direct=kwargs)
+
+ credentials = {}
+ credentials['azure_client_id'] = self.get_option('azure_client_id', None)
+ credentials['azure_secret'] = self.get_option('azure_secret', None)
+ credentials['azure_tenant'] = self.get_option('azure_tenant', 'common')
+
+ if credentials['azure_client_id'] is None or credentials['azure_secret'] is None:
+ raise AnsibleError("Must specify azure_client_id and azure_secret")
+
+ _cloud_environment = azure_cloud.AZURE_PUBLIC_CLOUD
+ if self.get_option('azure_cloud_environment', None) is not None:
+ cloud_environment = azure_cloud.get_cloud_from_metadata_endpoint(credentials['azure_cloud_environment'])
+
+ try:
+ azure_credentials = ServicePrincipalCredentials(client_id=credentials['azure_client_id'],
+ secret=credentials['azure_secret'],
+ tenant=credentials['azure_tenant'],
+ resource=_cloud_environment.endpoints.active_directory_graph_resource_id)
+
+ client = GraphRbacManagementClient(azure_credentials, credentials['azure_tenant'],
+ base_url=_cloud_environment.endpoints.active_directory_graph_resource_id)
+
+ response = list(client.service_principals.list(filter="appId eq '{0}'".format(credentials['azure_client_id'])))
+ sp = response[0]
+
+ return sp.object_id.split(',')
+ except CloudError as ex:
+ raise AnsibleError("Failed to get service principal object id: %s" % to_native(ex))
+ return False
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/tasks/main.yml
new file mode 100644
index 00000000..3f9d115c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_keyvaultsecret/tasks/main.yml
@@ -0,0 +1,90 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ tenant_id: "{{ azure_tenant }}"
+ run_once: yes
+
+- name: lookup service principal object id
+ set_fact:
+ object_id: "{{ lookup('azure_service_principal_attribute',
+ azure_client_id=azure_client_id,
+ azure_secret=azure_secret,
+ azure_tenant=tenant_id) }}"
+ register: object_id_facts
+
+- name: Create instance of Key Vault
+ azure_rm_keyvault:
+ resource_group: "{{ resource_group }}"
+ vault_name: "vault{{ rpfx }}"
+ enabled_for_deployment: yes
+ vault_tenant: "{{ tenant_id }}"
+ sku:
+ name: standard
+ family: A
+ access_policies:
+ - tenant_id: "{{ tenant_id }}"
+ object_id: "{{ object_id }}"
+ keys:
+ - get
+ - list
+ - update
+ - create
+ - import
+ - delete
+ - recover
+ - backup
+ - restore
+ secrets:
+ - get
+ - list
+ - set
+ - delete
+ - recover
+ - backup
+ - restore
+ register: output
+
+- name: create a kevyault secret
+ block:
+ - azure_rm_keyvaultsecret:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ secret_name: testsecret
+ secret_value: 'mysecret'
+ content_type: 'Content Type Secret'
+ tags:
+ testing: test
+ delete: on-exit
+ register: output
+ - assert:
+ that: output.changed
+ rescue:
+ - azure_rm_keyvaultsecret:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ state: absent
+ secret_name: testsecret
+
+- name: Get secret current version
+ azure_rm_keyvaultsecret_info:
+ vault_uri: https://vault{{ rpfx }}.vault.azure.net
+ name: testsecret
+ register: facts
+
+- name: Assert secret facts
+ assert:
+ that:
+ - facts['secrets'] | length == 1
+ - facts['secrets'][0]['sid']
+ - facts['secrets'][0]['secret']
+ - facts['secrets'][0]['tags']
+ - facts['secrets'][0]['version']
+ - facts['secrets'][0]['content_type'] == 'Content Type Secret'
+
+- name: delete a kevyault secret
+ azure_rm_keyvaultsecret:
+ keyvault_uri: https://vault{{ rpfx }}.vault.azure.net
+ state: absent
+ secret_name: testsecret
+ register: output
+
+- assert:
+ that: output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/aliases
new file mode 100644
index 00000000..cc941b59
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group12
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/tasks/main.yml
new file mode 100644
index 00000000..dddbb43f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loadbalancer/tasks/main.yml
@@ -0,0 +1,322 @@
+- name: Prepare random number
+ set_fact:
+ pipaname: "pipa{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ pipbname: "pipb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ lbvnname: "lbvn{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ lbname_a: "lba{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ lbname_b: "lbb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ lbname_c1: "lbc1-{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ lbname_c2: "lbc2-{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ lbname_d: "lbd{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: create public ip
+ azure_rm_publicipaddress:
+ name: "{{ pipbname }}"
+ sku: Standard
+ allocation_method: Static
+ resource_group: '{{ resource_group }}'
+
+- name: create public ip
+ azure_rm_publicipaddress:
+ name: "{{ pipaname }}"
+ resource_group: '{{ resource_group }}'
+
+- name: clear load balancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_a }}"
+ state: absent
+
+- name: create load balancer -- check mode
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_a }}"
+ public_ip: "{{ pipaname }}"
+ check_mode: yes
+ register: output
+
+- name: assert load balancer created
+ assert:
+ that: output.changed
+
+- name: create load balancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_a }}"
+ public_ip: "{{ pipaname }}"
+ register: output
+
+- name: assert load balancer created
+ assert:
+ that: output.changed
+
+- name: create load balancer -- idempotent
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_a }}"
+ public_ip: "{{ pipaname }}"
+ register: output
+
+- name: assert no change
+ assert:
+ that:
+ - not output.changed
+
+- name: delete load balancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_a }}"
+ state: absent
+ register: output
+
+- name: assert load balancer deleted
+ assert:
+ that: output.changed
+
+- name: delete load balancer (idempotent)
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_a }}"
+ state: absent
+ register: output
+
+- name: assert load balancer deleted (idempotent)
+ assert:
+ that: not output.changed
+
+- name: create another load balancer with more options
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_b }}"
+ sku: Standard
+ public_ip_address: "{{ pipbname }}"
+ probe_protocol: Tcp
+ probe_port: 80
+ probe_interval: 10
+ probe_fail_count: 3
+ protocol: Tcp
+ load_distribution: Default
+ frontend_port: 80
+ backend_port: 8080
+ idle_timeout: 4
+ natpool_frontend_port_start: 30
+ natpool_frontend_port_end: 40
+ natpool_backend_port: 80
+ natpool_protocol: Tcp
+ register: output
+
+- name: assert complex load balancer created
+ assert:
+ that:
+ - output.changed
+ - output.state.sku.name == 'Standard'
+
+- name: create load balancer again to check idempotency
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_b }}"
+ sku: Standard
+ public_ip_address: "{{ pipbname }}"
+ probe_protocol: Tcp
+ probe_port: 80
+ probe_interval: 10
+ probe_fail_count: 3
+ protocol: Tcp
+ load_distribution: Default
+ frontend_port: 80
+ backend_port: 8080
+ idle_timeout: 4
+ natpool_frontend_port_start: 30
+ natpool_frontend_port_end: 40
+ natpool_backend_port: 80
+ natpool_protocol: Tcp
+ register: output
+
+- name: assert that output has not changed
+ assert:
+ that:
+ - not output.changed
+
+- name: create load balancer again to check idempotency - change something
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_b }}"
+ sku: Standard
+ public_ip_address: "{{ pipbname }}"
+ probe_protocol: Tcp
+ probe_port: 80
+ probe_interval: 10
+ probe_fail_count: 3
+ protocol: Tcp
+ load_distribution: Default
+ frontend_port: 81
+ backend_port: 8080
+ idle_timeout: 4
+ natpool_frontend_port_start: 30
+ natpool_frontend_port_end: 40
+ natpool_backend_port: 80
+ natpool_protocol: Tcp
+ register: output
+
+- name: assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: delete load balancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_b }}"
+ state: absent
+
+- name: create load balancer with multiple parameters
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_c1 }}"
+ frontend_ip_configurations:
+ - name: frontendipconf0
+ public_ip_address: "{{ pipaname }}"
+ backend_address_pools:
+ - name: backendaddrpool0
+ probes:
+ - name: prob0
+ port: 80
+ inbound_nat_pools:
+ - name: inboundnatpool0
+ frontend_ip_configuration_name: frontendipconf0
+ protocol: Tcp
+ frontend_port_range_start: 80
+ frontend_port_range_end: 81
+ backend_port: 8080
+ load_balancing_rules:
+ - name: lbrbalancingrule0
+ frontend_ip_configuration: frontendipconf0
+ backend_address_pool: backendaddrpool0
+ frontend_port: 80
+ backend_port: 80
+ probe: prob0
+ register: output
+
+- name: assert complex load balancer created
+ assert:
+ that: output.changed
+
+- name: delete load balancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_c1 }}"
+ state: absent
+
+- name: create load balancer with multiple parameters
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_c2 }}"
+ frontend_ip_configurations:
+ - name: frontendipconf0
+ public_ip_address: "{{ pipaname }}"
+ backend_address_pools:
+ - name: backendaddrpool0
+ probes:
+ - name: prob0
+ port: 80
+ load_balancing_rules:
+ - name: lbrbalancingrule0
+ frontend_ip_configuration: frontendipconf0
+ backend_address_pool: backendaddrpool0
+ frontend_port: 80
+ backend_port: 80
+ probe: prob0
+ inbound_nat_rules:
+ - name: inboundnatrule0
+ backend_port: 8080
+ protocol: Tcp
+ frontend_port: 8080
+ frontend_ip_configuration: frontendipconf0
+ register: output
+
+- name: assert complex load balancer created
+ assert:
+ that: output.changed
+
+- name: delete load balancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_c2 }}"
+ state: absent
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ lbvnname }}"
+ address_prefixes: "10.10.0.0/16"
+
+- name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: "lb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}sb"
+ address_prefix: "10.10.0.0/24"
+ virtual_network: "{{ lbvnname }}"
+ register: subnet
+
+- name: create internal loadbalancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_d }}"
+ frontend_ip_configurations:
+ - name: frontendipconf0
+ private_ip_address: 10.10.0.10
+ private_ip_allocation_method: Static
+ subnet: "{{ subnet.state.id }}"
+ backend_address_pools:
+ - name: backendaddrpool0
+ probes:
+ - name: prob0
+ port: 80
+ inbound_nat_pools:
+ - name: inboundnatpool0
+ frontend_ip_configuration_name: frontendipconf0
+ protocol: Tcp
+ frontend_port_range_start: 80
+ frontend_port_range_end: 81
+ backend_port: 8080
+ load_balancing_rules:
+ - name: lbrbalancingrule0
+ frontend_ip_configuration: frontendipconf0
+ backend_address_pool: backendaddrpool0
+ frontend_port: 80
+ backend_port: 80
+ probe: prob0
+ register: output
+
+- name: assert complex load balancer created
+ assert:
+ that: output.changed
+
+- name: delete load balancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "{{ lbname_d }}"
+ state: absent
+
+- name: cleanup public ip
+ azure_rm_publicipaddress:
+ name: "{{ item }}"
+ resource_group: '{{ resource_group }}'
+ state: absent
+ with_items:
+ - "{{ pipaname }}"
+ - "{{ pipbname }}"
+
+- name: cleanup subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: "lb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}sb"
+ virtual_network: "{{ lbvnname }}"
+ state: absent
+
+- name: cleanup virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ lbvnname }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/aliases
new file mode 100644
index 00000000..670aa52e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/aliases
@@ -0,0 +1,5 @@
+cloud/azure
+shippable/azure/group4
+destructive
+azure_rm_loganalyticsworkspace
+azure_rm_loganalyticsworkspace_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/tasks/main.yml
new file mode 100644
index 00000000..65cb4f97
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_loganalyticsworkspace/tasks/main.yml
@@ -0,0 +1,161 @@
+- name: Prepare random number
+ set_fact:
+ name: "loganalytics{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ retention_days: 30
+
+- name: Create Log Analytics Workspace (Check Mode On)
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ intelligence_packs:
+ Backup: true
+ Containers: true
+ retention_in_days: "{{ retention_days }}"
+ resource_group: "{{ resource_group }}"
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get Log Analytics workspace information
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ show_intelligence_packs: true
+ show_management_groups: true
+ show_shared_keys: true
+ show_usages: true
+ register: facts
+
+- assert:
+ that:
+ - facts.workspaces | length == 0
+
+- name: Create Log Analytics Workspace
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ intelligence_packs:
+ Backup: true
+ Containers: true
+ retention_in_days: "{{ retention_days }}"
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.retention_in_days == retention_days
+ # - output.intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true
+ # - output.intelligence_packs | json_query('[?name == `Containers`].enabled') | first == true
+ - output.sku == 'pergb2018'
+
+- name: Get Log Analytics workspace information (Show full information)
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ show_intelligence_packs: true
+ show_management_groups: true
+ show_shared_keys: true
+ show_usages: true
+ register: facts
+
+- assert:
+ that:
+ - not facts.changed
+ - facts.workspaces | length > 0
+ - facts.workspaces[0].retention_in_days == retention_days
+ - facts.workspaces[0].intelligence_packs | length > 0
+ # - facts.workspaces[0].intelligence_packs | json_query('[?name == `Backup`].enabled') | first == true
+ # - facts.workspaces[0].intelligence_packs | json_query('[?name == `Containers`].enabled') | first == true
+ - facts.workspaces[0].shared_keys is defined
+ - facts.workspaces[0].shared_keys.primary_shared_key is defined
+ - facts.workspaces[0].shared_keys.secondary_shared_key is defined
+ - facts.workspaces[0].usages is defined
+ - facts.workspaces[0].usages | length > 0
+ - facts.workspaces[0].management_groups is defined
+ - facts.workspaces[0].sku == 'pergb2018'
+
+- name: Get Log Analytics workspace information (Show default information)
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: facts
+
+- assert:
+ that:
+ - not facts.changed
+ - facts.workspaces | length > 0
+ - facts.workspaces[0].retention_in_days == retention_days
+ - facts.workspaces[0].intelligence_packs is not defined
+ - facts.workspaces[0].shared_keys is not defined
+ - facts.workspaces[0].usages is not defined
+ - facts.workspaces[0].management_groups is not defined
+ - facts.workspaces[0].sku == 'pergb2018'
+
+- name: Create Log Analytics workspace (Test Idempotence)
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ retention_in_days: "{{ retention_days }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Remove Log Analytics workspace (Check Mode On)
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get Log Analytics workspace information(Check still exists after remove Check Mode On)
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: facts
+
+- assert:
+ that:
+ - facts.workspaces | length == 1
+
+- name: Remove Log Analytics workspace
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ force: true
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get Log Analytics workspace information
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: facts
+
+- assert:
+ that:
+ - facts.workspaces | length == 0
+
+- name: Remove Log Analytics workspace (Test Idempotence)
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ force: true
+ register: output
+
+- assert:
+ that:
+ - not output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/aliases
new file mode 100644
index 00000000..bf20c612
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group4
+destructive
+azure_rm_manageddisk_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/tasks/main.yml
new file mode 100644
index 00000000..3abaaefb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_manageddisk/tasks/main.yml
@@ -0,0 +1,204 @@
+ - name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ parameter: {}
+ run_once: yes
+
+ - name: Clearing (if) previous disks were created
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}{{ item }}"
+ managed_by: ''
+ state: absent
+ with_items:
+ - 1
+ - 2
+ - 3
+
+ - name: Test invalid account name (should give error)
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "invalid_char$"
+ disk_size_gb: 1
+ register: output
+ ignore_errors: yes
+ check_mode: no
+
+ - name: Assert task failed
+ assert: { that: "output['failed'] == True" }
+
+ - name: Create managed disk (Check Mode)
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}1"
+ storage_account_type: "Standard_LRS"
+ disk_size_gb: 1
+ tags:
+ testing: testing
+ delete: never
+ register: output
+ check_mode: yes
+
+ - name: Assert status succeeded (Check Mode)
+ assert:
+ that:
+ - output.changed
+ - output.state
+
+ - name: Create new managed disk succesfully
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}1"
+ storage_account_type: "Standard_LRS"
+ disk_size_gb: 1
+ tags:
+ testing: testing
+ delete: never
+ register: output
+
+ - name: Assert status succeeded and results include an Id value
+ assert:
+ that:
+ - output.changed
+ - output.state.disk_size_gb == 1
+ - output.state.id is defined
+ - output.state.os_type == None
+ - output.state.storage_account_type == "Standard_LRS"
+
+ - name: Copy disk to a new managed disk
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}2"
+ create_option: "copy"
+ source_uri: "{{ output.state.id }}"
+ disk_size_gb: 1
+ register: disk2
+
+ - name: Assert status succeeded and results include an Id value
+ assert:
+ that:
+ - disk2.changed
+ - disk2.state.id is defined
+
+ - name: Create disk to a new managed disk with zone and os type
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}3"
+ source_uri: "{{ output.state.id }}"
+ disk_size_gb: 1
+ zone: "1"
+ os_type: windows
+ register: disk3
+
+ - name: Assert status succeeded and results include an Id value
+ assert:
+ that:
+ - disk3.changed
+ - disk3.state.id is defined
+ - disk3.state.zone == "1"
+ - disk3.state.os_type == "windows"
+
+ - name: Change storage account type to an invalid type
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}1"
+ storage_account_type: "PremiumL"
+ disk_size_gb: 1
+ register: output
+ ignore_errors: yes
+
+ - name: Assert storage account type change failed
+ assert: { that: "output['failed'] == True" }
+
+ - name: Update disk options (os_type, account_type, size, tags)
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}1"
+ disk_size_gb: 2
+ os_type: linux
+ storage_account_type: "StandardSSD_LRS"
+ tags:
+ galaxy: "no"
+ delete: never
+ register: output
+
+ - assert:
+ that:
+ - output.changed
+ - output.state.storage_account_type == "StandardSSD_LRS"
+ - output.state.disk_size_gb == 2
+ - "output.state.tags | length == 2"
+ - "output.state.tags.galaxy == 'no'"
+ - output.state.os_type == 'linux'
+
+ - name: Gather facts to one specific disk
+ azure_rm_manageddisk_info:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}1"
+ register: output
+
+ - assert:
+ that:
+ - "output.ansible_info.azure_managed_disk | length == 1"
+ - output.ansible_info.azure_managed_disk[0].storage_account_type == "StandardSSD_LRS"
+ - output.ansible_info.azure_managed_disk[0].disk_size_gb == 2
+ - "output.ansible_info.azure_managed_disk[0].os_type == 'linux'"
+
+ - set_fact:
+ parameter: "{{parameter |combine({item.key: item.value})}}"
+ when: "{{item.key not in ['id', 'changed'] and item.value != None}}"
+ with_dict: "{{ output.ansible_info.azure_managed_disk[0] }}"
+
+ - name: Create disk with facts return value
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ location: "{{ parameter.location }}"
+ name: "{{ parameter.name }}"
+ storage_account_type: "{{ parameter.storage_account_type }}"
+ disk_size_gb: "{{ parameter.disk_size_gb }}"
+ create_option: "{{ parameter.create_option }}"
+ tags: "{{ parameter.tags }}"
+ register: output
+
+ - assert:
+ that:
+ - not output.changed
+
+ - name: Delete managed disk (Check Mode)
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}1"
+ state: absent
+ register: output
+ check_mode: yes
+
+ - name: Assert status succeeded
+ assert:
+ that:
+ - output.changed
+ - output.state
+
+ - name: Delete all managed disk
+ azure_rm_manageddisk:
+ resource_group: "{{ resource_group }}"
+ name: "md{{ rpfx }}{{ item }}"
+ managed_by: ''
+ state: absent
+ with_items:
+ - 1
+ - 2
+ - 3
+
+ - name: Delete virtual machine
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "tr{{ rpfx }}"
+ state: absent
+ vm_size: Standard_DS1_v2
+
+ - name: Delete public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Static
+ name: "tr{{ rpfx }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/aliases
new file mode 100644
index 00000000..b586dc7c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/aliases
@@ -0,0 +1,8 @@
+cloud/azure
+destructive
+shippable/azure/group9
+azure_rm_mariadbserver_facts
+azure_rm_mariadbdatabase
+azure_rm_mariadbdatabase_facts
+azure_rm_mariadbfirewallrule
+azure_rm_mariadbfirewallrule_facts
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/tasks/main.yml
new file mode 100644
index 00000000..35df3669
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mariadbserver/tasks/main.yml
@@ -0,0 +1,640 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create instance of MariaDB Server -- check mode
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 10.2
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of MariaDB Server
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 10.2
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.state == 'Ready'
+
+- name: Create again instance of MariaDB Server
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 10.2
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.state == 'Ready'
+
+- name: Update instance of MariaDB Server, change storage size
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 128000
+ version: 10.2
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed
+ - output.state == 'Ready'
+- debug:
+ var: output
+
+- name: Gather facts MariaDB Server
+ azure_rm_mariadbserver_info:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}
+ register: output
+- name: Assert that storage size is correct
+ assert:
+ that:
+ - output.servers[0]['storage_mb'] == 128000
+
+- name: Create second instance of MariaDB Server
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}second
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 10.3
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ tags:
+ aaa: bbb
+
+- name: Create second instance of MariaDB Server
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}second
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 10.3
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ tags:
+ ccc: ddd
+
+- name: Gather facts MariaDB Server
+ azure_rm_mariadbserver_info:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}second
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers[0]['id'] != None
+ - output.servers[0]['name'] != None
+ - output.servers[0]['location'] != None
+ - output.servers[0]['sku']['name'] != None
+ - output.servers[0]['sku']['tier'] != None
+ - output.servers[0]['sku']['capacity'] != None
+ - output.servers[0]['version'] != None
+ - output.servers[0]['user_visible_state'] != None
+ - output.servers[0]['fully_qualified_domain_name'] != None
+ - output.servers[0]['tags']['aaa'] == 'bbb'
+ - output.servers[0]['tags']['ccc'] == 'ddd'
+
+- name: Gather facts MariaDB Server
+ azure_rm_mariadbserver_info:
+ resource_group: "{{ resource_group }}"
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers[0]['id'] != None
+ - output.servers[0]['name'] != None
+ - output.servers[0]['location'] != None
+ - output.servers[0]['sku']['name'] != None
+ - output.servers[0]['sku']['tier'] != None
+ - output.servers[0]['sku']['capacity'] != None
+ - output.servers[0]['version'] != None
+ - output.servers[0]['user_visible_state'] != None
+ - output.servers[0]['fully_qualified_domain_name'] != None
+ - output.servers[1]['id'] != None
+ - output.servers[1]['name'] != None
+ - output.servers[1]['location'] != None
+ - output.servers[1]['sku']['name'] != None
+ - output.servers[1]['sku']['tier'] != None
+ - output.servers[1]['sku']['capacity'] != None
+ - output.servers[1]['version'] != None
+ - output.servers[1]['user_visible_state'] != None
+ - output.servers[1]['fully_qualified_domain_name'] != None
+
+#
+# azure_rm_mariadbdatabase tests below
+#
+- name: Create instance of MariaDB Database -- check mode
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of MariaDB Database
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ collation: latin1_swedish_ci
+ charset: latin1
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.name == 'testdatabase'
+
+- name: Create again instance of MariaDB Database
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ collation: latin1_swedish_ci
+ charset: latin1
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.name == 'testdatabase'
+
+- name: Try to update database without force_update
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ collation: latin1_czech_ci
+ charset: latin1
+ ignore_errors: yes
+ register: output
+- name: Assert that nothing has changed
+ assert:
+ that:
+ - output.changed == False
+
+- name: Update instance of database using force_update
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ collation: latin1_czech_ci
+ charset: latin1
+ force_update: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+ - output.name == 'testdatabase'
+
+- name: Create second instance of MariaDB Database
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase2
+
+- name: Gather facts MariaDB Database
+ azure_rm_mariadbdatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0]['server_name'] != None
+ - output.databases[0]['name'] != None
+ - output.databases[0]['charset'] != None
+ - output.databases[0]['collation'] != None
+
+- name: Gather facts MariaDB Database
+ azure_rm_mariadbdatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0]['server_name'] != None
+ - output.databases[0]['name'] != None
+ - output.databases[0]['charset'] != None
+ - output.databases[0]['collation'] != None
+ - output.databases[1]['server_name'] != None
+ - output.databases[1]['name'] != None
+ - output.databases[1]['charset'] != None
+ - output.databases[1]['collation'] != None
+
+- name: Delete instance of MariaDB Database -- check mode
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of MariaDB Database
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of MariaDB Database
+ azure_rm_mariadbdatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+#
+# azure_rm_firewallrule tests below
+#
+- name: Create instance of Firewall Rule -- check mode
+ azure_rm_mariadbfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Firewall Rule
+ azure_rm_mariadbfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create again instance of Firewall Rule
+ azure_rm_mariadbfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Delete instance of Firewall Rule -- check mode
+ azure_rm_mariadbfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Firewall Rule -- second
+ azure_rm_mariadbfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}second
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Gather facts MariaDB Firewall Rule
+ azure_rm_mariadbfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules[0].id != None
+ - output.rules[0].server_name != None
+ - output.rules[0].name != None
+ - output.rules[0].start_ip_address != None
+ - output.rules[0].end_ip_address != None
+ - "output.rules | length == 1"
+
+- name: Gather facts MariaDB Firewall Rule
+ azure_rm_mariadbfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules[0].id != None
+ - output.rules[0].server_name != None
+ - output.rules[0].name != None
+ - output.rules[0].start_ip_address != None
+ - output.rules[0].end_ip_address != None
+ - output.rules[1].id != None
+ - output.rules[1].name != None
+ - output.rules[1].start_ip_address != None
+ - output.rules[1].end_ip_address != None
+ - "output.rules | length == 2"
+
+- name: Delete instance of Firewall Rule
+ azure_rm_mariadbfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of Firewall Rule
+ azure_rm_mariadbfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Delete instance of Firewall Rule - second
+ azure_rm_mariadbfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}second
+ state: absent
+
+- name: Gather facts MariaDB Firewall Rule
+ azure_rm_mariadbfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ register: output
+- name: Assert that empty list was returned
+ assert:
+ that:
+ - output.changed == False
+ - "output.rules | length == 0"
+
+#
+# configuration
+#
+- name: Create instance of Configuration -- check mode
+ azure_rm_mariadbconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: event_scheduler
+ value: "ON"
+ check_mode: yes
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to delete default configuraion
+ azure_rm_mariadbconfiguration_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: event_scheduler
+ register: output
+- name: Get facts of event_scheduler
+ debug:
+ var: output
+
+- name: Try to delete default configuraion
+ azure_rm_mariadbconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: event_scheduler
+ state: absent
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - not output.changed
+
+- name: Try to change default configuraion
+ azure_rm_mariadbconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: event_scheduler
+ value: "ON"
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to change default configuration -- idempotent
+ azure_rm_mariadbconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: event_scheduler
+ value: "ON"
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - not output.changed
+
+- name: Try to reset configuration
+ azure_rm_mariadbconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: event_scheduler
+ state: absent
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to reset configuration -- idempotent
+ azure_rm_mariadbconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: event_scheduler
+ state: absent
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - not output.changed
+
+- name: Gather facts MariaDB Configuration
+ azure_rm_mariadbconfiguration_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ name: event_scheduler
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.settings[0].id != None
+ - output.settings[0].name != None
+ - output.settings[0].value != None
+ - output.settings[0].description != None
+ - output.settings[0].source != None
+ - output.settings | length == 1
+
+- name: Gather facts MariaDB Configuration
+ azure_rm_mariadbconfiguration_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mariadbsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.settings[0].id != None
+ - output.settings[0].name != None
+ - output.settings[0].value != None
+ - output.settings[0].description != None
+ - output.settings[0].source != None
+ - output.settings | length > 1
+
+#
+# clean up azure_rm_mariadbserver test
+#
+
+- name: Delete instance of MariaDB Server -- check mode
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of MariaDB Server
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of MariaDB Server
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Delete second instance of MariaDB Server
+ azure_rm_mariadbserver:
+ resource_group: "{{ resource_group }}"
+ name: mariadbsrv{{ rpfx }}second
+ state: absent
+ async: 400
+ poll: 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/aliases
new file mode 100644
index 00000000..35b94011
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+destructive
+unsupported \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/tasks/main.yml
new file mode 100644
index 00000000..9019f59b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_monitorlogprofile/tasks/main.yml
@@ -0,0 +1,104 @@
+- name: Prepare random number
+ set_fact:
+ profile_name: "profile{{ resource_group | hash('md5') | truncate(5, True, '') }}{{ 1000 | random }}"
+ location: eastus
+ run_once: yes
+
+- name: create Azure storage account
+ azure_rm_storageaccount:
+ name: '{{ profile_name }}'
+ resource_group: "{{ resource_group }}"
+ account_type: Standard_LRS
+
+- name: create log profile (idempotence)
+ azure_rm_monitorlogprofile:
+ name: "{{ profile_name }}"
+ location: "{{ location }}"
+ locations:
+ - eastus
+ - westus
+ categories:
+ - Write
+ - Action
+ retention_policy:
+ enabled: False
+ days: 1
+ storage_account:
+ resource_group: "{{ resource_group }}"
+ name: "{{ profile_name }}"
+ check_mode: yes
+ register: output
+
+- name: assert create idempotence
+ assert:
+ that:
+ - output.changed
+
+- name: create log profile
+ azure_rm_monitorlogprofile:
+ name: "{{ profile_name }}"
+ location: "{{ location }}"
+ locations:
+ - eastus
+ - westus
+ categories:
+ - Write
+ - Action
+ retention_policy:
+ enabled: False
+ days: 1
+ storage_account:
+ resource_group: "{{ resource_group }}"
+ name: "{{ profile_name }}"
+ register: output
+
+- name: assert create
+ assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: update log profile (idempotence)
+ azure_rm_monitorlogprofile:
+ name: "{{ profile_name }}"
+ location: "{{ location }}"
+ locations:
+ - eastus
+ - westus
+ categories:
+ - Write
+ - Action
+ retention_policy:
+ enabled: False
+ days: 1
+ storage_account:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_name }}"
+ register: output
+
+- name: assert update idempotence
+ assert:
+ that:
+ - output.changed == False
+
+- name: update log profile
+ azure_rm_monitorlogprofile:
+ name: "{{ profile_name }}"
+ location: "{{ location }}"
+ locations:
+ - eastus
+ categories:
+ - Write
+ - Action
+ retention_policy:
+ enabled: False
+ days: 2
+ storage_account:
+ resource_group: "{{ resource_group }}"
+ name: "{{ profile_name }}"
+ register: output
+
+- name: assert update
+ assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/aliases
new file mode 100644
index 00000000..21e7a127
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/aliases
@@ -0,0 +1,10 @@
+cloud/azure
+destructive
+shippable/azure/group13
+azure_rm_mysqlserver_facts
+azure_rm_mysqldatabase
+azure_rm_mysqldatabase_facts
+azure_rm_mysqlfirewallrule
+azure_rm_mysqlfirewallrule_facts
+azure_rm_mysqlconfiguration
+azure_rm_mysqlconfiguration_facts
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/tasks/main.yml
new file mode 100644
index 00000000..123778e9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_mysqlserver/tasks/main.yml
@@ -0,0 +1,640 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create instance of MySQL Server -- check mode
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 5.6
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of MySQL Server
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 5.6
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.state == 'Ready'
+
+- name: Create again instance of MySQL Server
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 5.6
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.state == 'Ready'
+
+- name: Update instance of MySQL Server, change storage size
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 128000
+ version: 5.6
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed
+ - output.state == 'Ready'
+- debug:
+ var: output
+
+- name: Gather facts MySQL Server
+ azure_rm_mysqlserver_info:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}
+ register: output
+- name: Assert that storage size is correct
+ assert:
+ that:
+ - output.servers[0]['storage_mb'] == 128000
+
+- name: Create second instance of MySQL Server
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}second
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 5.6
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ tags:
+ aaa: bbb
+
+- name: Create second instance of MySQL Server
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}second
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ version: 5.6
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ tags:
+ ccc: ddd
+
+- name: Gather facts MySQL Server
+ azure_rm_mysqlserver_info:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}second
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers[0]['id'] != None
+ - output.servers[0]['name'] != None
+ - output.servers[0]['location'] != None
+ - output.servers[0]['sku']['name'] != None
+ - output.servers[0]['sku']['tier'] != None
+ - output.servers[0]['sku']['capacity'] != None
+ - output.servers[0]['version'] != None
+ - output.servers[0]['user_visible_state'] != None
+ - output.servers[0]['fully_qualified_domain_name'] != None
+ - output.servers[0]['tags']['aaa'] == 'bbb'
+ - output.servers[0]['tags']['ccc'] == 'ddd'
+
+- name: Gather facts MySQL Server
+ azure_rm_mysqlserver_info:
+ resource_group: "{{ resource_group }}"
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers[0]['id'] != None
+ - output.servers[0]['name'] != None
+ - output.servers[0]['location'] != None
+ - output.servers[0]['sku']['name'] != None
+ - output.servers[0]['sku']['tier'] != None
+ - output.servers[0]['sku']['capacity'] != None
+ - output.servers[0]['version'] != None
+ - output.servers[0]['user_visible_state'] != None
+ - output.servers[0]['fully_qualified_domain_name'] != None
+ - output.servers[1]['id'] != None
+ - output.servers[1]['name'] != None
+ - output.servers[1]['location'] != None
+ - output.servers[1]['sku']['name'] != None
+ - output.servers[1]['sku']['tier'] != None
+ - output.servers[1]['sku']['capacity'] != None
+ - output.servers[1]['version'] != None
+ - output.servers[1]['user_visible_state'] != None
+ - output.servers[1]['fully_qualified_domain_name'] != None
+
+#
+# azure_rm_mysqldatabase tests below
+#
+- name: Create instance of MySQL Database -- check mode
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of MySQL Database
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ collation: latin1_swedish_ci
+ charset: latin1
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.name == 'testdatabase'
+
+- name: Create again instance of MySQL Database
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ collation: latin1_swedish_ci
+ charset: latin1
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.name == 'testdatabase'
+
+- name: Try to update database without force_update
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ collation: latin1_czech_ci
+ charset: latin1
+ ignore_errors: yes
+ register: output
+- name: Assert that nothing has changed
+ assert:
+ that:
+ - output.changed == False
+
+- name: Update instance of database using force_update
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ collation: latin1_czech_ci
+ charset: latin1
+ force_update: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+ - output.name == 'testdatabase'
+
+- name: Create second instance of MySQL Database
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase2
+
+- name: Gather facts MySQL Database
+ azure_rm_mysqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0]['server_name'] != None
+ - output.databases[0]['name'] != None
+ - output.databases[0]['charset'] != None
+ - output.databases[0]['collation'] != None
+
+- name: Gather facts MySQL Database
+ azure_rm_mysqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0]['server_name'] != None
+ - output.databases[0]['name'] != None
+ - output.databases[0]['charset'] != None
+ - output.databases[0]['collation'] != None
+ - output.databases[1]['server_name'] != None
+ - output.databases[1]['name'] != None
+ - output.databases[1]['charset'] != None
+ - output.databases[1]['collation'] != None
+
+- name: Delete instance of MySQL Database -- check mode
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of MySQL Database
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of MySQL Database
+ azure_rm_mysqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+#
+# azure_rm_firewallrule tests below
+#
+- name: Create instance of Firewall Rule -- check mode
+ azure_rm_mysqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Firewall Rule
+ azure_rm_mysqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create again instance of Firewall Rule
+ azure_rm_mysqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Delete instance of Firewall Rule -- check mode
+ azure_rm_mysqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Firewall Rule -- second
+ azure_rm_mysqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}second
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Gather facts MySQL Firewall Rule
+ azure_rm_mysqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules[0].id != None
+ - output.rules[0].server_name != None
+ - output.rules[0].name != None
+ - output.rules[0].start_ip_address != None
+ - output.rules[0].end_ip_address != None
+ - "output.rules | length == 1"
+
+- name: Gather facts MySQL Firewall Rule
+ azure_rm_mysqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules[0].id != None
+ - output.rules[0].server_name != None
+ - output.rules[0].name != None
+ - output.rules[0].start_ip_address != None
+ - output.rules[0].end_ip_address != None
+ - output.rules[1].id != None
+ - output.rules[1].name != None
+ - output.rules[1].start_ip_address != None
+ - output.rules[1].end_ip_address != None
+ - "output.rules | length == 2"
+
+- name: Delete instance of Firewall Rule
+ azure_rm_mysqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of Firewall Rule
+ azure_rm_mysqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Delete instance of Firewall Rule - second
+ azure_rm_mysqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}second
+ state: absent
+
+- name: Gather facts MySQL Firewall Rule
+ azure_rm_mysqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ register: output
+- name: Assert that empty list was returned
+ assert:
+ that:
+ - output.changed == False
+ - "output.rules | length == 0"
+
+#
+# configuration
+#
+- name: Create instance of Configuration -- check mode
+ azure_rm_mysqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: event_scheduler
+ value: "ON"
+ check_mode: yes
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to delete default configuraion
+ azure_rm_mysqlconfiguration_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: event_scheduler
+ register: output
+- name: Get facts of event_scheduler
+ debug:
+ var: output
+
+- name: Try to delete default configuraion
+ azure_rm_mysqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: event_scheduler
+ state: absent
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - not output.changed
+
+- name: Try to change default configuraion
+ azure_rm_mysqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: event_scheduler
+ value: "ON"
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to change default configuration -- idempotent
+ azure_rm_mysqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: event_scheduler
+ value: "ON"
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - not output.changed
+
+- name: Try to reset configuration
+ azure_rm_mysqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: event_scheduler
+ state: absent
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to reset configuration -- idempotent
+ azure_rm_mysqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: event_scheduler
+ state: absent
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - not output.changed
+
+- name: Gather facts MySQL Configuration
+ azure_rm_mysqlconfiguration_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ name: event_scheduler
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.settings[0].id != None
+ - output.settings[0].name != None
+ - output.settings[0].value != None
+ - output.settings[0].description != None
+ - output.settings[0].source != None
+ - output.settings | length == 1
+
+- name: Gather facts MySQL Configuration
+ azure_rm_mysqlconfiguration_info:
+ resource_group: "{{ resource_group }}"
+ server_name: mysqlsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.settings[0].id != None
+ - output.settings[0].name != None
+ - output.settings[0].value != None
+ - output.settings[0].description != None
+ - output.settings[0].source != None
+ - output.settings | length > 1
+
+#
+# clean up azure_rm_mysqlserver test
+#
+
+- name: Delete instance of MySQL Server -- check mode
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of MySQL Server
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of MySQL Server
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Delete second instance of MySQL Server
+ azure_rm_mysqlserver:
+ resource_group: "{{ resource_group }}"
+ name: mysqlsrv{{ rpfx }}second
+ state: absent
+ async: 400
+ poll: 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/aliases
new file mode 100644
index 00000000..88fb7060
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group5
+destructive
+azure_rm_applicationsecuritygroup
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/tasks/main.yml
new file mode 100644
index 00000000..44a27b2b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_networkinterface/tasks/main.yml
@@ -0,0 +1,558 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ applicationsecuritygroup_name1: "asg{{ resource_group | hash('md5') | truncate(5, True, '') }}{{ 1000 | random }}"
+ applicationsecuritygroup_name2: "asg{{ resource_group | hash('md5') | truncate(5, True, '') }}{{ 1000 | random }}"
+ nic_name1: "nic1{{ resource_group | hash('md5') | truncate(5, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "tn{{ rpfx }}"
+ address_prefixes: "10.10.0.0/16"
+ register: vn
+
+- name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "tn{{ rpfx }}"
+ address_prefix: "10.10.0.0/24"
+ virtual_network: "tn{{ rpfx }}"
+
+- name: create public ip
+ azure_rm_publicipaddress:
+ name: "pip{{ rpfx }}"
+ resource_group: '{{ resource_group }}'
+
+- name: create load balancer with multiple parameters
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "lb{{ rpfx }}"
+ frontend_ip_configurations:
+ - name: frontendipconf0
+ public_ip_address: "pip{{ rpfx }}"
+ backend_address_pools:
+ - name: backendaddrpool0
+ - name: backendaddrpool1
+ probes:
+ - name: prob0
+ port: 80
+ inbound_nat_pools:
+ - name: inboundnatpool0
+ frontend_ip_configuration_name: frontendipconf0
+ protocol: Tcp
+ frontend_port_range_start: 80
+ frontend_port_range_end: 81
+ backend_port: 8080
+ load_balancing_rules:
+ - name: lbrbalancingrule0
+ frontend_ip_configuration: frontendipconf0
+ backend_address_pool: backendaddrpool0
+ frontend_port: 80
+ backend_port: 80
+ probe: prob0
+ register: lb
+
+- name: Create most simple NIC with virtual_network id (check mode)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ public_ip: False
+ create_with_security_group: False
+ register: output
+ check_mode: yes
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create most simple NIC with virtual_network resource_group
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network:
+ name: "tn{{ rpfx }}"
+ resource_group: "{{ resource_group_secondary }}"
+ subnet: "tn{{ rpfx }}"
+ public_ip: False
+ create_with_security_group: False
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.state.id
+ - output.state.ip_configuration.primary
+
+- name: Get fact of the new created NIC
+ azure_rm_networkinterface_info:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ register: facts
+
+- assert:
+ that:
+ - "facts.networkinterfaces | length == 1"
+ - facts.networkinterfaces[0].id == output.state.id
+ - "facts.networkinterfaces[0].ip_configurations | length == 1"
+ - facts.networkinterfaces[0].ip_configurations[0].primary == True
+ - not facts.networkinterfaces[0].security_group
+ - not facts.networkinterfaces[0].ip_configurations[0].public_ip_address
+ - not facts.networkinterfaces[0].enable_ip_forwarding
+ - not facts.networkinterfaces[0].enable_accelerated_networking
+
+- name: Create most simple NIC with ip configurations (idempotent)
+ azure_rm_networkinterface:
+ resource_group: "{{ facts.networkinterfaces[0].resource_group }}"
+ name: "{{ facts.networkinterfaces[0].name }}"
+ virtual_network: "{{ facts.networkinterfaces[0].virtual_network }}"
+ create_with_security_group: False
+ ip_configurations:
+ - name: "{{ facts.networkinterfaces[0].ip_configurations[0].name }}"
+ private_ip_address: "{{ facts.networkinterfaces[0].ip_configurations[0].private_ip_address }}"
+ private_ip_allocation_method: "{{ facts.networkinterfaces[0].ip_configurations[0].private_ip_allocation_method }}"
+ primary: "{{ facts.networkinterfaces[0].ip_configurations[0].primary }}"
+ subnet: "{{ facts.networkinterfaces[0].subnet }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Create most simple NIC (idempotent)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ create_with_security_group: False
+ public_ip: False
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Update security group (check mode)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ public_ip: False
+ security_group: "tn{{ rpfx }}sg"
+ register: output
+ check_mode: yes
+
+- assert:
+ that:
+ - output.changed
+
+- name: Update public ip address (check mode)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ public_ip_address_name: "tn{{ rpfx }}"
+ create_with_security_group: False
+ register: output
+ check_mode: yes
+
+- assert:
+ that:
+ - output.changed
+
+- name: Update accelerated networking (check mode)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ enable_accelerated_networking: True
+ create_with_security_group: False
+ public_ip: False
+ register: output
+ check_mode: yes
+
+- assert:
+ that:
+ - output.changed
+
+- name: Update IP forwarding networking (check mode)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ create_with_security_group: False
+ enable_ip_forwarding: True
+ public_ip: False
+ register: output
+ check_mode: yes
+
+- assert:
+ that:
+ - output.changed
+
+- name: Update dns server (check mode)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ create_with_security_group: False
+ public_ip: False
+ dns_servers:
+ - 8.9.10.11
+ - 7.8.9.10
+ register: output
+ check_mode: yes
+
+- assert:
+ that:
+ - output.changed
+
+- name: Update NIC
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ enable_accelerated_networking: True
+ enable_ip_forwarding: True
+ security_group: "tn{{ rpfx }}sg"
+ dns_servers:
+ - 8.9.10.11
+ - 7.8.9.10
+ ip_configurations:
+ - name: "{{ facts.networkinterfaces[0].ip_configurations[0].name }}"
+ private_ip_address: "{{ facts.networkinterfaces[0].ip_configurations[0].private_ip_address }}"
+ private_ip_allocation_method: "{{ facts.networkinterfaces[0].ip_configurations[0].private_ip_allocation_method }}"
+ primary: "{{ facts.networkinterfaces[0].ip_configurations[0].primary }}"
+ - name: ipconfig1
+ public_ip_name: "tn{{ rpfx }}"
+ load_balancer_backend_address_pools:
+ - "{{ lb.state.backend_address_pools[0].id }}"
+ - name: backendaddrpool1
+ load_balancer: "lb{{ rpfx }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.state.dns_settings.dns_servers == ['8.9.10.11', '7.8.9.10']
+ - output.state.enable_ip_forwarding
+ - output.state.network_security_group.name == "tn{{ rpfx }}sg"
+ - output.state.enable_accelerated_networking
+
+- name: Complicated NIC (idempontent)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ enable_accelerated_networking: True
+ security_group: "tn{{ rpfx }}sg"
+ enable_ip_forwarding: True
+ dns_servers:
+ - 8.9.10.11
+ - 7.8.9.10
+ ip_configurations:
+ - name: "{{ facts.networkinterfaces[0].ip_configurations[0].name }}"
+ private_ip_address: "{{ facts.networkinterfaces[0].ip_configurations[0].private_ip_address }}"
+ private_ip_allocation_method: "{{ facts.networkinterfaces[0].ip_configurations[0].private_ip_allocation_method }}"
+ primary: "{{ facts.networkinterfaces[0].ip_configurations[0].primary }}"
+ - name: ipconfig1
+ public_ip_name: "tn{{ rpfx }}"
+ load_balancer_backend_address_pools:
+ - "{{ lb.state.backend_address_pools[0].id }}"
+ - name: backendaddrpool1
+ load_balancer: "lb{{ rpfx }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Get fact of the new created NIC
+ azure_rm_networkinterface_info:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ register: facts
+
+- assert:
+ that:
+ - "facts.networkinterfaces | length == 1"
+ - facts.networkinterfaces[0].id == output.state.id
+ - "facts.networkinterfaces[0].ip_configurations | length == 2"
+ - 'facts.networkinterfaces[0].security_group.endswith("tn{{ rpfx }}sg")'
+ - facts.networkinterfaces[0].enable_accelerated_networking
+ - facts.networkinterfaces[0].enable_ip_forwarding
+ - facts.networkinterfaces[0].ip_configurations[0].primary == True
+ - facts.networkinterfaces[0].ip_configurations[1].primary == False
+
+- name: Remove one dns server and ip configuration
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ security_group: "tn{{ rpfx }}sg"
+ enable_accelerated_networking: True
+ enable_ip_forwarding: True
+ dns_servers:
+ - 8.9.10.11
+ ip_configurations:
+ - name: ipconfig1
+ public_ip_name: "tn{{ rpfx }}"
+ primary: True
+ load_balancer_backend_address_pools:
+ - "{{ lb.state.backend_address_pools[0].id }}"
+ - name: backendaddrpool1
+ load_balancer: "lb{{ rpfx }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.state.dns_settings.dns_servers == ['8.9.10.11']
+ - output.state.enable_ip_forwarding
+ - output.state.network_security_group.name == "tn{{ rpfx }}sg"
+ - "output.state.ip_configurations | length == 1"
+ - output.state.ip_configurations[0].public_ip_address.name == "tn{{ rpfx }}"
+ - output.state.enable_accelerated_networking
+
+- name: Create application security group(check mode)
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ applicationsecuritygroup_name1 }}"
+ tags:
+ testing: testing
+ check_mode: yes
+ register: output
+
+- name: Assert check mode creation
+ assert:
+ that:
+ - output.changed
+
+- name: Create Application security group
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ applicationsecuritygroup_name1 }}"
+ tags:
+ testing: testing
+ register: output
+
+- name: Assert application security group creation
+ assert:
+ that:
+ - output.changed
+ - output.id != ''
+
+- name: Get Application security group
+ azure_rm_applicationsecuritygroup_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ applicationsecuritygroup_name1 }}"
+ register: facts
+
+- name: Assert facts
+ assert:
+ that:
+ - facts['applicationsecuritygroups'] | length == 1
+ - facts['applicationsecuritygroups'][0]['name'] != None
+ - facts['applicationsecuritygroups'][0]['location'] != None
+ - facts['applicationsecuritygroups'][0]['provisioning_state'] != None
+
+- name: Create application security group (idempotent)
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ applicationsecuritygroup_name1 }}"
+ tags:
+ testing: testing
+ register: output
+
+- name: Assert idempotent
+ assert:
+ that:
+ - not output.changed
+
+- name: Update application security group
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ applicationsecuritygroup_name1 }}"
+ tags:
+ testing: testing
+ foo: bar
+ register: output
+
+- name: Assert update
+ assert:
+ that:
+ - output.changed
+
+- name: Create Application security group in secondary resource group
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ applicationsecuritygroup_name2 }}"
+ register: asg
+
+- name: Create Nic with application security groups
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "{{ nic_name1 }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ create_with_security_group: True
+ public_ip: False
+ ip_configurations:
+ - name: ipconfig1
+ application_security_groups:
+ - "{{ applicationsecuritygroup_name1 }}"
+ - "{{ asg.id }}"
+ primary: True
+ register: output
+
+- name: assert creation succeeded
+ assert:
+ that:
+ - output.changed
+
+- name: Create Nic with application security groups (idempotent)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "{{ nic_name1 }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ create_with_security_group: True
+ public_ip: False
+ ip_configurations:
+ - name: ipconfig1
+ application_security_groups:
+ - "{{ asg.id }}"
+ - "{{ applicationsecuritygroup_name1 }}"
+ primary: True
+ register: output
+
+- name: assert idempotent
+ assert:
+ that:
+ - not output.changed
+
+- name: Update Nic with application security groups
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "{{ nic_name1 }}"
+ virtual_network: "{{ vn.state.id }}"
+ subnet: "tn{{ rpfx }}"
+ create_with_security_group: True
+ public_ip: False
+ ip_configurations:
+ - name: ipconfig1
+ application_security_groups:
+ - "{{ applicationsecuritygroup_name1 }}"
+ primary: True
+ register: output
+
+- name: assert update succeeded
+ assert:
+ that:
+ - output.changed
+
+- name: Get fact of the new created NIC
+ azure_rm_networkinterface_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ nic_name1 }}"
+ register: facts
+
+- assert:
+ that:
+ - "facts.networkinterfaces[0].ip_configurations[0].application_security_groups | length == 1"
+
+- name: Delete the NIC (check mode)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ state: absent
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Delete the NIC
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Delete the NIC (idempotent)
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "tn{{ rpfx }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: delete load balancer
+ azure_rm_loadbalancer:
+ resource_group: '{{ resource_group }}'
+ name: "lb{{ rpfx }}"
+ state: absent
+
+- name: delete public ip
+ azure_rm_publicipaddress:
+ name: "pip{{ rpfx }}"
+ resource_group: '{{ resource_group }}'
+ state: absent
+
+- name: Delete the NIC
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "{{ nic_name1 }}"
+ state: absent
+
+- name: Delete the application security group (check mode)
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ applicationsecuritygroup_name1 }}"
+ state: absent
+ check_mode: yes
+ register: output
+
+- name: Assert delete check mode
+ assert:
+ that:
+ - output.changed
+
+- name: Delete the application security group
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ applicationsecuritygroup_name1 }}"
+ state: absent
+ register: output
+
+- name: Assert the deletion
+ assert:
+ that:
+ - output.changed
+
+- name: Delete second application security group
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ applicationsecuritygroup_name2 }}"
+ state: absent
+ register: output
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/aliases
new file mode 100644
index 00000000..9eb40885
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group5
+destructive
+disabled
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/tasks/main.yml
new file mode 100644
index 00000000..426e7e68
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_openshiftmanagedcluster/tasks/main.yml
@@ -0,0 +1,69 @@
+ - set_fact:
+ cluster_name: "{{ resource_group | hash('md5') | truncate(8, True, '') }}"
+
+ - name: get resource group info
+ azure_rm_resourcegroup_info:
+ name: "{{ resource_group_secondary }}"
+ register: rg_output
+
+ - name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group_secondary }}"
+ name: testVnet
+ address_prefixes_cidr:
+ - 10.151.0.0/16
+ - 10.152.0.0/16
+
+ - name: create master subnet
+ azure_rm_subnet:
+ name: master_foobar
+ virtual_network_name: testVnet
+ resource_group: "{{ resource_group_secondary }}"
+ address_prefix_cidr: 10.151.0.0/24
+ register: master_sub_output
+
+ - name: create work subnet
+ azure_rm_subnet:
+ name: worker_foobar
+ virtual_network_name: testVnet
+ resource_group: "{{ resource_group_secondary }}"
+ address_prefix_cidr: 10.152.0.0/24
+ register: worker_sub_output
+
+ - name: Create openshift cluster
+ azure_rm_openshiftmanagedcluster:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cluster_name }}"
+ location: "eastus"
+ cluster_profile:
+ cluster_resource_group_id: "{{ rg_output.resourcegroups[0].id }}"
+ domain: "{{ cluster_name }}"
+ service_principal_profile:
+ client_id: "{{ azure_client_id }}"
+ client_secret: "{{ azure_secret }}"
+ network_profile:
+ pod_cidr: "10.128.0.0/14"
+ service_cidr: "172.30.0.0/16"
+ worker_profiles:
+ - vm_size: "Standard_D4s_v3"
+ subnet_id: "{{ worker_sub_output.state.id }}"
+ disk_size: 128
+ count: 3
+ master_profile:
+ vm_size: "Standard_D8s_v3"
+ subnet_id: "{{ master_sub_output.state.id }}"
+ register: output
+
+ - assert:
+ that: output.changed
+
+ - name: Delete openshift cluster
+ azure_rm_openshiftmanagedcluster:
+ resource_group: "{{ resource_group }}"
+ name: "{{ cluster_name }}"
+ location: "eastus"
+ state: absent
+ register: output
+
+ - assert:
+ that: output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/aliases
new file mode 100644
index 00000000..f982afc3
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/aliases
@@ -0,0 +1,11 @@
+cloud/azure
+destructive
+unsupported
+shippable/azure/group11
+azure_rm_postgresqlserver_facts
+azure_rm_postgresqldatabase
+azure_rm_postgresqldatabase_facts
+azure_rm_postgresqlfirewallrule
+azure_rm_postgresqlfirewallrule_facts
+azure_rm_postgresqlserverconfiguration
+azure_rm_postgresqlserverconfiguration_facts
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/tasks/main.yml
new file mode 100644
index 00000000..e441d2e8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_postgresqlserver/tasks/main.yml
@@ -0,0 +1,612 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create instance of PostgreSQL Server -- check mode
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of PostgreSQL Server
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.state == 'Ready'
+
+- name: Create again instance of PostgreSQL Server
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.state == 'Ready'
+
+- name: Update instance of PostgreSQL Server, change storage size
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 128000
+ enforce_ssl: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed
+ - output.state == 'Ready'
+- debug:
+ var: output
+
+- name: Gather facts postgresql Server
+ azure_rm_postgresqlserver_info:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}
+ register: output
+- name: Assert that storage size is correct
+ assert:
+ that:
+ - output.servers[0]['storage_mb'] == 128000
+
+- name: Create second instance of PostgreSQL Server
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}second
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ enforce_ssl: True
+ storage_autogrow: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ tags:
+ aaa: bbb
+
+- name: Create second instance of PostgreSQL Server -- add tags
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}second
+ sku:
+ name: B_Gen5_1
+ tier: Basic
+ location: westus2
+ storage_mb: 51200
+ enforce_ssl: True
+ storage_autogrow: True
+ admin_username: zimxyz
+ admin_password: Password123!
+ tags:
+ ccc: ddd
+
+- name: Gather facts PostgreSQL Server
+ azure_rm_postgresqlserver_info:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}second
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers[0]['id'] != None
+ - output.servers[0]['name'] != None
+ - output.servers[0]['location'] != None
+ - output.servers[0]['sku']['name'] != None
+ - output.servers[0]['sku']['tier'] != None
+ - output.servers[0]['sku']['capacity'] != None
+ - output.servers[0]['version'] != None
+ - output.servers[0]['user_visible_state'] != None
+ - output.servers[0]['fully_qualified_domain_name'] != None
+ - output.servers[0]['tags']['aaa'] == 'bbb'
+ - output.servers[0]['tags']['ccc'] == 'ddd'
+
+- name: Gather facts PostgreSQL Server
+ azure_rm_postgresqlserver_info:
+ resource_group: "{{ resource_group }}"
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers[0]['id'] != None
+ - output.servers[0]['name'] != None
+ - output.servers[0]['location'] != None
+ - output.servers[0]['sku']['name'] != None
+ - output.servers[0]['sku']['tier'] != None
+ - output.servers[0]['sku']['capacity'] != None
+ - output.servers[0]['version'] != None
+ - output.servers[0]['user_visible_state'] != None
+ - output.servers[0]['fully_qualified_domain_name'] != None
+ - output.servers[1]['id'] != None
+ - output.servers[1]['name'] != None
+ - output.servers[1]['location'] != None
+ - output.servers[1]['sku']['name'] != None
+ - output.servers[1]['sku']['tier'] != None
+ - output.servers[1]['sku']['capacity'] != None
+ - output.servers[1]['version'] != None
+ - output.servers[1]['user_visible_state'] != None
+ - output.servers[1]['fully_qualified_domain_name'] != None
+
+#
+# azure_rm_postgresqldatabase tests below
+#
+- name: Create instance of PostgreSQL Database -- check mode
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ charset: UTF8
+ collation: English_United States.1252
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of PostgreSQL Database
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ charset: UTF8
+ collation: English_United States.1252
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.name == 'testdatabase'
+
+- name: Create again instance of PostgreSQL Database
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ charset: UTF8
+ collation: English_United States.1252
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.name == 'testdatabase'
+
+- name: Try to update PostgreSQL Database without force_update
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ charset: WIN1252
+ collation: SQL_Latin1_General_CP1_CS_AS
+ ignore_errors: yes
+ register: output
+- name: Assert that nothing has changed
+ assert:
+ that:
+ - output.changed == False
+
+- name: Try to update PostgreSQL Database with force_update
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ charset: WIN1252
+ collation: SQL_Latin1_General_CP1_CS_AS
+ force_update: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+ - output.name == 'testdatabase'
+
+- name: Create second instance of PostgreSQL Database
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase2
+
+- name: Gather facts PostgreSQL Database
+ azure_rm_postgresqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0]['server_name'] != None
+ - output.databases[0]['name'] != None
+ - output.databases[0]['charset'] != None
+ - output.databases[0]['collation'] != None
+
+- name: Gather facts PostgreSQL Database
+ azure_rm_postgresqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0]['server_name'] != None
+ - output.databases[0]['name'] != None
+ - output.databases[0]['charset'] != None
+ - output.databases[0]['collation'] != None
+ - output.databases[1]['server_name'] != None
+ - output.databases[1]['name'] != None
+ - output.databases[1]['charset'] != None
+ - output.databases[1]['collation'] != None
+
+- name: Delete instance of PostgreSQL Database -- check mode
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of PostgreSQL Database
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of PostgreSQL Database
+ azure_rm_postgresqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: testdatabase
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+#
+# azure_rm_postgresqlfirewallrule
+#
+
+- name: Create instance of Firewall Rule -- check mode
+ azure_rm_postgresqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Firewall Rule
+ azure_rm_postgresqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create again instance of Firewall Rule
+ azure_rm_postgresqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Create Firewall Rule - second
+ azure_rm_postgresqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}second
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+
+- name: Gather facts PostgreSQL Firewall Rule
+ azure_rm_postgresqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules[0].id != None
+ - output.rules[0].server_name != None
+ - output.rules[0].name != None
+ - output.rules[0].start_ip_address != None
+ - output.rules[0].end_ip_address != None
+ - "output.rules | length == 1"
+
+- name: Gather facts PostgreSQL Firewall Rule
+ azure_rm_postgresqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules[0].id != None
+ - output.rules[0].server_name != None
+ - output.rules[0].name != None
+ - output.rules[0].start_ip_address != None
+ - output.rules[0].end_ip_address != None
+ - output.rules[1].id != None
+ - output.rules[1].name != None
+ - output.rules[1].start_ip_address != None
+ - output.rules[1].end_ip_address != None
+ - "output.rules | length == 2"
+
+- name: Delete instance of Firewall Rule -- check mode
+ azure_rm_postgresqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of Firewall Rule
+ azure_rm_postgresqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of Firewall Rule
+ azure_rm_postgresqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Delete instance of Firewall Rule - second
+ azure_rm_postgresqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}second
+ state: absent
+
+- name: Gather facts PostgreSQL Firewall Rule
+ azure_rm_postgresqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: firewallrule{{ rpfx }}
+ register: output
+- name: Assert that empty list was returned
+ assert:
+ that:
+ - output.changed == False
+ - "output.rules | length == 0"
+
+#
+# azure_rm_postgresql_configuration
+#
+- name: Create instance of Configuration -- check mode
+ azure_rm_postgresqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: deadlock_timeout
+ value: 2000
+ check_mode: yes
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to change default configuration
+ azure_rm_postgresqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: deadlock_timeout
+ value: 2000
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to change default configuration -- idempotent
+ azure_rm_postgresqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: deadlock_timeout
+ value: 2000
+ register: output
+- name: Assert that change was not registered
+ assert:
+ that:
+ - not output.changed
+
+- name: Try to reset configuration
+ azure_rm_postgresqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: deadlock_timeout
+ state: absent
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - output.changed
+
+- name: Try to reset configuration -- idempotent
+ azure_rm_postgresqlconfiguration:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: deadlock_timeout
+ state: absent
+ register: output
+- name: Assert that change was registered
+ assert:
+ that:
+ - not output.changed
+
+- name: Gather facts PostgreSQL Configuration
+ azure_rm_postgresqlconfiguration_info:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ name: deadlock_timeout
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.settings[0].id != None
+ - output.settings[0].name != None
+ - output.settings[0].value != None
+ - output.settings[0].description != None
+ - output.settings[0].source != None
+ - output.settings | length == 1
+
+- name: Gather facts PostgreSQL Configuration
+ azure_rm_postgresqlconfiguration_info:
+ resource_group: "{{ resource_group }}"
+ server_name: postgresqlsrv{{ rpfx }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.settings[0].id != None
+ - output.settings[0].name != None
+ - output.settings[0].value != None
+ - output.settings[0].description != None
+ - output.settings[0].source != None
+ - output.settings | length > 1
+
+#
+# azure_rm_postgresqlserver continuation / clean up
+#
+
+- name: Delete instance of PostgreSQL Server -- check mode
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of PostgreSQL Server
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of PostgreSQL Server
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+- name: Delete second instance of PostgreSQL Server
+ azure_rm_postgresqlserver:
+ resource_group: "{{ resource_group }}"
+ name: postgresqlsrv{{ rpfx }}second
+ state: absent
+ async: 400
+ poll: 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/aliases
new file mode 100644
index 00000000..8f7a9a2e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group1
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/tasks/main.yml
new file mode 100644
index 00000000..3df8cb62
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednsrecordset/tasks/main.yml
@@ -0,0 +1,237 @@
+- name: Create random domain name
+ set_fact:
+ domain_name: "{{ resource_group | hash('md5') | truncate(16, True, '') + (65535 | random | string) }}"
+
+- name: Create a Private DNS zone
+ azure_rm_privatednszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ state: present
+ register: results
+
+- name: Assert that Private DNS zone was created
+ assert:
+ that: results.changed
+
+- name: create "A" record set with multiple records
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that A record set was created
+ assert:
+ that: results.changed
+
+- name: re-run "A" record with same values
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that A record set was not changed
+ assert:
+ that: not results.changed
+
+- name: Update "A" record set with additional record
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ record_mode: append
+ records:
+ - entry: 192.168.100.104
+ register: results
+
+- name: Assert that new record was appended
+ assert:
+ that:
+ - results.changed
+
+- name: re-update "A" record set with additional record
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ record_mode: append
+ records:
+ - entry: 192.168.100.104
+ register: results
+
+- name: Assert that A record set was not changed
+ assert:
+ that:
+ - not results.changed
+
+- name: Remove 1 record from record set
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.101
+ - entry: 192.168.100.102
+ - entry: 192.168.100.103
+ register: results
+
+- name: Assert that record was deleted
+ assert:
+ that:
+ - results.changed
+
+- name: Check_mode test
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ records:
+ - entry: 192.168.100.105
+ check_mode: yes
+ register: results
+
+- name: Assert that check_mode returns new state
+ assert:
+ that:
+ - results.changed
+
+- name: Get information for A DNS recordset from Private DNS zone
+ azure_rm_privatednsrecordset_info:
+ resource_group: "{{ resource_group }}"
+ zone_name: "{{ domain_name }}.com"
+ relative_name: www
+ record_type: A
+ register: results
+
+- assert:
+ that:
+ - not results.changed
+ - results.dnsrecordsets[0].id != None
+ - results.dnsrecordsets[0].fqdn != None
+ - results.dnsrecordsets[0].record_type == 'A'
+ - results.dnsrecordsets[0].time_to_live != None
+ - results.dnsrecordsets[0].relative_name == 'www'
+ - results.dnsrecordsets[0].records | length > 0
+
+- name: delete a record set
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ state: absent
+ register: results
+
+- name: Assert that record set deleted
+ assert:
+ that: results.changed
+
+- name: (idempotence test) re-run record set absent
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: www
+ zone_name: "{{ domain_name }}.com"
+ record_type: A
+ state: absent
+ register: results
+
+- name:
+ assert:
+ that: not results.changed
+
+- name: create SRV records in a new record set
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: "_sip._tcp.{{ domain_name }}.com"
+ zone_name: "{{ domain_name }}.com"
+ time_to_live: 7200
+ record_type: SRV
+ state: present
+ records:
+ - entry: sip.{{ domain_name }}.com
+ priority: 20
+ weight: 10
+ port: 5060
+ register: results
+
+- name: Assert that SRV record set was created
+ assert:
+ that:
+ - results.changed
+
+- name: Get information for SRV DNS recordset from Private DNS zone
+ azure_rm_privatednsrecordset_info:
+ resource_group: "{{ resource_group }}"
+ zone_name: "{{ domain_name }}.com"
+ relative_name: "_sip._tcp.{{ domain_name }}.com"
+ record_type: SRV
+ register: results
+
+- assert:
+ that:
+ - not results.changed
+ - results.dnsrecordsets[0].id != None
+ - results.dnsrecordsets[0].fqdn != None
+ - results.dnsrecordsets[0].record_type == 'SRV'
+ - results.dnsrecordsets[0].time_to_live == 7200
+ - results.dnsrecordsets[0].relative_name == "_sip._tcp.{{ domain_name }}.com"
+ - results.dnsrecordsets[0].records | length > 0
+
+- name: create TXT records in a new record set
+ azure_rm_privatednsrecordset:
+ resource_group: "{{ resource_group }}"
+ relative_name: "_txt.{{ domain_name }}.com"
+ zone_name: "{{ domain_name }}.com"
+ record_type: TXT
+ state: present
+ records:
+ - entry: "v=spf1 a -all"
+ - entry: "foo"
+ - entry:
+ - "bar"
+ - "baz"
+ register: results
+
+- name: Assert that TXT record set was created
+ assert:
+ that:
+ - results.changed
+
+- name: Get information for TXT DNS recordset from Private DNS zone
+ azure_rm_privatednsrecordset_info:
+ resource_group: "{{ resource_group }}"
+ zone_name: "{{ domain_name }}.com"
+ relative_name: "_txt.{{ domain_name }}.com"
+ record_type: TXT
+ register: results
+
+- assert:
+ that:
+ - not results.changed
+ - results.dnsrecordsets[0].id != None
+ - results.dnsrecordsets[0].fqdn != None
+ - results.dnsrecordsets[0].record_type == 'TXT'
+ - results.dnsrecordsets[0].time_to_live == 3600
+ - results.dnsrecordsets[0].relative_name == "_txt.{{ domain_name }}.com"
+ - results.dnsrecordsets[0].records | length > 0
+
+- name: Delete DNS zone
+ azure_rm_privatednszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/aliases
new file mode 100644
index 00000000..90d5921a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group2
+destructive
+azure_rm_privatednszone_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/tasks/main.yml
new file mode 100644
index 00000000..eba80899
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_privatednszone/tasks/main.yml
@@ -0,0 +1,77 @@
+- name: Create random domain name
+ set_fact:
+ domain_name: "{{ resource_group | hash('md5') | truncate(16, True, '') + (65535 | random | string) }}"
+
+- name: Create a private DNS zone (check mode)
+ azure_rm_privatednszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ register: results
+ check_mode: true
+
+- assert:
+ that: results.changed
+
+- name: Create a private DNS zone
+ azure_rm_privatednszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ register: results
+
+- assert:
+ that: results.changed
+
+- name: Update private DNS zone with tags
+ azure_rm_privatednszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ tags:
+ test: modified
+ register: results
+
+- assert:
+ that:
+ - results.changed
+ - results.state.tags.test == 'modified'
+
+- name: Test idempotent
+ azure_rm_privatednszone:
+ name: "{{ domain_name }}.com"
+ resource_group: "{{ resource_group }}"
+ register: results
+
+- assert:
+ that:
+ - not results.changed
+
+- name: Retrieve DNS Zone Facts
+ azure_rm_privatednszone_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ register: zones
+
+- name: Assert that facts module returned result
+ assert:
+ that:
+ - zones.privatednszones[0].tags.test == 'modified'
+ - zones.privatednszones[0].number_of_record_sets == 1
+
+#
+# azure_rm_privatednszone cleanup
+#
+
+- name: Delete private DNS zone
+ azure_rm_privatednszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ state: absent
+
+- name: Delete private DNS zone (idempotent)
+ azure_rm_privatednszone:
+ resource_group: "{{ resource_group }}"
+ name: "{{ domain_name }}.com"
+ state: absent
+ register: results
+
+- assert:
+ that: not results.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/aliases
new file mode 100644
index 00000000..c8f442a8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group2
+destructive
+azure_rm_publicipaddress_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/tasks/main.yml
new file mode 100644
index 00000000..2db2753a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_publicipaddress/tasks/main.yml
@@ -0,0 +1,136 @@
+- name: Create domain name
+ set_fact:
+ domain_name: "ansible-{{ resource_group | hash('md5') | truncate(24, True, '') }}"
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+
+- name: Remove public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}"
+ state: absent
+
+- name: Create public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}"
+ allocation_method: Static
+ domain_name: "{{ domain_name }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ register: output
+
+- assert:
+ that:
+ - output.state.public_ip_allocation_method == 'static'
+ - output.state.dns_settings.domain_name_label == domain_name
+ - output.state.tags | length == 2
+ - output.state.tags.testing == 'testing'
+
+- name: Create public ip with IPV6
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}-02"
+ allocation_method: Static
+ domain_name: "{{ domain_name }}-02"
+ version: 'ipv6'
+ sku: 'Standard'
+ register: output
+
+- assert:
+ that:
+ - output.state.public_ip_address_version == 'ipv6'
+
+- name: Should be idempotent
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}"
+ allocation_method: static
+ domain_name: "{{ domain_name }}"
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Update tags
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}"
+ allocation_method: static
+ domain_name: "{{ domain_name }}"
+ append_tags: yes
+ tags:
+ delete: never
+ foo: bar
+ register: output
+
+- assert:
+ that:
+ - output.state.tags | length == 3
+ - output.state.tags.delete == 'never'
+
+- name: Gather facts, filtering by tag
+ azure_rm_publicipaddress_info:
+ resource_group: "{{ resource_group }}"
+ tags:
+ - testing
+ - foo:bar
+ register: infos
+
+- assert:
+ that: infos.publicipaddresses | length == 1
+
+- name: Purge all tags
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}"
+ allocation_method: static
+ domain_name: "{{ domain_name }}"
+ append_tags: no
+ register: output
+
+- assert:
+ that:
+ - output.state.tags | length == 0
+
+- name: Gather facts for a public ip
+ azure_rm_publicipaddress_info:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}"
+ register: pip
+
+- assert:
+ that:
+ - "pip.publicipaddresses | length == 1"
+ - pip.publicipaddresses[0].name == "pip{{ rpfx }}"
+ - pip.publicipaddresses[0].allocation_method == 'static'
+ - pip.publicipaddresses[0].dns_settings.domain_name_label == domain_name
+
+- name: Gather facts for all public ips
+ azure_rm_publicipaddress_info:
+ resource_group: "{{ resource_group }}"
+ register: infos
+
+- assert:
+ that: infos.publicipaddresses | length > 0
+
+- name: Remove IPV6 public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}-02"
+ state: absent
+
+- name: Remove public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}"
+ state: absent
+
+- name: Gather facts for a public ip
+ azure_rm_publicipaddress_info:
+ resource_group: "{{ resource_group }}"
+ name: "pip{{ rpfx }}"
+ register: infos
+
+- assert:
+ that: infos.publicipaddresses | length == 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/aliases
new file mode 100644
index 00000000..cc941b59
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group12
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/tasks/main.yml
new file mode 100644
index 00000000..fc92da93
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_recoveryservicesvault/tasks/main.yml
@@ -0,0 +1,55 @@
+- name: Fix resource prefix
+ set_fact:
+ name: "revault{{ resource_group | hash('md5') | truncate(22, True, '') }}"
+ location: "eastus"
+
+- name: Create Azure Recovery Service vault
+ azure_rm_recoveryservicesvault:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ location: "{{ location }}"
+ state: "present"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Create Azure Recovery Service vault (idempotent)
+ azure_rm_recoveryservicesvault:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ location: "{{ location }}"
+ state: "present"
+ register: output
+
+- name: Assert that output has no changed
+ assert:
+ that:
+ - not output.changed
+
+- name: Get Azure Recovery Service Vault Details
+ azure_rm_recoveryservicesvault_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.response.id != None
+ - output.response.name != None
+
+- name: Delete Azure Recovery Service vault
+ azure_rm_recoveryservicesvault:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ location: "{{ location }}"
+ state: "absent"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/aliases
new file mode 100644
index 00000000..733b3785
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/aliases
@@ -0,0 +1,6 @@
+cloud/azure
+shippable/azure/group2
+unsupported
+destructive
+azure_rm_rediscache_facts
+azure_rm_rediscachefirewallrule
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/tasks/main.yml
new file mode 100644
index 00000000..ef0b89f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_rediscache/tasks/main.yml
@@ -0,0 +1,317 @@
+- name: Fix resource prefix
+ set_fact:
+ redis_name: "redis-{{ resource_group | hash('md5') | truncate(7, True, '') }}-{{ 1000 | random }}"
+ vnet_name: "vnet-{{ resource_group | hash('md5') | truncate(7, True, '') }}-{{ 1000 | random }}"
+ subnet_name: "subnet-{{ resource_group | hash('md5') | truncate(7, True, '') }}-{{ 1000 | random }}"
+ rule_name: "rule1"
+ run_once: yes
+
+- name: Create a redis cache (Check Mode)
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ sku:
+ name: basic
+ size: C1
+ wait_for_provisioning: False
+ check_mode: yes
+ register: output
+
+- name: Assert creating redis cache check mode
+ assert:
+ that:
+ - output.changed
+
+- name: Create a redis cache
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ sku:
+ name: basic
+ size: C1
+ wait_for_provisioning: False
+ register: output
+
+- name: Assert creating redis cache
+ assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: Get facts
+ azure_rm_rediscache_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ register: facts
+
+- name: Assert facts
+ assert:
+ that:
+ - facts.rediscaches | length == 1
+ - facts.rediscaches[0].id != None
+ - facts.rediscaches[0].host_name != None
+ - facts.rediscaches[0].provisioning_state != None
+ - facts.rediscaches[0].sku.name == 'basic'
+ - facts.rediscaches[0].sku.size == 'C1'
+
+- name: Update the redis cache (idempotent)
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ sku:
+ name: basic
+ size: C1
+ wait_for_provisioning: False
+ register: output
+
+- name: assert output not changed
+ assert:
+ that:
+ - not output.changed
+
+- name: long-running rediscache tests [run with `--tags long_run,untagged` to enable]
+ # creating redis Cache costs about 20 mins async operation,
+ # need to poll status from Creating to Running, then able to perform updating/deleting operation,
+ # otherwise, will met error:
+ # "The resource '<resource_id>' is busy processing a previous update request or is undergoing system maintenance.
+ # As such, it is currently unable to accept the update request. Please try again later."
+ block:
+ - name: Wait for Redis provisioning to complete
+ azure_rm_rediscache_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ register: facts
+ until: facts.rediscaches[0]['provisioning_state'] == 'Succeeded'
+ retries: 30
+ delay: 60
+
+ - name: (actually) update redis cache
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ sku:
+ name: basic
+ size: C1
+ enable_non_ssl_port: true
+ tags:
+ testing: foo
+ wait_for_provisioning: True
+ register: output
+
+ - name: assert output changed
+ assert:
+ that:
+ - output.changed
+
+ - name: Update redis cache configuration
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ sku:
+ name: basic
+ size: C1
+ enable_non_ssl_port: True
+ maxmemory_policy: allkeys_lru
+ tags:
+ testing: foo
+ register: output
+
+ - name: assert output changed
+ assert:
+ that:
+ - output.changed
+
+ - name: Scale up the redis cache
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ sku:
+ name: standard
+ size: C1
+ tags:
+ testing: foo
+ wait_for_provisioning: True
+ register: output
+
+ - assert:
+ that:
+ - output.changed
+
+ - name: Force reboot redis cache
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ reboot:
+ reboot_type: all
+ register: output
+
+ - assert:
+ that:
+ - output.changed
+
+ - name: Delete the redis cache (Check Mode)
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ state: absent
+ check_mode: yes
+ register: output
+
+ - name: assert deleting redis cache check mode
+ assert:
+ that: output.changed
+
+ - name: Delete the redis cache
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}"
+ state: absent
+ register: output
+
+ - assert:
+ that:
+ - output.changed
+ tags: [long_run, never]
+
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vnet_name }}"
+ address_prefixes: "10.10.0.0/16"
+
+- name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: "{{ subnet_name }}"
+ address_prefix: "10.10.0.0/24"
+ virtual_network: "{{ vnet_name }}"
+
+- name: Create redis with subnet
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}2"
+ sku:
+ name: premium
+ size: P1
+ subnet:
+ name: "{{ subnet_name }}"
+ virtual_network_name: "{{ vnet_name }}"
+ wait_for_provisioning: False
+ register: output
+
+- name: Assert creating redis cache
+ assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: Get facts
+ azure_rm_rediscache_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}2"
+ return_access_keys: True
+ register: facts
+
+- name: Assert facts
+ assert:
+ that:
+ - facts.rediscaches | length == 1
+ - facts.rediscaches[0].subnet != None
+ - facts.rediscaches[0].access_keys.primary != None
+
+- name: Create firewall rule (Check mode)
+ azure_rm_rediscachefirewallrule:
+ resource_group: "{{ resource_group }}"
+ cache_name: "{{ redis_name }}2"
+ name: "{{ rule_name }}"
+ start_ip_address: 192.168.1.1
+ end_ip_address: 192.168.1.4
+ check_mode: yes
+ register: output
+
+- name: Assert check mode creation
+ assert:
+ that:
+ - output.changed
+
+
+- name: long-running rediscachefirewallrule tests [run with `--tags long_run,untagged` to enable]
+# Creating firewall rule need Redis status is running, while creating redis Cache costs about 20 mins async operation,
+# need to poll status from Creating to Running, then able to perform firewall rule creating,
+# otherwise, will met error:
+# "Error creating/updating Firewall rule of Azure Cache for Redis: Azure Error: Conflict\nMessage: The resource
+# '/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/myRedis' is busy processing
+# a previous update request or is undergoing system maintenance. As such, it is currently unable to accept the update request. Please try again later."
+ block:
+ - name: Wait for Redis provisioning to complete
+ azure_rm_rediscache_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}2"
+ register: facts
+ until: facts.rediscaches[0]['provisioning_state'] == 'Succeeded'
+ retries: 30
+ delay: 60
+
+ - name: Create firewall rule
+ azure_rm_rediscachefirewallrule:
+ resource_group: "{{ resource_group }}"
+ cache_name: "{{ redis_name }}2"
+ name: "{{ rule_name }}"
+ start_ip_address: 192.168.1.1
+ end_ip_address: 192.168.1.4
+ register: output
+
+ - name: Assert creation
+ assert:
+ that:
+ - output.changed
+ - output.id
+
+ - name: Update firewall rule idempotence
+ azure_rm_rediscachefirewallrule:
+ resource_group: "{{ resource_group }}"
+ cache_name: "{{ redis_name }}2"
+ name: "{{ rule_name }}"
+ start_ip_address: 192.168.1.1
+ end_ip_address: 192.168.1.4
+ register: output
+
+ - name: Assert idempotence
+ assert:
+ that:
+ - output.changed == False
+
+ - name: Update firewall rule
+ azure_rm_rediscachefirewallrule:
+ resource_group: "{{ resource_group }}"
+ cache_name: "{{ redis_name }}2"
+ name: "{{ rule_name }}"
+ end_ip_address: 192.168.1.5
+ register: output
+
+ - name: Assert updating
+ assert:
+ that:
+ - output.changed
+
+ - name: Delete firewall rule
+ azure_rm_rediscachefirewallrule:
+ resource_group: "{{ resource_group }}"
+ cache_name: "{{ redis_name }}2"
+ name: "{{ rule_name }}"
+ state: absent
+ register: output
+
+ - name: Assert deletion
+ assert:
+ that:
+ - output.changed
+
+ - name: Delete the redis cache
+ azure_rm_rediscache:
+ resource_group: "{{ resource_group }}"
+ name: "{{ redis_name }}2"
+ state: absent
+ register: output
+ tags: [long_run, never] \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/aliases
new file mode 100644
index 00000000..759eafa2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group3
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/tasks/main.yml
new file mode 100644
index 00000000..05552470
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationassignment/tasks/main.yml
@@ -0,0 +1,78 @@
+- name: set facts
+ set_fact:
+ subscription_id: "{{ azure_subscription_id }}"
+ managed_by_tenant_id: "{{ azure_managed_by_tenant_id }}"
+ principal_id: "{{ azure_principal_id }}"
+ role_definition_id: "{{ azure_role_definition_id }}"
+ run_once: yes
+
+- name: Create a RegistrationDefinition
+ azure_rm_registrationdefinition:
+ properties:
+ description: first_test
+ authorizations:
+ - principal_id: "{{ principal_id }}"
+ role_definition_id: "{{ role_definition_id }}"
+ managed_by_tenant_id: "{{ managed_by_tenant_id }}"
+ registration_definition_name: test_def
+ register: output1
+
+- name: Create a RegistrationAssignment ---check mode
+ azure_rm_registrationassignment:
+ scope: subscriptions/{{ subscription_id }}
+ properties:
+ registration_definition_id: "{{ output1.state.id }}"
+ register: output
+ check_mode: yes
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create a RegistrationAssignment
+ azure_rm_registrationassignment:
+ scope: subscriptions/{{ subscription_id }}
+ properties:
+ registration_definition_id: "{{ output1.state.id }}"
+ register: output2
+
+- assert:
+ that:
+ - output2.changed
+
+- name: Create a RegistrationAssignment -- idempotent
+ azure_rm_registrationassignment:
+ scope: subscriptions/{{ subscription_id }}
+ registration_assignment_id: "{{ output2.state.name }}"
+ properties:
+ registration_definition_id: "{{ output1.state.id }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Get a RegistrationAssignment
+ azure_rm_registrationassignment_info:
+ scope: subscriptions/{{ subscription_id }}
+ registration_assignment_id: "{{ output2.state.name }}"
+ register: output
+
+- assert:
+ that:
+ - output.registration_assignments[0].properties.registration_definition_id == "{{ output1.state.id }}"
+
+- name: Get all RegistrationAssignment
+ azure_rm_registrationassignment_info:
+ scope: subscriptions/{{ subscription_id }}
+ register: output
+
+- assert:
+ that:
+ - output.registration_assignments | length >= 1
+
+- name: Delete the RegistrationAssignment
+ azure_rm_registrationassignment:
+ scope: subscriptions/{{ subscription_id }}
+ registration_assignment_id: "{{ output2.state.name }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/aliases
new file mode 100644
index 00000000..759eafa2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group3
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/tasks/main.yml
new file mode 100644
index 00000000..2e95f576
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_registrationdefinition/tasks/main.yml
@@ -0,0 +1,134 @@
+- name: set facts
+ set_fact:
+ subscription_id: "{{ azure_subscription_id }}"
+ subscription_sec_id: "{{ azure_subscription_sec_id }}"
+ managed_by_tenant_id: "{{ azure_managed_by_tenant_id }}"
+ principal_id: "{{ azure_principal_id }}"
+ role_definition_id: "{{ azure_role_definition_id }}"
+ reg_def_name: test_name
+ run_once: yes
+
+- name: Create a RegistrationDefinition -- check mode
+ azure_rm_registrationdefinition:
+ properties:
+ description: first_test
+ authorizations:
+ - principal_id: "{{ principal_id }}"
+ role_definition_id: "{{ role_definition_id }}"
+ managed_by_tenant_id: "{{ managed_by_tenant_id }}"
+ registration_definition_name: "{{ reg_def_name }}"
+ check_mode: yes
+ register: output
+
+- name: Assert creating registration definition check mode
+ assert:
+ that:
+ - output.changed
+
+- name: Create a RegistrationDefinition with scope
+ azure_rm_registrationdefinition:
+ scope: "{{ subscription_sec_id }}"
+ properties:
+ description: test definition with scope
+ authorizations:
+ - principal_id: "{{ principal_id }}"
+ role_definition_id: "{{ role_definition_id }}"
+ managed_by_tenant_id: "{{ managed_by_tenant_id }}"
+ registration_definition_name: "{{ reg_def_name }}"
+ register: output2
+
+- name: Assert creating registration definition
+ assert:
+ that:
+ - output2.changed
+
+- name: Create a RegistrationDefinition
+ azure_rm_registrationdefinition:
+ properties:
+ description: first_test
+ authorizations:
+ - principal_id: "{{ principal_id }}"
+ role_definition_id: "{{ role_definition_id }}"
+ managed_by_tenant_id: "{{ managed_by_tenant_id }}"
+ registration_definition_name: "{{ reg_def_name }}"
+ register: output1
+
+- name: Assert creating registration definition
+ assert:
+ that:
+ - output1.changed
+
+- name: Create a RegistrationDefinition (idempotent)
+ azure_rm_registrationdefinition:
+ registration_definition_id: "{{ output1.state.name }}"
+ properties:
+ description: first_test
+ authorizations:
+ - principal_id: "{{ principal_id }}"
+ role_definition_id: "{{ role_definition_id }}"
+ managed_by_tenant_id: "{{ managed_by_tenant_id }}"
+ registration_definition_name: "{{ reg_def_name }}"
+ register: output
+
+- name: Assert creating registration definition
+ assert:
+ that:
+ - not output.changed
+
+- name: Update the RegistrationDefinition properties description and name
+ azure_rm_registrationdefinition:
+ registration_definition_id: "{{ output1.state.name }}"
+ properties:
+ description: second_test
+ authorizations:
+ - principal_id: "{{ principal_id }}"
+ role_definition_id: "{{ role_definition_id }}"
+ managed_by_tenant_id: "{{ managed_by_tenant_id }}"
+ registration_definition_name: "{{ reg_def_name }}02"
+ register: output
+
+- name: Assert creating registration definition
+ assert:
+ that:
+ - output.changed
+
+- name: Get the Registration Definition info
+ azure_rm_registrationdefinition_info:
+ registration_definition_id: "{{ output1.state.name }}"
+ register: output
+
+- name: Assert the registration definition info
+ assert:
+ that:
+ - output.registration_definitions[0].name == "{{ output1.state.name }}"
+ - output.registration_definitions[0].properties.authorizations[0].principal_id == "{{ principal_id }}"
+ - output.registration_definitions[0].properties.authorizations[0].role_definition_id == "{{ role_definition_id }}"
+ - output.registration_definitions[0].properties.provisioning_state == "Succeeded"
+ - output.registration_definitions[0].properties.description == "second_test"
+ - output.registration_definitions[0].properties.registration_definition_name == "test_name02"
+
+- name: Get All Registration Definition info in the subscription
+ azure_rm_registrationdefinition_info:
+ scope: "{{ subscription_id }}"
+ register: output
+
+- name: Assert all the registration definition info
+ assert:
+ that:
+ - output.registration_definitions | length >=1
+
+- name: Delete the registration definition
+ azure_rm_registrationdefinition:
+ registration_definition_id: "{{ output1.state.name }}"
+ state: absent
+ register: output
+
+- name: Assert delete registration definition success
+ assert:
+ that:
+ - output.changed
+
+- name: Delete the registration definition
+ azure_rm_registrationdefinition:
+ registration_definition_id: "{{ output2.state.name }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/aliases
new file mode 100644
index 00000000..49acfee7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+destructive
+shippable/azure/group2
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/tasks/main.yml
new file mode 100644
index 00000000..6ec87237
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resource/tasks/main.yml
@@ -0,0 +1,158 @@
+- name: Prepare random number
+ set_fact:
+ nsgname: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ storageaccountname: "stacc{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ dbname: "mdb{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Call REST API
+ azure_rm_resource:
+ api_version: '2018-02-01'
+ resource_group: "{{ resource_group }}"
+ provider: network
+ resource_type: networksecuritygroups
+ resource_name: "{{ nsgname }}"
+ body:
+ location: eastus
+ idempotency: yes
+ register: output
+
+- name: Assert that something has changed
+ assert:
+ that: output.changed
+
+- name: Call REST API
+ azure_rm_resource:
+ api_version: '2018-02-01'
+ resource_group: "{{ resource_group }}"
+ provider: network
+ resource_type: networksecuritygroups
+ resource_name: "{{ nsgname }}"
+ body:
+ location: eastus
+ idempotency: yes
+ register: output
+
+- name: Assert that nothing has changed
+ assert:
+ that: not output.changed
+
+- name: Call REST API
+ azure_rm_resource:
+ api_version: '2018-02-01'
+ resource_group: "{{ resource_group }}"
+ provider: network
+ resource_type: networksecuritygroups
+ resource_name: "{{ nsgname }}"
+ body:
+ location: eastus
+ tags:
+ a: "abc"
+ b: "cde"
+ idempotency: yes
+ register: output
+
+- name: Assert that something has changed
+ assert:
+ that: output.changed
+
+- name: Try to get information about account
+ azure_rm_resource_info:
+ api_version: '2018-02-01'
+ resource_group: "{{ resource_group }}"
+ provider: network
+ resource_type: networksecuritygroups
+ resource_name: "{{ nsgname }}"
+ register: output
+
+- name: Assert value was returned
+ assert:
+ that:
+ - not output.changed
+ - output.response[0]['name'] != None
+ - output.response | length == 1
+
+- name: Try to query a list
+ azure_rm_resource_info:
+ api_version: '2018-02-01'
+ resource_group: "{{ resource_group }}"
+ provider: network
+ resource_type: networksecuritygroups
+ register: output
+- name: Assert value was returned
+ assert:
+ that:
+ - not output.changed
+ - output.response[0]['name'] != None
+ - output.response | length >= 1
+
+- name: Try to query a list - same without API version
+ azure_rm_resource_info:
+ resource_group: "{{ resource_group }}"
+ provider: network
+ resource_type: networksecuritygroups
+ register: output
+- name: Assert value was returned
+ assert:
+ that:
+ - not output.changed
+ - output.response[0]['name'] != None
+ - output.response | length >= 1
+
+- name: Query all the resources in the resource group
+ azure_rm_resource_info:
+ resource_group: "{{ resource_group }}"
+ resource_type: resources
+ register: output
+- name: Assert value was returned
+ assert:
+ that:
+ - not output.changed
+ - output.response | length >= 1
+
+- name: Create storage account that requires LRO polling
+ azure_rm_resource:
+ polling_timeout: 600
+ polling_interval: 60
+ api_version: '2018-07-01'
+ resource_group: "{{ resource_group }}"
+ provider: Storage
+ resource_type: storageAccounts
+ resource_name: "{{ storageaccountname }}"
+ body:
+ sku:
+ name: Standard_GRS
+ kind: Storage
+ location: eastus
+ register: output
+
+- name: Assert that storage was successfully created
+ assert:
+ that: "output['response']['name'] == '{{ storageaccountname }}'"
+
+
+- name: Try to storage keys -- special case when subresource part has no name
+ azure_rm_resource:
+ resource_group: "{{ resource_group }}"
+ provider: storage
+ resource_type: storageAccounts
+ resource_name: "{{ storageaccountname }}"
+ subresource:
+ - type: listkeys
+ api_version: '2018-03-01-preview'
+ method: POST
+ register: keys
+
+- name: Assert that key was returned
+ assert:
+ that: keys['response']['keys'][0]['value'] | length > 0
+
+- name: Delete storage - without API version
+ azure_rm_resource:
+ polling_timeout: 600
+ polling_interval: 60
+ method: DELETE
+ resource_group: "{{ resource_group }}"
+ provider: Storage
+ resource_type: storageAccounts
+ resource_name: "{{ storageaccountname }}"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/aliases
new file mode 100644
index 00000000..0dbbfceb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group3
+destructive
+azure_rm_resourcegroup_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/tasks/main.yml
new file mode 100644
index 00000000..706a855e
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_resourcegroup/tasks/main.yml
@@ -0,0 +1,50 @@
+- name: Get resource group datalake info
+ azure_rm_resourcegroup_info:
+ name: "{{ resource_group_datalake }}"
+ list_resources: yes
+ register: rg
+
+- assert:
+ that:
+ - rg.resourcegroups | length == 1
+ - rg.resourcegroups[0].resources | length >= 0
+
+- name: Get resource group info
+ azure_rm_resourcegroup_info:
+ register: rg
+
+- assert:
+ that:
+ - rg.resourcegroups | length >= 1
+
+- name: Get resource group info
+ azure_rm_resourcegroup_info:
+ name: "{{ resource_group }}"
+ list_resources: yes
+ register: rg
+
+- assert:
+ that:
+ - rg.resourcegroups | length == 1
+ - rg.resourcegroups[0].resources | length >= 0
+
+- name: Create resource group (idempontent)
+ azure_rm_resourcegroup:
+ name: "{{ resource_group }}"
+ location: "{{ rg.resourcegroups[0].location }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: delete resource group
+ azure_rm_resourcegroup:
+ name: "{{ resource_group }}"
+ state: absent
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/aliases
new file mode 100644
index 00000000..70048be6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+destructive
+unsupported
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/tasks/main.yml
new file mode 100644
index 00000000..8f0ec3eb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roleassignment/tasks/main.yml
@@ -0,0 +1,186 @@
+- name: setup basic facts
+ set_facts:
+ uuid: bb21a88b-30e1-42b5-84e8-1d3f322de033
+
+- name: List All
+ azure_rm_roleassignment_info:
+ register: az_role_assignments
+
+- name: Intentional mutual exclusion info
+ azure_rm_roleassignment_info:
+ name: "{{ item.name | default(omit) }}"
+ assignee: "{{ item.assignee | default(omit) }}"
+ id: "{{ item.id | default(omit) }}"
+ scope: "{{ item.scope | default(omit) }}"
+ register: failures_info
+ ignore_errors: True
+ loop:
+ - name: "{{ az_role_assignments.roleassignments[0].name }}"
+ assignee: "{{ az_role_assignments.roleassignments[0].principal_id }}"
+ - assignee: "{{ az_role_assignments.roleassignments[0].principal_id }}"
+ id: "{{ az_role_assignments.roleassignments[0].id }}"
+ - name: "{{ az_role_assignments.roleassignments[0].name }}"
+ id: "{{ az_role_assignments.roleassignments[0].id }}"
+
+- name: Intentional failures mutable
+ azure_rm_roleassignment:
+ name: "{{ item.name | default(omit) }}"
+ assignee_object_id: "{{ item.assignee | default(omit) }}"
+ id: "{{ item.id | default(omit) }}"
+ scope: "{{ item.scope | default(omit) }}"
+ role_definition_id: "{{ item.role_definition_id | default(omit) }}"
+ state: "{{ item.state | default(omit) }}"
+ register: failures_mutable
+ ignore_errors: True
+ loop:
+ # mutually exclusive
+ - scope: "{{ az_role_assignments.roleassignments[0].scope }}"
+ id: "{{ az_role_assignments.roleassignments[0].id }}"
+ # mutually exclusive
+ - name: "{{ az_role_assignments.roleassignments[0].name }}"
+ id: "{{ az_role_assignments.roleassignments[0].id }}"
+ # missing required role_definition_id
+ - scope: "{{ az_role_assignments.roleassignments[0].scope }}"
+ assignee_object_id: "{{ az_role_assignments.roleassignments[0].principal_id }}"
+ state: "present"
+ # missing required assignee_object_id
+ - scope: "{{ az_role_assignments.roleassignments[0].scope }}"
+ role_definition_id: "{{ az_role_assignments.roleassignments[0].role_definition_id }}"
+ state: "present"
+ # missing required role_definition_id
+ - scope: "{{ az_role_assignments.roleassignments[0].scope }}"
+ assignee_object_id: "{{ az_role_assignments.roleassignments[0].principal_id }}"
+ state: "absent"
+ # missing required assignee_object_id
+ - scope: "{{ az_role_assignments.roleassignments[0].scope }}"
+ role_definition_id: "{{ az_role_assignments.roleassignments[0].role_definition_id }}"
+ state: "absent"
+
+- name: check intended failures
+ assert:
+ that:
+ - item.failed
+ loop: "{{ failures_info.results | union(failures_mutable.results) }}"
+
+- name: get resource group info
+ azure_rm_resourcegroup_info:
+ name: "{{ resource_group }}"
+ register: az_resource_group
+
+- name: create role assignment by id
+ azure_rm_roleassignment:
+ id: "{{ az_resource_group.resourcegroups[0].id }}/providers/Microsoft.Authorization/roleAssignments/{{ uuid }}"
+ assignee_object_id: "{{ az_assignee_object_id }}"
+ role_definition_id: "/subscriptions/{{ az_resource_group.resourcegroups[0].id.split('/')[2] }}/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
+ register: az_role_assignment_create
+
+- name: create role assignment by scope
+ azure_rm_roleassignment:
+ scope: "{{ az_resource_group.resourcegroups[0].id }}"
+ assignee_object_id: "{{ az_assignee_object_id }}"
+ role_definition_id: "/subscriptions/{{ az_resource_group.resourcegroups[0].id.split('/')[2] }}/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
+ register: az_role_assignment_idempotent
+
+- name: check idempotence
+ assert:
+ that:
+ - az_role_assignment_idempotent.changed == False
+
+- name: List Role Assignments by Name
+ azure_rm_roleassignment_info:
+ name: "{{ az_role_assignment_create.name }}"
+ scope: "{{ az_role_assignment_create.scope }}"
+ register: az_role_assignment_by_name
+
+- name: List Role Assignments at scope
+ azure_rm_roleassignment_info:
+ scope: "{{ az_resource_group.resourcegroups[0].id }}"
+ register: az_role_assignment_by_scope
+
+- name: List Role Assignments at scope with strict matching
+ azure_rm_roleassignment_info:
+ scope: "{{ az_role_assignments.roleassignments[0].scope }}"
+ strict_scope_match: True
+ register: az_role_assignment_by_scope_strict
+
+- name: check strict scope matching
+ assert:
+ that:
+ - item.scope == az_role_assignments.roleassignments[0].scope
+ loop: "{{ az_role_assignment_by_scope_strict.roleassignments }}"
+
+- name: List Role Assignments at id
+ azure_rm_roleassignment_info:
+ id: "{{ az_role_assignment_create.id }}"
+ register: az_role_assignment_by_id
+
+- name: List Role Assignments by assignee
+ azure_rm_roleassignment_info:
+ assignee: "{{ az_role_assignments.roleassignments[0].principal_id }}"
+ register: az_role_assignment_by_assignee
+
+- name: Delete Role Assignment by id
+ azure_rm_roleassignment:
+ id: "{{ az_role_assignment_create.id }}"
+ state: absent
+ register: az_role_assignment_delete
+
+- name: create role assignment with name
+ azure_rm_roleassignment:
+ scope: "{{ az_resource_group.resourcegroups[0].id }}"
+ assignee_object_id: "{{ az_assignee_object_id }}"
+ role_definition_id: "/subscriptions/{{ az_resource_group.resourcegroups[0].id.split('/')[2] }}/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
+ name: "{{ uuid }}"
+ register: az_role_assignment_create
+
+- name: Delete Role by Name
+ azure_rm_roleassignment:
+ scope: "{{ az_resource_group.resourcegroups[0].id }}"
+ name: "{{ uuid }}"
+ state: absent
+ register: az_role_assignment_delete
+
+- name: create role assignment by scope
+ azure_rm_roleassignment:
+ scope: "{{ az_resource_group.resourcegroups[0].id }}"
+ assignee_object_id: "{{ az_assignee_object_id }}"
+ role_definition_id: "/subscriptions/{{ az_resource_group.resourcegroups[0].id.split('/')[2] }}/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
+ register: az_role_assignment_create_by_scope
+
+- name: delete by scope, assignee_object_id and role_definition_id
+ azure_rm_roleassignment:
+ scope: "{{ az_resource_group.resourcegroups[0].id }}"
+ assignee_object_id: "{{ az_assignee_object_id }}"
+ role_definition_id: "/subscriptions/{{ az_resource_group.resourcegroups[0].id.split('/')[2] }}/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c"
+ state: absent
+ register: az_role_assignment_delete
+
+- name: absent assignment that doesn't exist - id
+ azure.azcollection.azure_rm_roleassignment:
+ id: "{{ az_role_assignment_delete.id }}"
+ state: absent
+ register: absent_nochange_id
+
+- name: absent assignment that doesn't exist - name
+ azure.azcollection.azure_rm_roleassignment:
+ name: "{{ az_role_assignment_delete.name }}"
+ scope: "{{ az_role_assignment_delete.scope }}"
+ state: absent
+ register: absent_nochange_name
+
+- name: absent assignment that doesn't exist - properties
+ azure.azcollection.azure_rm_roleassignment:
+ scope: "{{ az_role_assignment_delete.scope }}"
+ assignee_object_id: "{{ az_role_assignment_delete.assignee_object_id }}"
+ role_definition_id: "{{ az_role_assignment_delete.role_definition_id }}"
+ state: absent
+ register: absent_nochange_properties
+
+- name: check intended failures info
+ assert:
+ that:
+ - item.changed == false
+ loop:
+ - "{{ absent_nochange_properties }}"
+ - "{{ absent_nochange_id }}"
+ - "{{ absent_nochange_name }}"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/aliases
new file mode 100644
index 00000000..35b94011
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+destructive
+unsupported \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/tasks/main.yml
new file mode 100644
index 00000000..15cf266b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_roledefinition/tasks/main.yml
@@ -0,0 +1,211 @@
+- name: Fix resource prefix
+ set_fact:
+ role_name: "{{ (resource_group | replace('-','x'))[-8:] }}{{ 1000 | random }}testrole"
+ subscription_id: "{{azure_subscription_id}}"
+ principal_id: "{{azure_client_id}}"
+ run_once: yes
+
+- name: Create a role definition (Check Mode)
+ azure_rm_roledefinition:
+ name: "{{ role_name }}"
+ scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+ permissions:
+ - actions:
+ - "Microsoft.Compute/virtualMachines/read"
+ not_actions:
+ - "Microsoft.Compute/virtualMachines/write"
+ data_actions:
+ - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read"
+ not_data_actions:
+ - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write"
+ assignable_scopes:
+ - "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+ check_mode: yes
+ register: output
+
+- name: Assert creating role definition check mode
+ assert:
+ that:
+ - output.changed
+
+- name: Create a role definition
+ azure_rm_roledefinition:
+ name: "{{ role_name }}"
+ scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+ permissions:
+ - actions:
+ - "Microsoft.Compute/virtualMachines/read"
+ not_actions:
+ - "Microsoft.Compute/virtualMachines/write"
+ data_actions:
+ - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read"
+ not_data_actions:
+ - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write"
+ assignable_scopes:
+ - "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+ register: output
+
+- name: Assert creating role definition
+ assert:
+ that:
+ - output.changed
+
+
+## because of the bug of azure service , the following tasks will cause failures randomly
+#
+#- name: Get facts by type
+# azure_rm_roledefinition_info:
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# type: custom
+# register: facts
+#
+#- name: Assert facts
+# assert:
+# that:
+# - facts['roledefinitions'] | length > 1
+#
+#- name: Get facts by name
+# azure_rm_roledefinition_info:
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# role_name: "{{ role_name }}"
+# register: facts
+# until: facts.roledefinitions | length > 0
+# retries: 50
+# delay: 60
+#
+#- name: Assert facts
+# assert:
+# that:
+# - facts['roledefinitions'] | length == 1
+# - facts['roledefinitions'][0]['permissions'] | length == 1
+# - facts['roledefinitions'][0]['permissions'][0]['not_data_actions'] | length == 1
+# - facts['roledefinitions'][0]['permissions'][0]['data_actions'] | length == 1
+#
+#- name: Update the role definition (idempotent)
+# azure_rm_roledefinition:
+# name: "{{ role_name }}"
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# permissions:
+# - actions:
+# - "Microsoft.Compute/virtualMachines/read"
+# not_actions:
+# - "Microsoft.Compute/virtualMachines/write"
+# data_actions:
+# - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read"
+# not_data_actions:
+# - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write"
+# assignable_scopes:
+# - "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# register: output
+#
+#- name: assert output not changed
+# assert:
+# that:
+# - not output.changed
+#
+#- name: Update the role definition
+# azure_rm_roledefinition:
+# name: "{{ role_name }}"
+# description: "update description"
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# permissions:
+# - actions:
+# - "Microsoft.Compute/virtualMachines/read"
+# - "Microsoft.Compute/virtualMachines/start/action"
+# not_actions:
+# - "Microsoft.Compute/virtualMachines/write"
+# data_actions:
+# - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read"
+# not_data_actions:
+# - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write"
+# assignable_scopes:
+# - "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# register: output
+#
+#- name: assert output changed
+# assert:
+# that:
+# - output.changed
+#
+#- name: Get role definition facts
+# azure_rm_roledefinition_info:
+# role_name: "{{ role_name }}"
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# type: custom
+# register: roledef
+# until: "{{ roledef.roledefinitions | length > 0 }}"
+# retries: 50
+# delay: 60
+#
+#- name: Assert role definition facts
+# assert:
+# that:
+# - roledef['roledefinitions'] | length == 1
+# - roledef['roledefinitions'][0]['id']
+#
+#- name: Create a role assignment (Check Mode)
+# azure_rm_roleassignment:
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# assignee_object_id: "{{ principal_id }}"
+# role_definition_id: "{{ roledef['roledefinitions'][0]['id'] }}"
+# check_mode: yes
+# register: output
+#
+#- name: Assert creating role definition check mode
+# assert:
+# that:
+# - output.changed
+#
+#- name: Create a role assignment
+# azure_rm_roleassignment:
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# assignee_object_id: "{{ principal_id }}"
+# role_definition_id: "{{ roledef['roledefinitions'][0]['id'] }}"
+# register: output
+#
+#- name: Assert creating role assignment
+# assert:
+# that:
+# - output.changed
+#
+#- name: Get facts
+# azure_rm_roleassignment_info:
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# assignee: "{{ principal_id }}"
+# role_definition_id: "{{ roledef['roledefinitions'][0]['id'] }}"
+# register: facts
+#
+#- name: assert role assignment facts
+# assert:
+# that:
+# - facts['roleassignments'] | length > 0
+# - facts['roleassignments'][0]['id']
+#
+#- name: delete role assignment
+# azure_rm_roleassignment:
+# name: "{{ facts['roleassignments'][0]['id'].split('/')[-1] }}"
+# scope: "/subscriptions/{{ subscription_id }}"
+# state: absent
+#
+#- name: Delete the role definition (Check Mode)
+# azure_rm_roledefinition:
+# name: "{{ role_name }}"
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# state: absent
+# check_mode: yes
+# register: output
+#
+#- name: assert deleting role definition check mode
+# assert:
+# that: output.changed
+#
+#- name: Delete the role definition
+# azure_rm_roledefinition:
+# name: "{{ role_name }}"
+# scope: "/subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}"
+# state: absent
+# register: output
+#
+#- assert:
+# that:
+# - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/aliases
new file mode 100644
index 00000000..759eafa2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group3
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/tasks/main.yml
new file mode 100644
index 00000000..98b3c752
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_routetable/tasks/main.yml
@@ -0,0 +1,195 @@
+- name: Prepare random number
+ set_fact:
+ name: "table{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ route_name: "route{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create a route table (check mode)
+ azure_rm_routetable:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ tags:
+ purpose: testing
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - not output.id
+ - output.changed
+
+- name: Create a route table
+ azure_rm_routetable:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ tags:
+ purpose: testing
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: Create a route table (idemponent)
+ azure_rm_routetable:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ tags:
+ purpose: testing
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Get facts of the table
+ azure_rm_routetable_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - "output.route_tables | length == 1"
+ - "output.route_tables[0].routes | length == 0"
+
+- name: Create route (check mode)
+ azure_rm_route:
+ name: "{{ route_name }}"
+ resource_group: "{{ resource_group }}"
+ next_hop_type: virtual_network_gateway
+ address_prefix: "10.1.0.0/16"
+ route_table_name: "{{ name }}"
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - not output.id
+
+- name: Create route
+ azure_rm_route:
+ name: "{{ route_name }}"
+ resource_group: "{{ resource_group }}"
+ next_hop_type: virtual_network_gateway
+ address_prefix: "10.1.0.0/16"
+ route_table_name: "{{ name }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.id
+
+- name: Create route (idemponent)
+ azure_rm_route:
+ name: "{{ route_name }}"
+ resource_group: "{{ resource_group }}"
+ next_hop_type: virtual_network_gateway
+ address_prefix: "10.1.0.0/16"
+ route_table_name: "{{ name }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: update route
+ azure_rm_route:
+ name: "{{ route_name }}"
+ resource_group: "{{ resource_group }}"
+ next_hop_type: virtual_network_gateway
+ address_prefix: "10.1.0.0/24"
+ route_table_name: "{{ name }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get facts of the route
+ azure_rm_route_info:
+ name: "{{ route_name }}"
+ resource_group: "{{ resource_group }}"
+ route_table_name: "{{ name }}"
+ register: output
+
+- assert:
+ that:
+ - output.routes[0].address_prefix == "10.1.0.0/24"
+ - output.routes[0].next_hop_type == "VirtualNetworkGateway"
+
+- name: Get facts of the table
+ azure_rm_routetable_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - "output.route_tables | length == 1"
+ - "output.route_tables[0].routes | length == 1"
+ - output.route_tables[0].routes[0].address_prefix == '10.1.0.0/24'
+
+- name: Delete route (check mode)
+ azure_rm_route:
+ name: "{{ route_name }}"
+ resource_group: "{{ resource_group }}"
+ route_table_name: "{{ name }}"
+ state: absent
+ check_mode: yes
+
+- name: Delete route
+ azure_rm_route:
+ name: "{{ route_name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ route_table_name: "{{ name }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Delete route (idemponent)
+ azure_rm_route:
+ name: "{{ route_name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ route_table_name: "{{ name }}"
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Delete route table (check mode)
+ azure_rm_routetable:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ check_mode: yes
+
+- name: Delete route table
+ azure_rm_routetable:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Delete route table (idemponent)
+ azure_rm_routetable:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - not output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/aliases
new file mode 100644
index 00000000..7f7d9528
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group2
+destructive
+azure_rm_securitygroup_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/tasks/main.yml
new file mode 100644
index 00000000..86283503
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_securitygroup/tasks/main.yml
@@ -0,0 +1,306 @@
+- name: Prepare random number
+ set_fact:
+ secgroupname: "sg{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ asg_name1: "asg1{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ asg_name2: "asg2{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ sg_name1: "sgasg{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+
+- name: Create security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ purge_rules: yes
+ rules:
+ - name: DenySSH
+ protocol: Tcp
+ destination_port_range: 22
+ access: Deny
+ priority: 100
+ direction: Inbound
+ - name: AllowSSH
+ protocol: Tcp
+ source_address_prefix: 174.109.158.0/24
+ destination_port_range: 22
+ access: Allow
+ priority: 101
+ direction: Inbound
+ register: output
+
+- assert: { that: "{{ output.state.rules | length }} == 2" }
+
+- name: Gather facts by tags
+ azure_rm_securitygroup_info:
+ resource_group: "{{ resource_group }}"
+ tags:
+ - testing
+ - foo:bar
+ register: output
+
+- assert:
+ that: output.securitygroups | length == 1
+
+- name: Add/Update rules on existing security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ rules:
+ - name: AllowSSH
+ protocol: Tcp
+ source_address_prefix: 174.108.158.0/24
+ destination_port_range: 22
+ access: Allow
+ priority: 101
+ - name: AllowSSHFromHome
+ protocol: Tcp
+ source_address_prefix: 174.109.158.0/24
+ destination_port_range: 22-23
+ priority: 102
+ register: output
+
+- assert:
+ that:
+ - "{{ output.state.rules | length }} == 3"
+ - output.state.rules[0].source_address_prefix == '174.108.158.0/24'
+
+- name: Test idempotence
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ rules:
+ - name: AllowSSH
+ protocol: Tcp
+ source_address_prefix: 174.108.158.0/24
+ destination_port_range: 22
+ access: Allow
+ priority: 101
+ - name: AllowSSHFromHome
+ protocol: Tcp
+ source_address_prefix: 174.109.158.0/24
+ destination_port_range: 22-23
+ priority: 102
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Update tags
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ tags:
+ testing: testing
+ delete: never
+ baz: bar
+ append_tags: false
+ register: output
+
+- assert:
+ that:
+ - output.state.tags | length == 3
+ - output.state.tags.delete == 'never'
+
+- name: Purge tags
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ append_tags: false
+ tags:
+ testing: testing
+ delete: on-exit
+ register: output
+
+- assert:
+ that:
+ - output.state.tags | length == 2
+ - output.state.tags.delete == 'on-exit'
+
+- name: Gather facts for one accounts
+ azure_rm_securitygroup_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ register: output
+
+- assert:
+ that:
+ - output.securitygroups | length == 1
+
+- name: Gather facts for all accounts
+ azure_rm_securitygroup_info:
+ resource_group: "{{ resource_group }}"
+ tags:
+ - testing:testing
+ register: output_groups
+
+- assert:
+ that:
+ - output_groups.securitygroups | length > 0
+
+- name: Create security group with source_address_prefixes
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ purge_rules: yes
+ rules:
+ - name: AllowSSH
+ protocol: Tcp
+ source_address_prefix:
+ - 52.100.120.240
+ - 53.100.250.190
+ - 54.110.200.200
+ destination_port_range: 22
+ access: Allow
+ priority: 101
+ direction: Inbound
+ register: output
+
+- assert:
+ that:
+ - "{{ output.state.rules | length }} == 1"
+ - "{{ output.state.rules[0].source_address_prefixes | length }} == 3"
+ - not output.state.rules[0].source_address_prefix
+
+- name: Create security group with source_address_prefixes(idempontent)
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ purge_rules: yes
+ rules:
+ - name: AllowSSH
+ protocol: Tcp
+ source_address_prefix:
+ - 52.100.120.240
+ - 53.100.250.190
+ - 54.110.200.200
+ destination_port_range: 22
+ access: Allow
+ priority: 101
+ direction: Inbound
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Add a single one group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ secgroupname }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ rules:
+ - name: DenySSH
+ protocol: Tcp
+ source_address_prefix:
+ - 54.120.120.240
+ destination_port_range: 22
+ access: Deny
+ priority: 102
+ direction: Inbound
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - "{{ output.state.rules | length }} == 2"
+
+- name: Create Application security group 1
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ asg_name1 }}"
+ tags:
+ testing: testing
+ register: asg1
+
+- name: Create Application security group 2
+ azure_rm_applicationsecuritygroup:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ asg_name2 }}"
+ tags:
+ testing: testing
+ register: asg2
+
+- name: Create security group with application security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ sg_name1 }}"
+ purge_rules: yes
+ rules:
+ - name: AsgToAsg
+ protocol: Tcp
+ source_application_security_groups:
+ - "{{ asg1.id }}"
+ destination_application_security_groups:
+ - resource_group: "{{ resource_group_secondary }}"
+ name: "{{ asg_name2 }}"
+ destination_port_range: 22
+ access: Allow
+ priority: 101
+ direction: Inbound
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create security group with application security group - Idempotent
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ sg_name1 }}"
+ purge_rules: yes
+ rules:
+ - name: AsgToAsg
+ protocol: Tcp
+ source_application_security_groups:
+ - "{{ asg_name1 }}"
+ destination_application_security_groups:
+ - resource_group: "{{ resource_group_secondary }}"
+ name: "{{ asg_name2 }}"
+ destination_port_range: 22
+ access: Allow
+ priority: 101
+ direction: Inbound
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+
+- name: Delete security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ sg_name1 }}"
+ state: absent
+
+- name: Delete all security groups
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ item.name }}"
+ state: absent
+ with_items: "{{ output_groups.securitygroups }}"
+
+- name: Should have no security groups remaining
+ azure_rm_securitygroup_info:
+ resource_group: "{{ resource_group }}"
+ tags:
+ - testing:testing
+ register: output
+
+- assert:
+ that:
+ - output.securitygroups | length == 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/aliases
new file mode 100644
index 00000000..cc941b59
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group12
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/tasks/main.yml
new file mode 100644
index 00000000..93f56ebb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_servicebus/tasks/main.yml
@@ -0,0 +1,169 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create a namespace
+ azure_rm_servicebus:
+ name: "ns{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ register: namespace
+
+- assert:
+ that:
+ - namespace.id
+ - namespace.changed
+
+- name: Create a namespace (idempontent)
+ azure_rm_servicebus:
+ name: "ns{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ register: namespace
+
+- assert:
+ that:
+ - not namespace.changed
+
+- name: Create a queue
+ azure_rm_servicebusqueue:
+ name: "queue{{ rpfx }}"
+ namespace: "ns{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ register: queue
+
+- assert:
+ that:
+ - queue.id
+ - queue.changed
+
+- name: Create a topic (check mode)
+ azure_rm_servicebustopic:
+ name: "topic{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ duplicate_detection_time_in_seconds: 600
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create a topic
+ azure_rm_servicebustopic:
+ name: "topic{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ duplicate_detection_time_in_seconds: 600
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.id
+ - "'subscription_count' not in output"
+
+- name: Create a topic (idempontent)
+ azure_rm_servicebustopic:
+ name: "topic{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ duplicate_detection_time_in_seconds: 600
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Create test policy
+ azure_rm_servicebussaspolicy:
+ name: testpolicy
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ topic: "topic{{ rpfx }}"
+ rights: manage
+
+- name: Create a subscription
+ azure_rm_servicebustopicsubscription:
+ name: "subs{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ topic: "topic{{ rpfx }}"
+ register: subs
+
+- assert:
+ that:
+ - subs.id
+ - subs.changed
+
+- name: Retrive topic
+ azure_rm_servicebus_info:
+ type: topic
+ name: "topic{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ show_sas_policies: yes
+ register: facts
+
+- assert:
+ that:
+ - "facts.servicebuses | length == 1"
+ - facts.servicebuses[0].id == output.id
+ - facts.servicebuses[0].subscription_count == 1
+ - facts.servicebuses[0].sas_policies.testpolicy
+ - facts.servicebuses[0].sas_policies.testpolicy.rights == 'manage'
+
+- name: Delete subscription
+ azure_rm_servicebustopicsubscription:
+ name: "subs{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ topic: "topic{{ rpfx }}"
+ state: absent
+
+- name: Retrive topic
+ azure_rm_servicebus_info:
+ type: topic
+ name: "topic{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ show_sas_policies: yes
+ register: facts
+
+- assert:
+ that:
+ - facts.servicebuses[0].subscription_count == 0
+ - "facts.servicebuses | length == 1"
+
+- name: Delete topic
+ azure_rm_servicebustopic:
+ name: "topic{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ state: absent
+
+- name: Retrive topic
+ azure_rm_servicebus_info:
+ name: "topic{{ rpfx }}"
+ type: topic
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ show_sas_policies: yes
+ register: facts
+
+- assert:
+ that:
+ - "facts.servicebuses | length == 0"
+
+- name: Delete queue
+ azure_rm_servicebusqueue:
+ name: "queue{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ namespace: "ns{{ rpfx }}"
+ state: absent
+
+- name: Delete namespace
+ azure_rm_servicebus:
+ name: "ns{{ rpfx }}"
+ resource_group: "{{ resource_group }}"
+ state: absent \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/aliases
new file mode 100644
index 00000000..952e4dac
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/aliases
@@ -0,0 +1,8 @@
+cloud/azure
+destructive
+shippable/azure/group9
+azure_rm_sqlserver_facts
+azure_rm_sqldatabase
+azure_rm_sqldatabase_facts
+azure_rm_sqlfirewallrule
+azure_rm_sqlfirewallrule_facts
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/tasks/main.yml
new file mode 100644
index 00000000..d18d9270
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_sqlserver/tasks/main.yml
@@ -0,0 +1,542 @@
+- name: Prepare random number
+ set_fact:
+ random_postfix: "{{ 1000 | random }}{{ resource_group | hash('md5') | truncate(7, True, '') }}"
+ run_once: yes
+
+- name: Create instance of SQL Server -- check mode
+ azure_rm_sqlserver:
+ resource_group: "{{ resource_group }}"
+ name: "sqlsrv{{ random_postfix }}"
+ location: eastus
+ admin_username: mylogin
+ admin_password: Password123!
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of SQL Server
+ azure_rm_sqlserver:
+ resource_group: "{{ resource_group }}"
+ name: "sqlsrv{{ random_postfix }}"
+ location: eastus
+ admin_username: mylogin
+ admin_password: Password123!
+ tags:
+ aaa: bbb
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.state == 'Ready'
+
+- name: Create again instance of SQL Server
+ azure_rm_sqlserver:
+ resource_group: "{{ resource_group }}"
+ name: "sqlsrv{{ random_postfix }}"
+ location: eastus
+ admin_username: mylogin
+ admin_password: Password123!
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.state == 'Ready'
+
+# azure_rm_sqlserver_facts tests
+
+- name: Gather facts SQL Server
+ azure_rm_sqlserver_info:
+ resource_group: "{{ resource_group }}"
+ server_name: "sqlsrv{{ random_postfix }}"
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers.sqlsrv{{ random_postfix }}.id != None
+ - output.servers.sqlsrv{{ random_postfix }}.name == "sqlsrv{{ random_postfix }}"
+ - output.servers.sqlsrv{{ random_postfix }}.type != None
+ - output.servers.sqlsrv{{ random_postfix }}.location != None
+ - output.servers.sqlsrv{{ random_postfix }}.kind != None
+ - output.servers.sqlsrv{{ random_postfix }}.version != None
+ - output.servers.sqlsrv{{ random_postfix }}.state != None
+ - output.servers.sqlsrv{{ random_postfix }}.fully_qualified_domain_name != None
+ - output.servers.sqlsrv{{ random_postfix }}.tags.aaa == 'bbb'
+
+- name: Gather facts SQL Server - unexisting
+ azure_rm_sqlserver_info:
+ resource_group: "{{ resource_group }}"
+ server_name: "unexisting"
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers == {}
+
+- name: Gather facts SQL Server - list
+ azure_rm_sqlserver_info:
+ resource_group: "{{ resource_group }}"
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.servers.sqlsrv{{ random_postfix }}.id != None
+ - output.servers.sqlsrv{{ random_postfix }}.name == "sqlsrv{{ random_postfix }}"
+ - output.servers.sqlsrv{{ random_postfix }}.type != None
+ - output.servers.sqlsrv{{ random_postfix }}.location != None
+ - output.servers.sqlsrv{{ random_postfix }}.kind != None
+ - output.servers.sqlsrv{{ random_postfix }}.version != None
+ - output.servers.sqlsrv{{ random_postfix }}.state != None
+ - output.servers.sqlsrv{{ random_postfix }}.fully_qualified_domain_name != None
+
+# azure_rm_sqldatabase tests
+
+- name: Create instance of SQL Database -- check mode
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}
+ location: eastus
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of SQL Database
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}
+ location: eastus
+ edition: premium
+ tags:
+ aaa: bbb
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+ - output.status == 'Online'
+
+- name: Create again instance of SQL Database
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}
+ location: eastus
+ edition: premium
+ tags:
+ aaa: bbb
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.status == 'Online'
+
+# test database facter:
+- name: Create second SQL Database
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}second
+ location: eastus
+
+- name: Gather facts SQL Database
+ azure_rm_sqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0].id != None
+ - output.databases[0].name != None
+ - output.databases[0].location != None
+ - output.databases[0].sku.name != None
+ - output.databases[0].sku.tier != None
+ - output.databases[0].sku.capacity != None
+ - output.databases[0].kind != None
+ - output.databases[0].status != None
+
+- name: Gather facts SQL Database
+ azure_rm_sqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0].id != None
+ - output.databases[0].name != None
+ - output.databases[0].location != None
+ - output.databases[0].sku.name != None
+ - output.databases[0].sku.tier != None
+ - output.databases[0].sku.capacity != None
+ - output.databases[0].kind != None
+ - output.databases[0].status != None
+ - output.databases[1].id != None
+ - output.databases[1].name != None
+ - output.databases[1].location != None
+ - output.databases[1].sku.name != None
+ - output.databases[1].sku.tier != None
+ - output.databases[1].sku.capacity != None
+ - output.databases[1].kind != None
+ - output.databases[1].status != None
+
+- name: Delete instance of secondary database
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}second
+ state: absent
+
+# clean up databases
+- name: Delete instance of SQL Database -- check mode
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of SQL Database
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of SQL Database
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
+
+# Test With SKU
+- name: Create SQL Database with sku -- check mode
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}2
+ location: eastus
+ sku:
+ name: S0
+ tier: Standard
+ check_mode: yes
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed
+
+- name: Create SQL Database with sku
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}2
+ location: eastus
+ tags:
+ aaa: bbb
+ sku:
+ name: S0
+ tier: Standard
+ register: output
+- name: Assert the resource instance is well created with good SKU
+ assert:
+ that:
+ - output.changed
+ - output.status == 'Online'
+
+- name: Gather facts SQL Database with good SKU
+ azure_rm_sqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}2
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0].id != None
+ - output.databases[0].name != None
+ - output.databases[0].location != None
+ - output.databases[0].sku.name == "S0"
+ - output.databases[0].sku.tier == "Standard"
+ - output.databases[0].sku.capacity != None
+ - output.databases[0].kind != None
+ - output.databases[0].status != None
+
+- name: Create again instance of SQL Database with same SKU
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}2
+ location: eastus
+ tags:
+ aaa: bbb
+ sku:
+ name: S0
+ tier: Standard
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+ - output.status == 'Online'
+
+- name: Create again instance of SQL Database with New SKU
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}2
+ location: eastus
+ tags:
+ aaa: bbb
+ sku:
+ name: P1
+ tier: Premium
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed
+ - output.status == 'Online'
+
+- name: Gather facts SQL Database with good New SKU
+ azure_rm_sqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}2
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases[0].id != None
+ - output.databases[0].name != None
+ - output.databases[0].location != None
+ - output.databases[0].sku.name == "P1"
+ - output.databases[0].sku.tier == "Premium"
+ - output.databases[0].sku.capacity != None
+ - output.databases[0].kind != None
+ - output.databases[0].status != None
+
+- name: Delete instance of SQL Database
+ azure_rm_sqldatabase:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}2
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+# test database facts without databases
+- name: Gather facts SQL Database
+ azure_rm_sqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: database{{ random_postfix }}2
+ register: output
+- name: Assert that empty dictionary was returned
+ assert:
+ that:
+ - output.changed == False
+ - output.databases | length == 0
+
+- name: Gather facts SQL Database
+ azure_rm_sqldatabase_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ register: output
+- name: Assert that empty dictionary was returned (one database is there by default)
+ assert:
+ that:
+ - output.changed == False
+ - output.databases | length == 1
+
+# azure_rm_sqlfirewallrule tests
+
+- name: Create instance of Firewall Rule -- check mode
+ azure_rm_sqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: "sqlsrv{{ random_postfix }}"
+ name: firewallrule{{ random_postfix }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ check_mode: yes
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create instance of Firewall Rule
+ azure_rm_sqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: "sqlsrv{{ random_postfix }}"
+ name: firewallrule{{ random_postfix }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the resource instance is well created
+ assert:
+ that:
+ - output.changed
+
+- name: Create again instance of Firewall Rule
+ azure_rm_sqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: "sqlsrv{{ random_postfix }}"
+ name: firewallrule{{ random_postfix }}
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+ register: output
+- name: Assert the state has not changed
+ assert:
+ that:
+ - output.changed == false
+
+#
+# azure_rm_sqlserverfirewallrule_facts
+#
+
+- name: Create Firewall Rule - second
+ azure_rm_sqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: firewallrule{{ random_postfix }}second
+ start_ip_address: 172.28.10.136
+ end_ip_address: 172.28.10.138
+
+- name: Gather facts SQL Firewall Rule
+ azure_rm_sqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: firewallrule{{ random_postfix }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules[0].id != None
+ - output.rules[0].resource_group != None
+ - output.rules[0].server_name != None
+ - output.rules[0].name != None
+ - output.rules[0].start_ip_address != None
+ - output.rules[0].end_ip_address != None
+
+- name: Gather facts SQL Firewall Rule
+ azure_rm_sqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ register: output
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules[0].id != None
+ - output.rules[0].id != None
+ - output.rules[0].resource_group != None
+ - output.rules[0].server_name != None
+ - output.rules[0].name != None
+ - output.rules[0].start_ip_address != None
+ - output.rules[0].end_ip_address != None
+ - output.rules[1].id != None
+ - output.rules[1].resource_group != None
+ - output.rules[1].server_name != None
+ - output.rules[1].name != None
+ - output.rules[1].start_ip_address != None
+ - output.rules[1].end_ip_address != None
+
+- name: Delete instance of Firewall Rule
+ azure_rm_sqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: firewallrule{{ random_postfix }}
+ state: absent
+- name: Delete instance of Firewall Rule
+ azure_rm_sqlfirewallrule:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: firewallrule{{ random_postfix }}second
+ state: absent
+
+- name: Gather facts SQL Firewall Rule
+ azure_rm_sqlfirewallrule_info:
+ resource_group: "{{ resource_group }}"
+ server_name: sqlsrv{{ random_postfix }}
+ name: firewallrule{{ random_postfix }}
+ register: output
+- name: Assert that empty dictionary was returned
+ assert:
+ that:
+ - output.changed == False
+ - output.rules | length == 0
+
+# finalise & clean up azure_rm_sqlserver test
+
+- name: Delete instance of SQL Server -- check mode
+ azure_rm_sqlserver:
+ resource_group: "{{ resource_group }}"
+ name: "sqlsrv{{ random_postfix }}"
+ state: absent
+ check_mode: yes
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete instance of SQL Server
+ azure_rm_sqlserver:
+ resource_group: "{{ resource_group }}"
+ name: "sqlsrv{{ random_postfix }}"
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete unexisting instance of SQL Server
+ azure_rm_sqlserver:
+ resource_group: "{{ resource_group }}"
+ name: "sqlsrv{{ random_postfix }}"
+ state: absent
+ register: output
+- name: Assert the state has changed
+ assert:
+ that:
+ - output.changed == false
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/aliases
new file mode 100644
index 00000000..aa77c071
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group2
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/tasks/main.yml
new file mode 100644
index 00000000..a382ac33
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageaccount/tasks/main.yml
@@ -0,0 +1,211 @@
+ - name: Create storage account name
+ set_fact:
+ storage_account: "sa{{ resource_group | hash('md5') | truncate(22, True, '') }}"
+
+ - name: Test invalid account name
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "invalid_char$"
+ register: invalid_name
+ ignore_errors: yes
+
+ - name: Assert task failed
+ assert: { that: "invalid_name['failed'] == True" }
+
+ - name: Delete storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ state: absent
+ force_delete_nonempty: True
+
+ - name: Create new storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ account_type: Standard_LRS
+ append_tags: no
+ blob_cors:
+ - allowed_origins:
+ - http://www.example.com/
+ allowed_methods:
+ - GET
+ - POST
+ allowed_headers:
+ - x-ms-meta-data*
+ - x-ms-meta-target*
+ - x-ms-meta-abc
+ exposed_headers:
+ - x-ms-meta-*
+ max_age_in_seconds: 200
+ tags:
+ test: test
+ galaxy: galaxy
+ https_only: no
+ network_acls:
+ bypass: AzureServices
+ default_action: Deny
+ ip_rules:
+ - value: '9.9.9.9'
+ action: Allow
+ register: output
+
+ - name: Assert status succeeded and results include an Id value
+ assert:
+ that:
+ - output.changed
+ - output.state.id is defined
+ - output.state.blob_cors | length == 1
+ - not output.state.https_only
+ - output.state.network_acls.bypass == "AzureServices"
+ - output.state.network_acls.default_action == "Deny"
+ - output.state.network_acls.ip_rules | length == 1
+
+ - name: Create new storage account (idempotence)
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ account_type: Standard_LRS
+ append_tags: no
+ blob_cors:
+ - allowed_origins:
+ - http://www.example.com/
+ allowed_methods:
+ - GET
+ - POST
+ allowed_headers:
+ - x-ms-meta-data*
+ - x-ms-meta-target*
+ - x-ms-meta-abc
+ exposed_headers:
+ - x-ms-meta-*
+ max_age_in_seconds: 200
+ tags:
+ test: test
+ galaxy: galaxy
+ https_only: no
+ network_acls:
+ bypass: AzureServices
+ default_action: Deny
+ ip_rules:
+ - value: '9.9.9.9'
+ action: Allow
+ register: output
+
+ - assert:
+ that:
+ - not output.changed
+
+ - name: Gather facts by tags
+ azure_rm_storageaccount_info:
+ resource_group: "{{ resource_group }}"
+ tags:
+ - test
+ - galaxy
+ register: output
+
+ - assert:
+ that: output.storageaccounts | length >= 1
+
+ - name: Change account type
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ account_type: Premium_LRS
+ register: change_account
+ ignore_errors: yes
+
+ - name: Assert account type change failed
+ assert: { that: "change_account['failed'] == True" }
+
+ - name: Change account type and add custom domain
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ account_type: Standard_GRS
+ custom_domain: { name: ansible.com, use_sub_domain: no }
+ register: change_account
+ ignore_errors: yes
+
+ - name: Assert CNAME failure
+ assert: { that: "'custom domain name could not be verified' in change_account['msg']" }
+
+ - name: Update account tags
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ append_tags: no
+ tags:
+ testing: testing
+ delete: never
+ register: output
+
+ - assert:
+ that:
+ - "output.state.tags | length == 2"
+ - "output.state.tags.testing == 'testing'"
+ - "output.state.tags.delete == 'never'"
+
+ - name: Update account minimum tls version
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ minimum_tls_version: "TLS1_2"
+ register: output
+
+ - name: Assert status succeeded and results include an Id value
+ assert:
+ that:
+ - output.changed
+ - output.state.minimum_tls_version == "TLS1_2"
+
+ - name: Update account blob public access
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ allow_blob_public_access: true
+ register: output
+
+ - name: Assert status succeeded and results include an Id value
+ assert:
+ that:
+ - output.changed
+ - output.state.allow_blob_public_access == true
+
+ - name: Gather facts
+ azure_rm_storageaccount_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ show_connection_string: True
+ show_blob_cors: True
+ register: output
+
+ - assert:
+ that:
+ - "output.storageaccounts | length == 1"
+ - not output.storageaccounts[0].custom_domain
+ - output.storageaccounts[0].account_type == "Standard_GRS"
+ - output.storageaccounts[0].primary_endpoints.blob.connectionstring
+ - output.storageaccounts[0].blob_cors
+ - output.storageaccounts[0].minimum_tls_version == "TLS1_2"
+ - output.storageaccounts[0].allow_blob_public_access == true
+ #- output.storageaccounts[0].https_only
+ #- output.storageaccounts[0].network_acls.bypass == "AzureServices"
+ #- output.storageaccounts[0].network_acls.default_action == "Deny"
+ #- output.storageaccounts[0].network_acls.ip_rules | length == 1
+
+ - name: Gather facts
+ azure_rm_storageaccount_info:
+ resource_group: "{{ resource_group }}"
+ register: output
+
+ - assert:
+ that:
+ - "output.storageaccounts | length > 0"
+
+ - name: Delete acccount
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ state: absent
+ force_delete_nonempty: True
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/aliases
new file mode 100644
index 00000000..e8239543
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group2
+destructive
+unstable
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/files/Ratings.png b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/files/Ratings.png
new file mode 100644
index 00000000..8dd3e3db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/files/Ratings.png
Binary files differ
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/tasks/main.yml
new file mode 100644
index 00000000..8137738d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_storageblob/tasks/main.yml
@@ -0,0 +1,119 @@
+- name: Create storage account name
+ set_fact:
+ storage_account: "sb{{ resource_group | hash('md5') | truncate(22, True, '') }}"
+
+- name: Create storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ account_type: Standard_LRS
+
+- name: Create container
+ azure_rm_storageblob:
+ resource_group: "{{ resource_group }}"
+ account_name: "{{ storage_account }}"
+ container_name: my-blobs
+
+- name: Force upload blob
+ azure_rm_storageblob:
+ resource_group: "{{ resource_group }}"
+ account_name: "{{ storage_account }}"
+ container_name: my-blobs
+ blob: 'Ratings.png'
+ src: './targets/azure_rm_storageblob/files/Ratings.png'
+ content_type: image/png
+ tags:
+ val1: foo
+ val2: bar
+ force: yes
+
+- name: storage blob seems to have some timing issues
+ wait_for:
+ delay: 10
+
+- name: Upload blob idempotence
+ azure_rm_storageblob:
+ resource_group: "{{ resource_group }}"
+ account_name: "{{ storage_account }}"
+ container_name: my-blobs
+ blob: 'Ratings.png'
+ src: './targets/azure_rm_storageblob/files/Ratings.png'
+ content_type: image/png
+ tags:
+ val1: foo
+ val2: bar
+ register: upload_facts
+
+- assert:
+ that: "not upload_facts.changed"
+
+- name: Download file idempotence
+ azure_rm_storageblob:
+ resource_group: "{{ resource_group }}"
+ account_name: "{{ storage_account }}"
+ container_name: my-blobs
+ blob: 'Ratings.png'
+ dest: './targets/azure_rm_storageblob/files/Ratings.png'
+ register: download_results
+
+- assert:
+ that: not download_results.changed
+
+- file: path="/tmp/Ratings.png" state=absent
+
+- name: Download file
+ azure_rm_storageblob:
+ resource_group: "{{ resource_group }}"
+ account_name: "{{ storage_account }}"
+ container_name: my-blobs
+ blob: 'Ratings.png'
+ dest: '/tmp/Ratings.png'
+ register: download_results
+
+- assert:
+ that: "download_results.changed"
+
+- find: paths='/tmp' patterns="Ratings.png"
+ register: find_results
+
+- assert: { that: "find_results['matched'] == 1" }
+
+- name: Do not delete container that has blobs
+ azure_rm_storageblob:
+ resource_group: "{{ resource_group }}"
+ account_name: "{{ storage_account }}"
+ container_name: my-blobs
+ state: absent
+ register: output
+
+- assert:
+ that: "not output.changed"
+
+- name: Delete blob object
+ azure_rm_storageblob:
+ resource_group: "{{ resource_group }}"
+ account_name: "{{ storage_account }}"
+ container_name: my-blobs
+ blob: "Ratings.png"
+ state: absent
+ register: output
+
+- assert:
+ that: "output.changed"
+
+- name: Delete container
+ azure_rm_storageblob:
+ resource_group: "{{ resource_group }}"
+ account_name: "{{ storage_account }}"
+ container_name: my-blobs
+ state: absent
+ register: output
+
+- assert:
+ that: "output.changed"
+
+- name: Delete storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/aliases
new file mode 100644
index 00000000..aa77c071
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group2
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/tasks/main.yml
new file mode 100644
index 00000000..8d143bcb
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subnet/tasks/main.yml
@@ -0,0 +1,319 @@
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ name: My_Virtual_Network
+ address_prefixes_cidr:
+ - 10.1.0.0/16
+ - 172.100.0.0/16
+ - fdda:e69b:1587:495e::/64
+ dns_servers:
+ - 127.0.0.1
+ - 127.0.0.3
+ tags:
+ testing: testing
+ delete: on-exit
+ resource_group: "{{ resource_group }}"
+
+- name: Create route table
+ azure_rm_routetable:
+ name: routetableforsubnet
+ resource_group: "{{ resource_group }}"
+ register: route_table
+
+- name: Remove subnet
+ azure_rm_subnet:
+ state: absent
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+
+- name: Catch invalid cidr
+ azure_rm_subnet:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0/24"
+ register: output
+ ignore_errors: yes
+
+- assert:
+ that: output.failed
+
+- name: Add the subnet back
+ azure_rm_subnet:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0.0/24"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.state.address_prefix == "10.1.0.0/24"
+
+- name: Add the subnet back (idempontent)
+ azure_rm_subnet:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Create network security group
+ azure_rm_securitygroup:
+ name: secgroupfoo
+ resource_group: "{{ resource_group }}"
+ tags:
+ testing: testing
+
+- name: Update the subnet
+ azure_rm_subnet:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0.0/16"
+ security_group: secgroupfoo
+ service_endpoints:
+ - service: Microsoft.Sql
+ locations:
+ - eastus
+ - westus
+
+- name: Should be idempotent
+ azure_rm_subnet:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0.0/16"
+ service_endpoints:
+ - service: Microsoft.Sql
+ locations:
+ - eastus
+ - westus
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Able to completely remove service endpoints
+ azure_rm_subnet:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0.0/16"
+ service_endpoints: []
+ register: output
+
+- assert:
+ that: output.state.service_endpoints is not defined
+
+- name: Create network security group in another resource group
+ azure_rm_securitygroup:
+ name: secgroupfoo
+ resource_group: "{{ resource_group_secondary }}"
+ register: nsg
+
+- name: Update the subnet
+ azure_rm_subnet:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0.0/16"
+ route_table: "{{ route_table.id }}"
+ security_group:
+ name: secgroupfoo
+ resource_group: "{{ resource_group_secondary }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.state.network_security_group.id == nsg.state.id
+
+- name: Update the subnet (idempotent)
+ azure_rm_subnet:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefix_cidr: "10.1.0.0/16"
+ security_group: "{{ nsg.state.id }}"
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Create subnet with IPv4 and IPv6
+ azure_rm_subnet:
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefixes_cidr:
+ - "172.100.0.0/16"
+ - "fdda:e69b:1587:495e::/64"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - not output.state.address_prefix
+ - output.state.address_prefixes
+
+- name: Update the subnet to IPv4 and IPv6 (idempotent)
+ azure_rm_subnet:
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefixes_cidr:
+ - "172.100.0.0/16"
+ - "fdda:e69b:1587:495e::/64"
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Update the subnet's IPv4 and IPv6 address
+ azure_rm_subnet:
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ address_prefixes_cidr:
+ - "172.100.0.0/24"
+ - "fdda:e69b:1587:495e::/64"
+ security_group: "{{ nsg.state.id }}"
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Update the subnet with network policies
+ azure_rm_subnet:
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ private_link_service_network_policies: Disabled
+ private_endpoint_network_policies: Enabled
+ register: output
+
+- assert:
+ that: output
+
+- name: The subnet with network policies should be idempotent
+ azure_rm_subnet:
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ private_link_service_network_policies: Disabled
+ private_endpoint_network_policies: Enabled
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Update the subnet with delegations
+ azure_rm_subnet:
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ delegations:
+ - name: 'mydeleg'
+ serviceName: 'Microsoft.ContainerInstance/containerGroups'
+ register: output
+
+- assert:
+ that: output
+
+- name: The subnet with delegations should be idempotent
+ azure_rm_subnet:
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ delegations:
+ - name: 'mydeleg'
+ serviceName: 'Microsoft.ContainerInstance/containerGroups'
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Get subnet facts
+ azure_rm_subnet_info:
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.subnets[0]['id'] != None
+ - output.subnets[0]['resource_group'] != None
+ - output.subnets[0]['virtual_network_name'] != None
+ - output.subnets[0]['name'] != None
+ - not output.subnets[0]['address_prefix_cidr']
+ - output.subnets[0]['address_prefixes_cidr'] != None
+ - output.subnets[0]['security_group'] != None
+ - output.subnets[0]['provisioning_state'] != None
+ - output.subnets[0]['private_endpoint_network_policies'] != None
+ - output.subnets[0]['private_link_service_network_policies'] != None
+ - output.subnets[0]['delegations'] != None
+
+- name: Get subnet facts
+ azure_rm_subnet_info:
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - output.changed == False
+ - output.subnets[0]['id'] != None
+ - output.subnets[0]['resource_group'] != None
+ - output.subnets[0]['virtual_network_name'] != None
+ - output.subnets[0]['name'] != None
+ - output.subnets[0]['route_table'] != None
+ - output.subnets[0]['address_prefix_cidr'] != None
+ - output.subnets[0]['security_group'] != None
+ - output.subnets[0]['provisioning_state'] != None
+
+- name: Remove subnet
+ azure_rm_subnet:
+ state: absent
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+
+- name: Remove subnet (idempotent)
+ azure_rm_subnet:
+ state: absent
+ name: foobar
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Remove subnet
+ azure_rm_subnet:
+ state: absent
+ name: foobar01
+ virtual_network_name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+
+- name: Remove security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: secgroupfoo
+ state: absent
+
+- name: Remove virtual network
+ azure_rm_virtualnetwork:
+ name: My_Virtual_Network
+ resource_group: "{{ resource_group }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/aliases
new file mode 100644
index 00000000..aa77c071
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group2
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/tasks/main.yml
new file mode 100644
index 00000000..113cfe54
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_subscription/tasks/main.yml
@@ -0,0 +1,24 @@
+- name: Get list of all subscriptions
+ azure_rm_subscription_info:
+ all: True
+ register: az_all_subscriptions
+
+- name: Get a subscription by id
+ azure_rm_subscription_info:
+ id: "{{ az_all_subscriptions.subscriptions[0].subscription_id }}"
+
+- name: Get a subscription by name
+ azure_rm_subscription_info:
+ name: "{{ az_all_subscriptions.subscriptions[0].display_name }}"
+
+- name: Test invalid name id combo
+ azure_rm_subscription_info:
+ name: "{{ az_all_subscriptions.subscriptions[0].display_name }}"
+ id: "{{ az_all_subscriptions.subscriptions[0].subscription_id }}"
+ register: invalid_name
+ ignore_errors: yes
+
+- name: Assert task failed
+ assert:
+ that:
+ - "invalid_name['failed'] == True"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/aliases
new file mode 100644
index 00000000..46c379ff
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group13
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/tasks/main.yml
new file mode 100644
index 00000000..865c56dc
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_trafficmanagerprofile/tasks/main.yml
@@ -0,0 +1,289 @@
+- name: Prepare random number
+ set_fact:
+ tmname: "tm{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ endpointname1: "ep1{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ endpointname2: "ep2{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+
+- name: Create a Traffic Manager profile(check mode)
+ azure_rm_trafficmanagerprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ location: global
+ profile_status: enabled
+ routing_method: performance
+ dns_config:
+ relative_name: "{{ tmname }}"
+ ttl: 60
+ monitor_config:
+ protocol: HTTPS
+ port: 80
+ path: '/'
+ check_mode: yes
+
+- name: Check there is no Traffic Manager profile created
+ azure_rm_trafficmanagerprofile_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ register: fact
+
+- name: Check there is no Traffic Manager profile created
+ assert: { that: "{{ fact.tms | length }} == 0" }
+
+- name: Create a Traffic Manager profile
+ azure_rm_trafficmanagerprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ location: global
+ profile_status: enabled
+ routing_method: performance
+ dns_config:
+ relative_name: "{{ tmname }}"
+ ttl: 60
+ monitor_config:
+ protocol: HTTPS
+ port: 80
+ path: '/'
+ register: tm
+
+- name: Assert the Traffic Manager profile is well created
+ assert:
+ that:
+ - tm.changed
+
+- name: Gather Traffic Manager profile facts
+ azure_rm_trafficmanagerprofile_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ register: fact
+
+- name: Assert fact returns the created one
+ assert:
+ that:
+ - "fact.tms | length == 1"
+ - fact.tms[0].id == tm.id
+ - fact.tms[0].endpoints | length == 0
+
+- name: Create a Traffic Manager profile (idempotent)
+ azure_rm_trafficmanagerprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ location: global
+ profile_status: enabled
+ routing_method: performance
+ dns_config:
+ relative_name: "{{ tmname }}"
+ ttl: 60
+ monitor_config:
+ protocol: HTTPS
+ port: 80
+ path: '/'
+ register: output
+
+- name: Assert idempotent
+ assert:
+ that:
+ - not output.changed
+
+- name: Update the Traffic Manager profile
+ azure_rm_trafficmanagerprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ tags:
+ testing: testing
+ delete: on-exit
+ foo: bar
+ location: global
+ profile_status: disabled
+ routing_method: priority
+ dns_config:
+ relative_name: "{{ tmname }}"
+ ttl: 60
+ monitor_config:
+ protocol: HTTPS
+ port: 80
+ path: '/'
+ register: output
+
+- name: Assert the Traffic Manager profile is updated
+ assert:
+ that:
+ - output.changed
+
+- name: Create Traffic Manager endpoint(check mode)
+ azure_rm_trafficmanagerendpoint:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ name: "{{ endpointname1 }}"
+ type: external_endpoints
+ location: westus
+ priority: 2
+ weight: 1
+ target: 1.2.3.4
+ check_mode: yes
+ register: output
+
+- name: Assert check mode changed
+ assert:
+ that:
+ - output.changed
+
+- name: Get endpoint
+ azure_rm_trafficmanagerendpoint_info:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ register: facts
+
+- name: Check no endpoint created in check mode
+ assert:
+ that:
+ - facts.endpoints | length == 0
+
+- name: Create Traffic Manager endpoint
+ azure_rm_trafficmanagerendpoint:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ name: "{{ endpointname1 }}"
+ type: external_endpoints
+ location: westus
+ priority: 2
+ weight: 1
+ target: 1.2.3.4
+ register: output
+
+- name: Assert endpoint create changed
+ assert:
+ that:
+ - output.changed
+
+- name: Get endpoint
+ azure_rm_trafficmanagerendpoint_info:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ register: facts
+
+- name: Check endpoint created
+ assert:
+ that:
+ - facts.endpoints | length == 1
+ - facts.endpoints[0].name == "{{ endpointname1 }}"
+
+- name: Create second Traffic Manager endpoint
+ azure_rm_trafficmanagerendpoint:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ name: "{{ endpointname2 }}"
+ type: external_endpoints
+ location: westus
+ priority: 1
+ weight: 3
+ target: 4.3.2.1
+
+- name: Get endpoint
+ azure_rm_trafficmanagerendpoint_info:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ register: facts
+
+- name: Check 2 endpoint in profile
+ assert:
+ that:
+ - facts.endpoints | length == 2
+
+- name: Create endpoint (idempotent)
+ azure_rm_trafficmanagerendpoint:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ name: "{{ endpointname2 }}"
+ type: external_endpoints
+ location: westus
+ priority: 1
+ weight: 3
+ target: 4.3.2.1
+ register: output
+
+- name: Assert endpoint creation idempotent
+ assert:
+ that:
+ - output.changed == False
+
+- name: Delete second endpoint
+ azure_rm_trafficmanagerendpoint:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ name: "{{ endpointname2 }}"
+ type: external_endpoints
+ state: absent
+ register: output
+
+- name: Assert endpoint deletion changed
+ assert:
+ that:
+ - output.changed
+
+- name: Get endpoint
+ azure_rm_trafficmanagerendpoint_info:
+ resource_group: "{{ resource_group }}"
+ profile_name: "{{ tmname }}"
+ register: facts
+
+- name: Check 1 endpoint left in profile
+ assert:
+ that:
+ - facts.endpoints | length == 1
+
+- name: Delete the Traffic Manager profile(check mode)
+ azure_rm_trafficmanagerprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ state: absent
+ check_mode: yes
+
+- name: Gather Traffic Manager profile facts
+ azure_rm_trafficmanagerprofile_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ register: fact
+
+- name: Assert the traffic manager profile is still there
+ assert:
+ that:
+ - "fact.tms | length == 1"
+ - fact.tms[0].id == tm.id
+ - fact.tms[0].endpoints | length == 1
+
+- name: Delete the Traffic Manager profile
+ azure_rm_trafficmanagerprofile:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ state: absent
+ register: output
+
+- name: Assert the Traffic Manager profile is well deleted
+ assert:
+ that:
+ - output.changed
+
+- name: Get Traffic Manager profile fact
+ azure_rm_trafficmanagerprofile_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ tmname }}"
+ register: fact
+
+- name: Assert fact returns empty
+ assert:
+ that:
+ - "fact.tms | length == 0"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/aliases
new file mode 100644
index 00000000..7611d826
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group7
+destructive
+azure_rm_virtualmachine_info
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/inventory.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/inventory.yml
new file mode 100644
index 00000000..acd98ebf
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/inventory.yml
@@ -0,0 +1,66 @@
+all:
+ hosts:
+ azure_test_invalid:
+ azure_test_public_ip:
+ network: 10.42.0.0/24
+ subnet: 10.42.0.0/28
+
+ azure_test_no_public_ip:
+ network: 10.42.1.0/24
+ subnet: 10.42.1.0/28
+
+ azure_test_deallocate:
+ network: 10.42.2.0/24
+ subnet: 10.42.2.0/28
+
+ azure_test_minimal:
+ network: 10.42.3.0/24
+ subnet: 10.42.3.0/28
+
+ azure_test_dual_nic:
+ network: 10.42.4.0/24
+ subnet: 10.42.4.0/28
+ secondary_network: 10.42.5.0/24
+ secondary_subnet: 10.42.5.0/28
+ nic_list:
+ - name: "{{ 'int' ~ uid_short ~ '-1' }}"
+ resource_group: "{{ resource_group_secondary }}"
+ - name: "{{ 'int' ~ uid_short ~ '-2' }}"
+ resource_group: "{{ resource_group_secondary }}"
+
+ vars:
+ ansible_connection: local
+ ansible_python_interpreter: "{{ ansible_playbook_python }}"
+
+ uid: "{{ (resource_group ~ inventory_hostname) | hash('md5') | truncate(18, True, '') }}"
+ uid_short: "{{ (resource_group ~ inventory_hostname) | hash('md5') | truncate(10, True, '') }}"
+
+ storage_account: "{{ 'stor' ~ uid }}"
+ availability_set: "{{ 'avbs' ~ uid_short }}"
+ vm_name: "{{ 'vm' ~ uid_short }}"
+ network_name: "{{ 'vnet' ~ uid_short }}"
+ subnet_name: "{{ 'snet' ~ uid_short }}"
+ security_group: "{{ 'sg' ~ uid_short }}"
+ public_ip_name: "{{ 'ip' ~ uid_short }}"
+ interface_name: "{{ 'int' ~ uid_short }}"
+
+ ssh_keys:
+ - path: '/home/chouseknecht/.ssh/authorized_keys'
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1igsIlcmTa/yfsJnTtnrEX7PP/a01gwbXcig6JOKyrUmJB8E6c/wtZwP115VSyDRTO6TEL/sBFUpkSw01zM8ydNATErh8meBlAlbnDq5NLhDXnMizgG0VNn0iLc/WplFTqkefsHXa8NtIxAtyEVIj/fKbK3XfBOdEpE3+MJYNtGlWyaod28W+5qmQPZDQys+YnE4OjSwN7D3g85/7dtLFvDH+lEC4ooJOaxVFr9VSMXUIkaRF6oI+R1Zu803LFSCTb4BfFOYOHPuQ/rEMP0KuUzggvP+TEBY14PEA2FoHOn+oRsT0ZR2+loGRaxSVqCQKaEHbNbkm+6Rllx2NQRO0BJxCSKRU1iifInLPxmSc4gvsHCKMAWy/tGkmKHPWIfN8hvwyDMK5MNBp/SJ1pVx4xuFDQjVWNbll0yk2+72uJgtFHHwEPK9QsOz45gX85vS3yhYCKrscS/W9h2l36SWwQXuGy4fXotE7esPsvNGAzBndHX1O8RMPg47qJXz059RyoGforoa9TnzIs3hIv+ts7ESx3OEq3HNk0FJ+wDka7IM7WQpGrVToJ0vfDy9Q46nw54vv5Zc/u4OZF3F5twHmyf3rLYKXRDuCvZQKT2iWQKVX6j63bq6orA5hwl22zndxWZNtOwtq8Sd0Ns0K/Fo/ggYDDGBtr68DwhA+MrxrHw== chouseknecht@ansible.com"
+
+ image:
+ offer: CentOS
+ publisher: OpenLogic
+ sku: '7.1'
+ version: latest
+
+ image_paid:
+ publisher: cognosys
+ offer: ubuntu-14-04-lts
+ sku: hardened-ubuntu-14-04
+ version: latest
+
+ plan_paid:
+ name: hardened-ubuntu-14-04
+ product: ubuntu-14-04-lts
+ publisher: cognosys
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/main.yml
new file mode 100644
index 00000000..7722487b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/main.yml
@@ -0,0 +1,7 @@
+- name: Run Azurue VM tests in parallel
+ hosts: all
+ gather_facts: no
+ strategy: free
+ tasks:
+ - name: Include tasks based on inventory hostname
+ include_tasks: tasks/{{ inventory_hostname }}.yml
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/runme.sh b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/runme.sh
new file mode 100755
index 00000000..c7895c9d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/runme.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+set -eux
+
+ansible-playbook -i inventory.yml main.yml "$@"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_deallocate.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_deallocate.yml
new file mode 100644
index 00000000..be1e8839
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_deallocate.yml
@@ -0,0 +1,93 @@
+- include_tasks: setup.yml
+
+- name: Create minimal VM with defaults
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ admin_username: "testuser"
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_A0
+ virtual_network: "{{ network_name }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: vm_output
+
+- name: Restart the virtual machine
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ restarted: yes
+ vm_size: Standard_A0
+ register: restart_result
+
+- name: Ensue VM was restarted
+ assert:
+ that:
+ - "azure_vm.powerstate in ['starting', 'running']"
+ - restart_result is changed
+
+- name: Deallocate the virtual machine
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ allocated: no
+ vm_size: Standard_A0
+ register: deallocate_result
+
+- name: Ensure VM was deallocated
+ assert:
+ that:
+ - azure_vm.powerstate == 'deallocated'
+ - deallocate_result is changed
+
+- name: Start the virtual machine
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ vm_size: Standard_A0
+ register: start_result
+
+- name: Ensure VM was started
+ assert:
+ that:
+ - "azure_vm.powerstate in ['starting', 'running']"
+ - start_result is changed
+
+- name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ state: absent
+ remove_on_absent: all_autocreated
+
+- name: Destroy subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ virtual_network: "{{ network_name }}"
+ name: "{{ subnet_name }}"
+ state: absent
+
+- name: Destroy virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ network_name }}"
+ state: absent
+
+- name: Destroy availability set
+ azure_rm_availabilityset:
+ resource_group: "{{ resource_group }}"
+ name: "{{ availability_set }}"
+ state: absent
+
+- name: Destroy storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ force_delete_nonempty: yes
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_dual_nic.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_dual_nic.yml
new file mode 100644
index 00000000..7bc07d49
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_dual_nic.yml
@@ -0,0 +1,137 @@
+- include_tasks: setup.yml
+
+- name: Create virtual network in secondary resource group
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ network_name ~ '-2' }}"
+ address_prefixes: "{{ secondary_network }}"
+ register: create_virt_net_result
+
+- name: Create subnet in secondary resource group
+ azure_rm_subnet:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ subnet_name ~ '-2' }}"
+ address_prefix: "{{ secondary_subnet }}"
+ virtual_network: "{{ network_name ~ '-2' }}"
+
+- name: Create NICs for dual NIC VM in secondary resource group
+ azure_rm_networkinterface:
+ resource_group: "{{ item.resource_group }}"
+ name: "{{ item.name }}"
+ virtual_network: "{{ network_name ~ '-2' }}"
+ subnet: "{{ subnet_name ~ '-2' }}"
+ loop: "{{ nic_list }}"
+
+- name: Create virtual machine with two NICs
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}" # Should this be resource_group_secondary?
+ name: "{{ vm_name }}"
+ vm_size: Standard_A0
+ storage_account: "{{ storage_account }}"
+ storage_container: "{{ vm_name }}"
+ storage_blob: "{{ vm_name }}.vhd"
+ admin_username: adminuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/adminuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ short_hostname: testvm
+ os_type: Linux
+ os_disk_size_gb: 64
+ os_disk_name: testosdiskxx
+ network_interfaces: "{{ nic_list }}"
+ availability_set: "{{ availability_set }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ tags:
+ abc: def
+
+- name: Ensure VM was created properly
+ assert:
+ that:
+ - azure_vm.properties.availabilitySet.id
+ - azure_vm.properties.storageProfile.osDisk.name == 'testosdiskxx'
+
+- name: Retrieve VM facts (filtering by name)
+ azure_rm_virtualmachine_info:
+ resource_group: "{{ resource_group }}" # Should this be resource_group_secondary?
+ name: "{{ vm_name }}"
+ register: vm_facts_results
+
+- name: Ensure facts module returned the second VM
+ assert:
+ that:
+ - vm_facts_results.vms | length == 1
+ - vm_facts_results.vms[0].name == "{{ vm_name }}"
+ - vm_facts_results.vms[0].location
+ - vm_facts_results.vms[0].admin_username == 'adminuser'
+ - vm_facts_results.vms[0].resource_group == "{{ resource_group }}"
+ - vm_facts_results.vms[0].power_state != None
+
+- name: Retrieve facts by tags
+ azure_rm_virtualmachine_info:
+ tags:
+ - abc:def
+ register: facts_by_tags_results
+
+- name: Assert that facts module returned the second VM
+ assert:
+ that:
+ - facts_by_tags_results.vms | length >= 1
+
+- name: Should be idempotent with a dual NICs
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}" # Should this be resource_group_secondary?
+ name: "{{ vm_name }}"
+ vm_size: Standard_A0
+ storage_account: "{{ storage_account }}"
+ storage_container: "{{ vm_name }}"
+ storage_blob: "{{ vm_name }}.vhd"
+ admin_username: adminuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/adminuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ short_hostname: testvm
+ os_type: Linux
+ os_disk_size_gb: 64
+ network_interfaces: "{{ nic_list }}"
+ availability_set: "{{ availability_set }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: dual_nics_result
+
+- name: Ensure nothing changed
+ assert:
+ that: dual_nics_result is not changed
+
+- name: Generalize VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}" # Should this be resource_group_secondary?
+ name: "{{ vm_name }}"
+ generalized: yes
+
+- name: Gather facts and check if machine is generalized
+ azure_rm_virtualmachine_info:
+ resource_group: "{{ resource_group }}" # Should this be resource_group_secondary?
+ name: "{{ vm_name }}"
+ register: generalized_output
+
+- name: Ensure power state is generalized
+ assert:
+ that: generalized_output.vms[0].power_state == 'generalized'
+
+- name: Delete dual NIC VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}" # Should this be resource_group_secondary?
+ name: "{{ vm_name }}"
+ state: absent
+ vm_size: Standard_A0
+ async: 5000
+ poll: 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_ephemeral_os.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_ephemeral_os.yml
new file mode 100644
index 00000000..884a33db
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_ephemeral_os.yml
@@ -0,0 +1,113 @@
+- include_tasks: setup.yml
+
+- name: Create minimal VM with defaults
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ admin_username: "testuser"
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_DS2_v2
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: vm_output
+
+- name: Generalize VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ generalized: yes
+
+- name: Create an image from VM
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ source: "{{ vm_name }}"
+ name: testimage
+ os_type: Linux
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Create virtual machine ephmeral OS disk
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}-02"
+ admin_username: "testuser"
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_DS2_v2
+ os_disk_caching: ReadOnly
+ ephemeral_os_disk: True
+ image: testimage
+ register: output
+
+- assert:
+ that:
+ - output.changed
+ - output.ansible_facts.azure_vm.properties.storageProfile.osDisk.diffDiskSettings.option == 'Local'
+
+- name: Check virtual machine ephmeral OS disk idempotent
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}-02"
+ admin_username: "testuser"
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_DS2_v2
+ os_disk_caching: ReadOnly
+ ephemeral_os_disk: True
+ image: testimage
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Check virtual machine ephmeral OS disk can't update
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}-02"
+ admin_username: "testuser"
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_DS2_v2
+ os_disk_caching: ReadOnly
+ ephemeral_os_disk: False
+ image: testimage
+ ignore_errors: yes
+ register: ouput
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ state: absent
+
+- name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}-02"
+ state: absent
+
+- name: Create an image from VM
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ name: testimage
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_invalid.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_invalid.yml
new file mode 100644
index 00000000..86ec72de
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_invalid.yml
@@ -0,0 +1,35 @@
+# TODO: Until we have a module to create/delete images this is the best tests I can do
+- name: Assert error thrown with invalid image dict
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ image:
+ offer: UbuntuServer
+ register: fail_invalid_image_dict
+ failed_when: 'fail_invalid_image_dict.msg != "parameter error: expecting image to contain [publisher, offer, sku, version], [name, resource_group] or [id]"'
+
+- name: Assert error thrown with invalid image type
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ image:
+ - testing
+ register: fail_invalid_image_type
+ failed_when: 'fail_invalid_image_type.msg != "parameter error: expecting image to be a string or dict not list"'
+
+- name: Assert error finding missing custom image
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ image: invalid-image
+ register: fail_missing_custom_image
+ failed_when: fail_missing_custom_image.msg != "Error could not find image with name invalid-image"
+
+- name: Assert error finding missing custom image (dict style)
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ image:
+ name: invalid-image
+ register: fail_missing_custom_image_dict
+ failed_when: fail_missing_custom_image_dict.msg != "Error could not find image with name invalid-image"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_minimal.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_minimal.yml
new file mode 100644
index 00000000..5e440245
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_minimal.yml
@@ -0,0 +1,121 @@
+- include_tasks: setup.yml
+
+# # Tests possible when CI user acccount setup with required authority
+# - name: Create virtual machine with image and plan which requires acceptance of terms
+# azure_rm_virtualmachine:
+# resource_group: "{{ resource_group }}"
+# name: testvm009
+# vm_size: Standard_A0
+# storage_account: "{{ storage_account }}"
+# storage_container: testvm001
+# storage_blob: testvm003.vhd
+# admin_username: adminuser
+# admin_password: Password123!
+# short_hostname: testvm
+# os_type: Linux
+# availability_set: "{{ availability_set }}"
+# image: "{{ image_paid }}"
+# plan_paid: "{{ plan_paid }}"
+# register: create_image_plan_result
+
+# - assert:
+# that:
+# - create_image_plan_result is changed
+# - create_image_plan_result.ansible_facts.azure_vm.properties.storageProfile.imageReference.publisher == image_paid.publisher
+
+# - name: Should be idempotent with image and plan which requires acceptance of terms
+# azure_rm_virtualmachine:
+# resource_group: "{{ resource_group }}"
+# name: testvm009
+# vm_size: Standard_A0
+# storage_account: "{{ storage_account }}"
+# storage_container: testvm001
+# storage_blob: testvm003.vhd
+# admin_username: adminuser
+# admin_password: Password123!
+# short_hostname: testvm
+# os_type: Linux
+# availability_set: "{{ availability_set }}"
+# image: "{{ image_paid }}"
+# plan_paid: "{{ plan_paid }}"
+# register: create_image_plan_again_result
+
+# - assert:
+# that: create_image_plan_again is not changed
+
+- name: Create minimal VM with defaults
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ admin_username: "testuser"
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_B1ms
+ virtual_network: "{{ network_name }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: vm_output
+
+- name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ remove_on_absent: all_autocreated
+ state: absent
+
+- name: Query auto created NIC
+ azure_rm_networkinterface_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}01"
+ register: nic_result
+
+- name: Query auto created security group
+ azure_rm_securitygroup_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}01"
+ register: nsg_result
+
+- name: Query auto created public IP
+ azure_rm_publicipaddress_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}01"
+ register: pip_result
+
+- name: Assert that autocreated resources were deleted
+ assert:
+ that:
+ # what about the default storage group?
+ - nic_result.networkinterfaces | length == 0
+ - nsg_result.securitygroups | length == 0
+ - pip_result.publicipaddresses | length == 0
+
+- name: Destroy subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ virtual_network: "{{ network_name }}"
+ name: "{{ subnet_name }}"
+ state: absent
+
+- name: Destroy virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ network_name }}"
+ state: absent
+
+- name: Destroy availability set
+ azure_rm_availabilityset:
+ resource_group: "{{ resource_group }}"
+ name: "{{ availability_set }}"
+ state: absent
+
+- name: Destroy storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ force_delete_nonempty: yes
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_no_public_ip.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_no_public_ip.yml
new file mode 100644
index 00000000..07585cf7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_no_public_ip.yml
@@ -0,0 +1,44 @@
+- include_tasks: setup.yml
+
+- name: Create virtual machine without public ip address and with boot diagnostics enabled
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ vm_size: Standard_A0
+ admin_username: adminuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/adminuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ short_hostname: testvm
+ os_type: Linux
+ public_ip_allocation_method: Disabled
+ storage_account_name: "{{ storage_account }}"
+ availability_set: "{{ availability_set }}"
+ virtual_network: "{{ network_name }}"
+ boot_diagnostics:
+ enabled: yes
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: create_vm_public_result
+
+- name: Ensure VM was created properly
+ assert:
+ that:
+ - azure_vm.properties.diagnosticsProfile.bootDiagnostics.enabled
+ - azure_vm.properties.diagnosticsProfile.bootDiagnostics.storageUri is defined
+ - azure_vm.properties.instanceView.bootDiagnostics.consoleScreenshotBlobUri is defined
+ - azure_vm.properties.instanceView.bootDiagnostics.serialConsoleLogBlobUri is defined
+ - not 'publicIPAddress' in create_vm_public_result.ansible_facts.azure_vm.properties.networkProfile.networkInterfaces[0].properties.ipConfigurations[0].properties
+
+- name: Delete VM with no public ip
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ state: absent
+ remove_on_absent: all_autocreated
+ async: 5000
+ poll: 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_public_ip.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_public_ip.yml
new file mode 100644
index 00000000..b7138945
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/azure_test_public_ip.yml
@@ -0,0 +1,322 @@
+- include_tasks: setup.yml
+
+- name: Create public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Static
+ name: "{{ public_ip_name }}"
+
+- name: Create security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ security_group }}"
+ purge_rules: yes
+ rules:
+ - name: ALLOW_SSH
+ protocol: Tcp
+ destination_port_range: 22
+ access: Allow
+ priority: 100
+ direction: Inbound
+
+ - name: ALLOW_HTTP
+ protocol: Tcp
+ destination_port_range: 80
+ access: Allow
+ priority: 110
+ direction: Inbound
+
+- name: Create network interface
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "{{ interface_name }}"
+ virtual_network: "{{ network_name }}"
+ subnet: "{{ subnet_name }}"
+ public_ip_name: "{{ public_ip_name }}"
+ security_group: "{{ security_group }}"
+
+- name: Create virtual machine with a single NIC and no boot diagnostics
+ register: output
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ vm_size: Standard_A0
+ storage_account: "{{ storage_account }}"
+ storage_container: "{{ vm_name }}"
+ storage_blob: "{{ vm_name }}.vhd"
+ admin_username: adminuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/adminuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ short_hostname: testvm
+ os_type: Linux
+ network_interfaces: "{{ interface_name }}"
+ availability_set: "{{ availability_set }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ custom_data: |
+ #!/bin/sh
+ echo "custom_data was executed" > /tmp/custom_data.txt
+
+- name: Ensure VM was created properly
+ assert:
+ that:
+ - azure_vm.properties.provisioningState == 'Succeeded'
+ - azure_vm.properties.availabilitySet.id
+ # initial response from creation has no diagnosticsProfile
+ # if you run it again however, there is one in the response
+ # so we handle both cases
+ - "'diagnosticsProfile' not in azure_vm.properties or not azure_vm.properties.diagnosticsProfile.bootDiagnostics.enabled"
+
+- name: Get facts for virtual machine without boot diagnostics disabled
+ azure_rm_virtualmachine_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ register: vm_facts_no_boot_diag_result
+
+- name: Ensure VM facts are correct
+ assert:
+ that:
+ - vm_facts_no_boot_diag_result.vms != []
+ - not vm_facts_no_boot_diag_result.vms[0].boot_diagnostics.enabled
+ - not vm_facts_no_boot_diag_result.vms[0].boot_diagnostics.storage_uri
+
+- name: Enable boot diagnostics on an existing VM for the first time without specifying a storage account
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ boot_diagnostics:
+ enabled: yes
+ # without specifying storage_account you get a new default storage account for the VM
+
+- name: Ensure VM properties are correct
+ assert:
+ that:
+ - azure_vm.properties.diagnosticsProfile.bootDiagnostics.enabled
+ - azure_vm.properties.diagnosticsProfile.bootDiagnostics.storageUri is defined
+ - azure_vm.properties.instanceView.bootDiagnostics.consoleScreenshotBlobUri is defined
+ - azure_vm.properties.instanceView.bootDiagnostics.serialConsoleLogBlobUri is defined
+
+- name: Get facts for virtual machine with boot diagnostics enabled
+ azure_rm_virtualmachine_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ register: vm_facts_boot_diag_result
+
+- name: Ensure VM facts were returned
+ assert:
+ that:
+ - vm_facts_boot_diag_result.vms != []
+ - vm_facts_boot_diag_result.vms[0].boot_diagnostics.enabled
+ - vm_facts_boot_diag_result.vms[0].boot_diagnostics.storage_uri is defined
+ - vm_facts_boot_diag_result.vms[0].boot_diagnostics.console_screenshot_uri is defined
+ - vm_facts_boot_diag_result.vms[0].boot_diagnostics.serial_console_log_uri is defined
+
+- name: Change the boot diagnostics storage account while enabled
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ boot_diagnostics:
+ enabled: yes
+ storage_account: "{{ storage_account }}"
+ ignore_errors: yes
+
+- name: Disable boot diagnostics and change the storage account at the same time
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ boot_diagnostics:
+ enabled: no
+ storage_account: "{{ storage_account }}"
+
+- name: Ensure boot diagnostics was disabled
+ assert:
+ that:
+ - not azure_vm.properties.diagnosticsProfile.bootDiagnostics.enabled
+
+- name: Re-enable boot diagnostics on an existing VM where it was previously configured
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ boot_diagnostics:
+ enabled: yes
+ register: reenable_boot_diag_result
+
+- name: Ensure boot diagnostics was reenabled
+ assert:
+ that:
+ - azure_vm.properties.diagnosticsProfile.bootDiagnostics.enabled
+ - azure_vm.properties.diagnosticsProfile.bootDiagnostics.storageUri is defined
+ - azure_vm.properties.instanceView.bootDiagnostics.consoleScreenshotBlobUri is defined
+ - azure_vm.properties.instanceView.bootDiagnostics.serialConsoleLogBlobUri is defined
+
+# - add_host:
+# name: new_azure_vm
+# ansible_host: '{{ reenable_boot_diag_result.ansible_facts.azure_vm.properties.networkProfile.networkInterfaces[0].properties.ipConfigurations[0].properties.publicIPAddress.properties.ipAddress }}'
+# ansible_connection: paramiko # not guaranteed to have sshpass...
+# ansible_user: adminuser
+# ansible_password: Password123!
+# ansible_host_key_checking: no
+
+# - name: wait for SSH port to be open
+# wait_for:
+# host: '{{ hostvars["new_azure_vm"].ansible_host }}'
+# port: 22
+# timeout: 60
+# state: started
+
+# # TODO: figure out how to make this work under ansible-test with the coverage injector
+# - block:
+# - name: wait for host to answer on SSH
+# delegate_to: new_azure_vm
+# wait_for_connection:
+
+# - name: get content from custom_data script
+# raw: cat /tmp/custom_data.txt
+# register: custom_data_content
+
+# - name: assert contents
+# assert:
+# that: custom_data_content.stdout | regex_search('custom_data was executed')
+# delegate_to: new_azure_vm
+
+# # TODO: figure out how to make this work under ansible-test with the coverage injector
+# - name: wait for file/content created by custom_data script
+# delegate_to: new_azure_vm
+# vars:
+# ansible_python_interpreter: python
+# wait_for:
+# path: /tmp/custom_data.txt
+# search_regex: ^custom_data was executed$
+# timeout: 20
+
+- name: Should be idempotent with a single NIC
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ vm_size: Standard_A0
+ storage_account: "{{ storage_account }}"
+ storage_container: "{{ vm_name }}"
+ storage_blob: "{{ vm_name }}.vhd"
+ admin_username: adminuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/adminuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ short_hostname: testvm
+ os_type: Linux
+ network_interfaces: "{{ interface_name }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: single_nic_result
+
+- name: Ensure nothing changed
+ assert:
+ that: single_nic_result is not changed
+
+- name: Resize VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ vm_size: Standard_A1
+ storage_account: "{{ storage_account }}"
+ storage_container: "{{ vm_name }}"
+ storage_blob: "{{ vm_name }}.vhd"
+ admin_username: adminuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/adminuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ short_hostname: testvm
+ os_type: Linux
+ network_interfaces: "{{ interface_name }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: resize_result
+
+- name: Esure VM was resized
+ assert:
+ that:
+ - resize_result is changed
+ - resize_result.ansible_facts.azure_vm.properties.hardwareProfile.vmSize == "Standard_A1"
+
+- name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ state: absent
+ vm_size: Standard_A0
+
+- name: NIC should be gone
+ azure_rm_networkinterface_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ interface_name }}"
+ register: output
+
+- name: Ensure NIC was removed
+ assert:
+ that: output.networkinterfaces | length == 0
+
+- name: Public IP should be gone
+ azure_rm_publicipaddress_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ public_ip_name }}"
+ register: output
+
+- name: Ensure public IP was removed
+ assert:
+ that: output.publicipaddresses | length == 0
+
+- name: Destroy NIC
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "{{ interface_name }}"
+ state: absent
+
+- name: Destroy security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: "{{ security_group }}"
+ state: absent
+
+- name: Destroy subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ virtual_network: "{{ network_name }}"
+ name: "{{ subnet_name }}"
+ state: absent
+
+- name: Destroy virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ network_name }}"
+ state: absent
+
+- name: Destroy public ip
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ name: "{{ public_ip_name }}"
+ state: absent
+
+- name: Destroy availability set
+ azure_rm_availabilityset:
+ resource_group: "{{ resource_group }}"
+ name: "{{ availability_set }}"
+ state: absent
+
+- name: Destroy storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ force_delete_nonempty: true
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/setup.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/setup.yml
new file mode 100644
index 00000000..f053cac0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachine/tasks/setup.yml
@@ -0,0 +1,26 @@
+- debug:
+ msg: "UID is {{ uid_short }}"
+
+- name: SETUP | Create storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ account_type: Standard_LRS
+
+- name: SETUP | Create availability set
+ azure_rm_availabilityset:
+ name: "{{ availability_set }}"
+ resource_group: "{{ resource_group }}"
+
+- name: SETUP | Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ network_name }}"
+ address_prefixes: "{{ network }}"
+
+- name: SETUP | Create subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: "{{ subnet_name }}"
+ address_prefix: "{{ subnet }}"
+ virtual_network: "{{ network_name }}"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/aliases
new file mode 100644
index 00000000..69418ea2
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/aliases
@@ -0,0 +1,5 @@
+cloud/azure
+shippable/azure/group5
+destructive
+unsupported
+azure_rm_virtualmachineextension_facts
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/tasks/main.yml
new file mode 100644
index 00000000..c60e5166
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineextension/tasks/main.yml
@@ -0,0 +1,183 @@
+- name: Create Random Storage Account Name
+ set_fact:
+ storage_account: "vme{{ resource_group | hash('md5') | truncate(21, True, '') }}"
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: testVnet1
+ address_prefixes: "10.0.0.0/16"
+
+- name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: testSubnet
+ address_prefix: "10.0.1.0/24"
+ virtual_network: testVnet1
+
+- name: Create public IP address
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Dynamic
+ name: testPublicIP
+
+- name: Create Network Security Group that allows SSH
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: testNetworkSecurityGroup
+ rules:
+ - name: SSH
+ protocol: Tcp
+ destination_port_range: 22
+ access: Allow
+ priority: 1001
+ direction: Inbound
+
+- name: Create virtual network interface card
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: testNIC
+ virtual_network: testVnet1
+ subnet: testSubnet
+ public_ip_name: testPublicIP
+ security_group_name: testNetworkSecurityGroup
+
+- name: create a storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ type: Standard_LRS
+
+- name: Create VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: testVM
+ vm_size: Standard_DS1_v2
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ network_interfaces: testNIC
+ storage_account_name: "{{ storage_account }}"
+ storage_container: osdisk
+ storage_blob: osdisk.vhd
+ os_disk_caching: ReadWrite
+ image:
+ offer: CoreOS
+ publisher: CoreOS
+ sku: Stable
+ version: latest
+
+- name: Create VM Extension
+ azure_rm_virtualmachineextension:
+ resource_group: "{{ resource_group }}"
+ name: testVMExtension
+ virtual_machine_name: testVM
+ publisher: Microsoft.Azure.Extensions
+ virtual_machine_extension_type: CustomScript
+ type_handler_version: 2.0
+ auto_upgrade_minor_version: true
+ settings: {"commandToExecute": "hostname"}
+ register: results
+
+- name: Assert that VM Extension ran
+ assert:
+ that: results.changed
+
+- name: Query extension
+ azure_rm_virtualmachineextension_info:
+ resource_group: "{{ resource_group }}"
+ name: testVMExtension
+ virtual_machine_name: testVM
+ register: results
+- name: Assert that facts are returned
+ assert:
+ that:
+ - results.changed == False
+ - results.extensions[0]['id'] != None
+ - results.extensions[0]['resource_group'] != None
+ - results.extensions[0]['virtual_machine_name'] != None
+ - results.extensions[0]['name'] != None
+ - results.extensions[0]['location'] != None
+ - results.extensions[0]['publisher'] != None
+ - results.extensions[0]['type'] != None
+ - results.extensions[0]['settings'] != None
+ - results.extensions[0]['auto_upgrade_minor_version'] != None
+ - results.extensions[0]['provisioning_state'] != None
+
+- name: List extensions
+ azure_rm_virtualmachineextension_info:
+ resource_group: "{{ resource_group }}"
+ virtual_machine_name: testVM
+ register: results
+- name: Assert that facts are returned
+ assert:
+ that:
+ - results.changed == False
+ - results.extensions[0]['id'] != None
+ - results.extensions[0]['resource_group'] != None
+ - results.extensions[0]['virtual_machine_name'] != None
+ - results.extensions[0]['name'] != None
+ - results.extensions[0]['location'] != None
+ - results.extensions[0]['publisher'] != None
+ - results.extensions[0]['type'] != None
+ - results.extensions[0]['settings'] != None
+ - results.extensions[0]['auto_upgrade_minor_version'] != None
+ - results.extensions[0]['provisioning_state'] != None
+
+- name: Delete VM Extension
+ azure_rm_virtualmachineextension:
+ resource_group: "{{ resource_group }}"
+ name: testVMExtension
+ virtual_machine_name: testVM
+ state: absent
+ publisher: Microsoft.Azure.Extensions
+ virtual_machine_extension_type: CustomScript
+ type_handler_version: 2.0
+ auto_upgrade_minor_version: true
+ settings: {"commandToExecute": "hostname"}
+ register: results
+
+- name: Assert that VM Extension deleted
+ assert:
+ that: results.changed
+
+- name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: testVM
+ state: absent
+ remove_on_absent: ['all']
+ vm_size: Standard_DS1_v2
+ admin_username: testuser
+ network_interfaces: testNIC
+ storage_container: osdisk
+ storage_blob: osdisk.vhd
+ os_disk_caching: ReadWrite
+ image:
+ offer: CoreOS
+ publisher: CoreOS
+ sku: Stable
+ version: latest
+
+- name: Delete a storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ type: Standard_LRS
+ state: absent
+ force_delete_nonempty: true
+
+- name: Delete Network Security Group that allows SSH
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: testNetworkSecurityGroup
+ state: absent
+
+- name: Delete virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: testVnet1
+ state: absent
+ address_prefixes: "10.0.0.0/16"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/aliases
new file mode 100644
index 00000000..9175999b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group3
+shippable/azure/smoketest
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/tasks/main.yml
new file mode 100644
index 00000000..5d16141d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachineimage_info/tasks/main.yml
@@ -0,0 +1,43 @@
+- name: set location
+ set_fact:
+ location: eastus
+
+- name: Get facts for a specific image
+ azure_rm_virtualmachineimage_info:
+ location: "{{ location }}"
+ publisher: OpenLogic
+ offer: CentOS
+ sku: '7.3'
+ version: '7.3.20170707'
+ register: output
+
+- assert:
+ that: output['vmimages'] | length == 1
+
+- name: List available versions
+ azure_rm_virtualmachineimage_info:
+ location: "{{ location }}"
+ publisher: OpenLogic
+ offer: CentOS
+ sku: '7.3'
+ register: output
+
+- assert:
+ that: output['vmimages'] | length > 0
+
+- name: List available offers
+ azure_rm_virtualmachineimage_info:
+ location: "{{ location }}"
+ publisher: OpenLogic
+ register: output
+
+- assert:
+ that: output['vmimages'] | length > 0
+
+- name: List available publishers
+ azure_rm_virtualmachineimage_info:
+ location: "{{ location }}"
+ register: output
+
+- assert:
+ that: output['vmimages'] | length > 0
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/aliases
new file mode 100644
index 00000000..7bb42511
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/aliases
@@ -0,0 +1,8 @@
+cloud/azure
+shippable/azure/group10
+destructive
+unsupported
+azure_rm_virtualmachinescaleset_facts
+azure_rm_virtualmachinescalesetinstance_facts
+azure_rm_virtualmachinescalesetextension
+azure_rm_virtualmachinescalesetextension_facts
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/tasks/main.yml
new file mode 100644
index 00000000..563c8a6d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualmachinescaleset/tasks/main.yml
@@ -0,0 +1,697 @@
+- name: Prepare random number
+ set_fact:
+ rpfx: "{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ run_once: yes
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: testVnet
+ address_prefixes: "10.0.0.0/16"
+
+- name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: testSubnet
+ address_prefix: "10.0.1.0/24"
+ virtual_network: testVnet
+
+- name: Create public IP address
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Static
+ name: testPublicIP
+
+- name: Create load balancer
+ azure_rm_loadbalancer:
+ resource_group: "{{ resource_group }}"
+ name: testLB
+ public_ip_address_name: testPublicIP
+
+- name: Create public IP address 1
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Static
+ name: testPublicIP1
+
+- name: Create load balancer 1
+ azure_rm_loadbalancer:
+ resource_group: "{{ resource_group }}"
+ name: testLB1
+ public_ip_address_name: testPublicIP1
+
+- name: Create network security group within same resource group of VMSS.
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: testNetworkSecurityGroup
+
+- name: Create network security group in different resource group of VMSS.
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group_secondary }}"
+ name: testNetworkSecurityGroup2
+
+- name: Create virtual network inteface cards for VM A and B
+ azure_rm_networkinterface:
+ resource_group: "{{ resource_group }}"
+ name: "vmforimage{{ rpfx }}nic"
+ virtual_network: testVnet
+ subnet: testSubnet
+
+- name: Create VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "vmforimage{{ rpfx }}"
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_B1ms
+ network_interfaces: "vmforimage{{ rpfx }}nic"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+- name: Generalize VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "vmforimage{{ rpfx }}"
+ generalized: yes
+- name: Create image A
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ name: testimagea
+ source: "vmforimage{{ rpfx }}"
+- name: Create image B
+ azure_rm_image:
+ resource_group: "{{ resource_group }}"
+ name: testimageb
+ source: "vmforimage{{ rpfx }}"
+- name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "vmforimage{{ rpfx }}"
+ state: absent
+
+- name: Create VMSS (check mode)
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}
+ vm_size: Standard_B1s
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ capacity: 1
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ load_balancer: testLB
+ upgrade_policy: Manual
+ tier: Standard
+ managed_disk_type: Standard_LRS
+ os_disk_caching: ReadWrite
+ image:
+ offer: CoreOS
+ publisher: CoreOS
+ sku: Stable
+ version: latest
+ data_disks:
+ - lun: 0
+ disk_size_gb: 64
+ caching: ReadWrite
+ managed_disk_type: Standard_LRS
+ register: results
+ check_mode: yes
+
+- name: Assert that VMSS can be created
+ assert:
+ that: results.changed
+
+- name: Get VMSS to assert no VMSS is created in check mode
+ azure_rm_virtualmachinescaleset_info:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}
+ format: curated
+ register: output_scaleset
+
+- name: Assert no VMSS created in check mode
+ assert:
+ that:
+ - output_scaleset.ansible_facts.azure_vmss | length == 0
+
+- name: Create VMSS
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}
+ vm_size: Standard_B1s
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ capacity: 1
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ upgrade_policy: Manual
+ load_balancer: testLB
+ tier: Standard
+ managed_disk_type: Standard_LRS
+ os_disk_caching: ReadWrite
+ custom_data: "#cloud-config"
+ image:
+ offer: CoreOS
+ publisher: CoreOS
+ sku: Stable
+ version: latest
+ data_disks:
+ - lun: 0
+ disk_size_gb: 64
+ caching: ReadWrite
+ managed_disk_type: Standard_LRS
+ scale_in_policy: "NewestVM"
+ register: results
+
+- name: Assert that VMSS was created
+ assert:
+ that: results.changed
+
+- name: Create VMSS -- test upgrade_policy idempotence and load balancer
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}
+ vm_size: Standard_B1s
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ capacity: 1
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ upgrade_policy: Automatic
+ load_balancer: testLB1
+ tier: Standard
+ managed_disk_type: Standard_LRS
+ os_disk_caching: ReadWrite
+ custom_data: "#cloud-config"
+ image:
+ offer: CoreOS
+ publisher: CoreOS
+ sku: Stable
+ version: latest
+ data_disks:
+ - lun: 0
+ disk_size_gb: 64
+ caching: ReadWrite
+ managed_disk_type: Standard_LRS
+ register: results
+
+- name: Assert that VMSS was created
+ assert:
+ that: results.changed
+
+- name: Retrieve scaleset facts
+ azure_rm_virtualmachinescaleset_info:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}
+ format: curated
+ register: output_scaleset
+
+- assert:
+ that:
+ - output_scaleset.vmss[0].load_balancer == "testLB1"
+
+- name: Retrieve scaleset VMs facts
+ azure_rm_virtualmachinescalesetinstance_info:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ register: instances
+
+- name: Assert that facts returned correctly
+ assert:
+ that:
+ - instances.instances | length == 1
+ - instances.instances[0].id != None
+ - instances.instances[0].name != None
+ - instances.instances[0].instance_id != None
+ - instances.instances[0].provisioning_state != None
+ - instances.instances[0].vm_id != None
+ - instances.instances[0].latest_model != None
+ - instances.instances[0].power_state != None
+
+- name: Get scaleset body
+ set_fact:
+ body: "{{ output_scaleset.vmss[0] }}"
+
+- name: Try to update VMSS using output as input
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ body.resource_group }}"
+ name: "{{ body.name }}"
+ vm_size: "{{ body.vm_size }}"
+ admin_username: "{{ body.admin_username }}"
+ ssh_password_enabled: "{{ body.ssh_password_enabled }}"
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ capacity: "{{ body.capacity }}"
+ virtual_network_name: "{{ body.virtual_network_name }}"
+ subnet_name: "{{ body.subnet_name }}"
+ upgrade_policy: "{{ body.upgrade_policy }}"
+ load_balancer: "{{ body.load_balancer }}"
+ tier: "{{ body.tier }}"
+ managed_disk_type: "{{ body.managed_disk_type }}"
+ os_disk_caching: "{{ body.os_disk_caching }}"
+ image: "{{ body.image }}"
+ data_disks: "{{ body.data_disks }}"
+ overprovision: "{{ body.overprovision }}"
+ register: results
+
+- name: Assert that nothing was changed
+ assert:
+ that: not results.changed
+
+- name: Install VMSS Extension
+ azure_rm_virtualmachinescalesetextension:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ name: testExtension
+ publisher: Microsoft.Azure.Extensions
+ type: CustomScript
+ type_handler_version: 2.0
+ auto_upgrade_minor_version: true
+ settings: {"commandToExecute": "sudo apt-get -y install apache2"}
+ register: results
+
+- name: Assert that something was changed
+ assert:
+ that: results.changed
+
+- name: Install Again VMSS Extension - again
+ azure_rm_virtualmachinescalesetextension:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ name: testExtension
+ publisher: Microsoft.Azure.Extensions
+ type: CustomScript
+ type_handler_version: 2.0
+ auto_upgrade_minor_version: true
+ settings: {"commandToExecute": "sudo apt-get -y install apache2"}
+ register: results
+
+- name: Assert that nothing was changed
+ assert:
+ that: not results.changed
+
+- name: Query extension
+ azure_rm_virtualmachinescalesetextension_info:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ name: testExtension
+ register: results
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - results.changed == False
+ - results.extensions[0]['id'] != None
+ - results.extensions[0]['resource_group'] != None
+ - results.extensions[0]['vmss_name'] != None
+ - results.extensions[0]['name'] != None
+ - results.extensions[0]['publisher'] != None
+ - results.extensions[0]['type'] != None
+ - results.extensions[0]['settings'] != None
+ - results.extensions[0]['auto_upgrade_minor_version'] != None
+ - results.extensions[0]['provisioning_state'] != None
+
+- name: List extensions
+ azure_rm_virtualmachinescalesetextension_info:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ register: results
+
+- name: Assert that facts are returned
+ assert:
+ that:
+ - results.changed == False
+ - results.extensions[0]['id'] != None
+ - results.extensions[0]['resource_group'] != None
+ - results.extensions[0]['vmss_name'] != None
+ - results.extensions[0]['name'] != None
+ - results.extensions[0]['publisher'] != None
+ - results.extensions[0]['type'] != None
+ - results.extensions[0]['settings'] != None
+ - results.extensions[0]['auto_upgrade_minor_version'] != None
+ - results.extensions[0]['provisioning_state'] != None
+
+- name: Delete VMSS Extension
+ azure_rm_virtualmachinescalesetextension:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ name: testExtension
+ state: absent
+ register: results
+
+- name: Assert that change was reported
+ assert:
+ that: results.changed
+
+- name: Upgrade instance to the latest image
+ azure_rm_virtualmachinescalesetinstance:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ instance_id: "{{ instances.instances[0].instance_id }}"
+ latest_model: yes
+ register: results
+
+- name: Assert that something has changed
+ assert:
+ that: results.changed
+
+- name: Stop virtual machine
+ azure_rm_virtualmachinescalesetinstance:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ instance_id: "{{ instances.instances[0].instance_id }}"
+ power_state: stopped
+ register: results
+
+- name: Assert that something has changed
+ assert:
+ that: results.changed
+
+- name: Delete instance
+ azure_rm_virtualmachinescalesetinstance:
+ resource_group: "{{ resource_group }}"
+ vmss_name: testVMSS{{ rpfx }}
+ instance_id: "{{ instances.instances[0].instance_id }}"
+ state: absent
+ register: results
+
+- name: Assert that something has changed
+ assert:
+ that: results.changed
+
+- name: Delete VMSS
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}
+ state: absent
+
+- name: Create VMSS with security group in same resource group, with accelerated networking(check mode).
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}2
+ vm_size: Standard_D3_v2
+ capacity: 0
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ image:
+ name: testimagea
+ resource_group: "{{ resource_group }}"
+ upgrade_policy: Manual
+ security_group: testNetworkSecurityGroup
+ enable_accelerated_networking: yes
+ register: results
+ check_mode: yes
+
+- name: Assert that VMSS can be created
+ assert:
+ that: results.changed
+
+- name: Create VMSS with security group in same resource group, with accelerated networking.
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}2
+ vm_size: Standard_D3_v2
+ capacity: 0
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ image:
+ name: testimagea
+ resource_group: "{{ resource_group }}"
+ upgrade_policy: Manual
+ security_group: testNetworkSecurityGroup
+ enable_accelerated_networking: yes
+ register: results
+
+- name: Assert that VMSS ran
+ assert:
+ that:
+ - 'results.changed'
+ - 'results.ansible_facts.azure_vmss.properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations.0.properties.enableAcceleratedNetworking == true'
+ - 'results.ansible_facts.azure_vmss.properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations.0.properties.networkSecurityGroup != {}'
+
+- name: Create VMSS with security group in same resource group, with accelerated networking.
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}2
+ vm_size: Standard_D3_v2
+ capacity: 0
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ image:
+ name: testimagea
+ resource_group: "{{ resource_group }}"
+ upgrade_policy: Manual
+ security_group: testNetworkSecurityGroup
+ enable_accelerated_networking: yes
+ register: results
+
+- name: Assert that nothing has changed
+ assert:
+ that:
+ - not results.changed
+
+- name: Create VMSS with security group in same resource group, with accelerated networking.
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}2
+ vm_size: Standard_D3_v2
+ capacity: 0
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ image:
+ name: testimageb
+ resource_group: "{{ resource_group }}"
+ upgrade_policy: Manual
+ security_group: testNetworkSecurityGroup
+ enable_accelerated_networking: yes
+ register: results
+
+- name: Assert that something has changed
+ assert:
+ that:
+ - results.changed
+
+- name: update VMSS with security group in different resource group.
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}2
+ vm_size: Standard_B1s
+ capacity: 0
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ image:
+ name: testimageb
+ resource_group: "{{ resource_group }}"
+ upgrade_policy: Manual
+ security_group:
+ name: testNetworkSecurityGroup2
+ resource_group: "{{ resource_group_secondary }}"
+ register: results
+
+# disable for now
+#- name: Assert that security group is correct
+# assert:
+# that:
+# - 'results.changed'
+# - '"testNetworkSecurityGroup2" in results.ansible_facts.azure_vmss.properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations.0.properties.networkSecurityGroup.id'
+
+- name: Delete VMSS
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}2
+ state: absent
+
+- name: Create VMSS with ephmeral OS disk.
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}3
+ vm_size: Standard_DS2_v2
+ capacity: 0
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ ephemeral_os_disk: True
+ image:
+ name: testimageb
+ resource_group: "{{ resource_group }}"
+ upgrade_policy: Manual
+ security_group:
+ name: testNetworkSecurityGroup2
+ resource_group: "{{ resource_group_secondary }}"
+ register: results
+
+- assert:
+ that:
+ - results.changed
+ - results.ansible_facts.azure_vmss.properties.virtualMachineProfile.storageProfile.osDisk.diffDiskSettings.option == 'Local'
+
+- name: Check VMSS ephmeral OS disk can't udpate
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}3
+ vm_size: Standard_DS2_v2
+ capacity: 0
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ ephemeral_os_disk: False
+ image:
+ name: testimageb
+ resource_group: "{{ resource_group }}"
+ upgrade_policy: Manual
+ security_group:
+ name: testNetworkSecurityGroup2
+ resource_group: "{{ resource_group_secondary }}"
+ ignore_errors: yes
+
+- name: Delete VMSS
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}3
+ state: absent
+
+- name: Fail when instance type is not supported to enable accelerated networking
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testVMSS{{ rpfx }}4
+ vm_size: Standard_B1s
+ virtual_network_name: testVnet
+ subnet_name: testSubnet
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ image:
+ offer: CoreOS
+ publisher: CoreOS
+ sku: Stable
+ version: latest
+ upgrade_policy: Manual
+ enable_accelerated_networking: yes
+ register: results
+ ignore_errors: yes
+
+- name: Assert failure to show that accelerated networking is enabled only with supported instance types.
+ assert:
+ that:
+ - '"VMSizeIsNotPermittedToEnableAcceleratedNetworkingForVmss" in results.msg'
+
+- name: Delete network security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group }}"
+ name: testNetworkSecurityGroup
+ state: absent
+
+- name: Delete network security group
+ azure_rm_securitygroup:
+ resource_group: "{{ resource_group_secondary }}"
+ name: testNetworkSecurityGroup2
+ state: absent
+
+- name: Delete load balancer
+ azure_rm_loadbalancer:
+ resource_group: "{{ resource_group }}"
+ name: testLB
+ state: absent
+
+- name: Delete public IP address
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ state: absent
+ name: testPublicIP
+
+- name: Delete virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: testVnet
+ state: absent
+ address_prefixes: "10.0.0.0/16"
+
+# TODO: Until we have a module to create/delete images this is the best tests
+# I can do
+- name: assert error thrown with invalid image dict
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testvm002
+ vm_size: Standard_B1s
+ image:
+ offer: UbuntuServer
+ register: fail_invalid_image_dict
+ failed_when: 'fail_invalid_image_dict.msg != "parameter error: expecting image to contain [publisher, offer, sku, version], [name, resource_group] or [id]"'
+
+- name: assert error thrown with invalid image type
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testvm002
+ vm_size: Standard_B1s
+ image:
+ - testing
+ register: fail_invalid_image_type
+ failed_when: 'fail_invalid_image_type.msg != "parameter error: expecting image to be a string or dict not list"'
+
+- name: assert error finding missing custom image
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testvm002
+ vm_size: Standard_B1s
+ image: invalid-image
+ register: fail_missing_custom_image
+ failed_when: fail_missing_custom_image.msg != "Error could not find image with name invalid-image"
+
+- name: assert error finding missing custom image (dict style)
+ azure_rm_virtualmachinescaleset:
+ resource_group: "{{ resource_group }}"
+ name: testvm002
+ vm_size: Standard_B1s
+ image:
+ name: invalid-image
+ register: fail_missing_custom_image_dict
+ failed_when: fail_missing_custom_image_dict.msg != "Error could not find image with name invalid-image"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/aliases
new file mode 100644
index 00000000..aa77c071
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group2
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/tasks/main.yml
new file mode 100644
index 00000000..24f3ce0b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetwork/tasks/main.yml
@@ -0,0 +1,184 @@
+- name: Prepare random number
+ set_fact:
+ vnetname: "vnet{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+
+- name: Delete virtual network, if it exists
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+
+- name: Create virtual network
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ address_prefixes_cidr:
+ - 10.1.0.0/16
+ - 172.100.0.0/16
+ - fdda:e69b:1587:495e::/64
+ tags:
+ testing: testing
+ delete: on-exit
+ resource_group: "{{ resource_group }}"
+
+- name: Update virtual network with dns server
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ address_prefixes_cidr:
+ - 10.1.0.0/16
+ - 172.100.0.0/16
+ - fdda:e69b:1587:495e::/64
+ dns_servers:
+ - 127.0.0.1
+ - 127.0.0.3
+ tags:
+ testing: testing
+ delete: on-exit
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - "output.state.address_prefixes | length == 3"
+ - "output.state.dns_servers | length == 2"
+ - "output.state.tags.delete == 'on-exit'"
+ - "output.state.tags | length == 2"
+
+- name: Attach a subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vnetname }}"
+ virtual_network_name: "{{ vnetname }}"
+ address_prefix_cidr: "10.1.0.0/24"
+
+- name: Gather facts by name, tags
+ azure_rm_virtualnetwork_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vnetname }}"
+ tags:
+ - testing
+ register: facts
+
+- assert:
+ that:
+ - "facts.virtualnetworks | length == 1"
+ - "facts.virtualnetworks[0].dns_servers | length == 2"
+ - "facts.virtualnetworks[0].address_prefixes | length == 3"
+ - "facts.virtualnetworks[0].subnets | length == 1"
+
+- name: Gather facts by resource group, tags
+ azure_rm_virtualnetwork_info:
+ resource_group: "{{ resource_group }}"
+ tags:
+ - testing
+ register: facts
+
+- assert:
+ that: "facts.virtualnetworks | length >= 1"
+
+- name: Gather facts by tags
+ azure_rm_virtualnetwork_info:
+ tags:
+ - testing
+ register: facts
+
+- assert:
+ that: "facts.virtualnetworks | length >= 1"
+
+- name: Should be idempotent
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ address_prefixes_cidr:
+ - 10.1.0.0/16
+ - 172.100.0.0/16
+ - fdda:e69b:1587:495e::/64
+ dns_servers:
+ - 127.0.0.1
+ - 127.0.0.3
+ tags:
+ testing: testing
+ delete: on-exit
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Update tags
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ tags:
+ testing: 'no'
+ delete: never
+ foo: bar
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that: output.state.tags | length == 3
+
+- name: Purge tags
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ append_tags: no
+ tags:
+ testing: 'always'
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - output.state.tags | length == 1
+ - output.state.tags.testing == 'always'
+
+- name: Should require address_prefixes_cidr when purge_address_prefixes
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ purge_address_prefixes: true
+ resource_group: "{{ resource_group }}"
+ register: output
+ ignore_errors: yes
+
+- assert:
+ that: output.failed
+
+- name: Purge address prefixes
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ address_prefixes_cidr: 10.1.0.0/16
+ purge_address_prefixes: true
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that:
+ - output.state.address_prefixes | length == 1
+ - output.state.address_prefixes[0] == '10.1.0.0/16'
+ - output.state.dns_servers | length == 2
+ - output.state.dns_servers[0] == '127.0.0.1'
+
+- name: Purge DNS servers
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ purge_dns_servers: true
+ resource_group: "{{ resource_group }}"
+ register: output
+
+- assert:
+ that: output.state['dns_servers'] is undefined
+
+- name: Gather facts
+ azure_rm_virtualnetwork_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vnetname }}"
+ register: facts
+
+- assert:
+ that:
+ - facts.virtualnetworks | length == 1
+ - "facts.virtualnetworks[0].subnets | length == 1"
+
+- name: Delete virtual network
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/aliases
new file mode 100644
index 00000000..6166f973
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group14
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/tasks/main.yml
new file mode 100644
index 00000000..146d3769
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkgateway/tasks/main.yml
@@ -0,0 +1,126 @@
+# FIXME: needs minimal tests (check mode?) that can run quickly, VNG creation takes > 20min
+
+- name: Prepare random number
+ set_fact:
+ vnetname: "vnet{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ vngname: "vng{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+
+- name: Create virtual network gateway without bgp settings (check mode)
+ check_mode: yes
+ azure_rm_virtualnetworkgateway:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vngname }}"
+ ip_configurations:
+ - name: testipconfig
+ private_ip_allocation_method: Dynamic
+ public_ip_address_name: testPublicIP
+ virtual_network: "{{ vnetname }}"
+ tags:
+ common: "xyz"
+ register: output
+
+- assert:
+ that: output.changed
+
+- name: long-running virtualnetworkgateway tests [run with `--tags long_run,untagged` to enable]
+ tags: [long_run, never]
+ block:
+ - name: Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vnetname }}"
+ address_prefixes: "10.0.0.0/16"
+
+ - name: Add subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: GatewaySubnet
+ address_prefix: "10.0.2.0/24"
+ virtual_network: "{{ vnetname }}"
+
+ - name: Create public IP address
+ azure_rm_publicipaddress:
+ resource_group: "{{ resource_group }}"
+ allocation_method: Dynamic
+ name: testPublicIP
+
+ - name: Create virtual network gateway without bgp settings
+ azure_rm_virtualnetworkgateway:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vngname }}"
+ ip_configurations:
+ - name: testipconfig
+ private_ip_allocation_method: Dynamic
+ public_ip_address_name: testPublicIP
+ virtual_network: "{{ vnetname }}"
+ tags:
+ common: "xyz"
+ register: output
+
+ - assert:
+ that: output.changed
+
+ - name: Create virtual network gateway without bgp settings
+ azure_rm_virtualnetworkgateway:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vngname }}"
+ ip_configurations:
+ - name: testipconfig
+ private_ip_allocation_method: Dynamic
+ public_ip_address_name: testPublicIP
+ virtual_network: "{{ vnetname }}"
+ tags:
+ common: "xyz"
+ register: output
+
+ - assert:
+ that: output.changed
+
+ - name: Create virtual network gateway without bgp settings - idempotent
+ azure_rm_virtualnetworkgateway:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vngname }}"
+ ip_configurations:
+ - name: testipconfig
+ private_ip_allocation_method: Dynamic
+ public_ip_address_name: testPublicIP
+ virtual_network: "{{ vnetname }}"
+ tags:
+ common: "xyz"
+ register: output
+
+ - assert:
+ that: not output.changed
+
+ - name: Update virtual network gateway
+ azure_rm_virtualnetworkgateway:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vngname }}"
+ ip_configurations:
+ - name: testipconfig
+ private_ip_allocation_method: Dynamic
+ public_ip_address_name: testPublicIP
+ virtual_network: "{{ vnetname }}"
+ tags:
+ common: "mno"
+ register: output
+ - assert:
+ that: output.changed
+
+ - name: Delete virtual network gateway
+ azure_rm_virtualnetworkgateway:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vngname }}"
+ state: absent
+ register: output
+ - assert:
+ that: output.changed
+
+- name: Delete virtual network gateway - idempotent
+ azure_rm_virtualnetworkgateway:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vngname }}"
+ state: absent
+ register: output
+- assert:
+ that: not output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/aliases
new file mode 100644
index 00000000..5afc4b6f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/aliases
@@ -0,0 +1,4 @@
+cloud/azure
+shippable/azure/group14
+unsupported
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/tasks/main.yml
new file mode 100644
index 00000000..bf7a4aa1
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_virtualnetworkpeering/tasks/main.yml
@@ -0,0 +1,126 @@
+- name: Prepare random number
+ set_fact:
+ vnetname1: "vnet1{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ vnetname2: "vnet2{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+ peering_name: "peering1{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 100 | random }}"
+
+- name: Create first virtual network
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname1 }}"
+ address_prefixes_cidr:
+ - 10.1.0.0/16
+ tags:
+ testing: testing
+ delete: on-exit
+ resource_group: "{{ resource_group }}"
+ register: vnet1
+
+- name: Create second virtual network
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname2 }}"
+ address_prefixes_cidr:
+ - 10.2.0.0/24
+ resource_group: "{{ resource_group_secondary }}"
+ register: vnet2
+
+- assert:
+ that:
+ - vnet1.changed
+ - vnet2.changed
+
+- name: Create virtual network peering (check mode)
+ azure_rm_virtualnetworkpeering:
+ resource_group: "{{ resource_group }}"
+ name: "{{ peering_name }}"
+ virtual_network: "{{ vnetname1 }}"
+ remote_virtual_network:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ vnetname2 }}"
+ allow_virtual_network_access: false
+ allow_forwarded_traffic: true
+ check_mode: yes
+ register: output
+
+- assert:
+ that: output.changed
+
+- name: Create virtual network peering
+ azure_rm_virtualnetworkpeering:
+ resource_group: "{{ resource_group }}"
+ name: "{{ peering_name }}"
+ virtual_network: "{{ vnetname1 }}"
+ remote_virtual_network:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ vnetname2 }}"
+ allow_virtual_network_access: false
+ allow_forwarded_traffic: true
+ register: output
+
+- assert:
+ that: output.changed
+
+- name: Update virtual network peering (idempotent)
+ azure_rm_virtualnetworkpeering:
+ resource_group: "{{ resource_group }}"
+ name: "{{ peering_name }}"
+ virtual_network: "{{ vnetname1 }}"
+ remote_virtual_network:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ vnetname2 }}"
+ allow_virtual_network_access: false
+ allow_forwarded_traffic: true
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Update virtual network peering
+ azure_rm_virtualnetworkpeering:
+ resource_group: "{{ resource_group }}"
+ name: "{{ peering_name }}"
+ virtual_network: "{{ vnetname1 }}"
+ remote_virtual_network:
+ resource_group: "{{ resource_group_secondary }}"
+ name: "{{ vnetname2 }}"
+ allow_virtual_network_access: true
+ allow_forwarded_traffic: false
+ register: output
+
+- assert:
+ that: output.changed
+
+- name: Get facts
+ azure_rm_virtualnetworkpeering_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ peering_name }}"
+ virtual_network: "{{ vnetname1 }}"
+ register: facts
+
+- name: Assert Facts
+ assert:
+ that:
+ - facts['vnetpeerings'] | length == 1
+ - facts['vnetpeerings'][0]['id']
+ - facts['vnetpeerings'][0]['peering_state']
+ - facts['vnetpeerings'][0]['remote_virtual_network']
+ - facts['vnetpeerings'][0]['provisioning_state']
+
+- name: Delete virtual network peering
+ azure_rm_virtualnetworkpeering:
+ resource_group: "{{ resource_group }}"
+ name: "{{ peering_name }}"
+ virtual_network: "{{ vnetname1 }}"
+ state: absent
+ register: output
+
+- name: Delete first virtual network
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname1 }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+
+- name: Delete virtual network
+ azure_rm_virtualnetwork:
+ name: "{{ vnetname2 }}"
+ resource_group: "{{ resource_group_secondary }}"
+ state: absent \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/aliases
new file mode 100644
index 00000000..cc941b59
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/aliases
@@ -0,0 +1,3 @@
+cloud/azure
+shippable/azure/group12
+destructive
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/tasks/main.yml
new file mode 100644
index 00000000..9eb906f9
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_vmbackuppolicy/tasks/main.yml
@@ -0,0 +1,78 @@
+- name: Fix resource prefix
+ set_fact:
+ name: "myPolicy{{ resource_group | hash('md5') | truncate(22, True, '') }}"
+ vault_name: "myVault"
+ location: "eastus"
+
+- name: Create Azure Recovery Service vault
+ azure_rm_recoveryservicesvault:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ location: "{{ location }}"
+ state: "present"
+ register: vault
+
+- name: Create VM Backup Policy
+ azure_rm_vmbackuppolicy:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ vault_name: "{{ vault.response.name }}"
+ state: "present"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Create VM Backup Policy (idempotent)
+ azure_rm_vmbackuppolicy:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ vault_name: "{{ vault.response.name }}"
+ state: "present"
+ register: output
+
+- name: Assert that output has no changed
+ assert:
+ that:
+ - not output.changed
+
+- name: Get VM Backup Policy Details
+ azure_rm_vmbackuppolicy_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ vault_name: "{{ vault.response.name }}"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.response.id != None
+ - output.response.name != None
+
+- name: Delete VM Backup Policy
+ azure_rm_vmbackuppolicy:
+ resource_group: "{{ resource_group }}"
+ name: "{{ name }}"
+ vault_name: "{{ vault.response.name }}"
+ state: "absent"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
+
+- name: Delete Azure Recovery Service vault
+ azure_rm_recoveryservicesvault:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vault.response.name }}"
+ location: "{{ location }}"
+ state: "absent"
+ register: output
+
+- name: Assert that output has changed
+ assert:
+ that:
+ - output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/aliases
new file mode 100644
index 00000000..c7c2aff0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/aliases
@@ -0,0 +1,5 @@
+cloud/azure
+shippable/azure/group3
+destructive
+azure_rm_webapp_facts
+azure_rm_webappslot
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/tasks/main.yml
new file mode 100644
index 00000000..e4f7e947
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_webapp/tasks/main.yml
@@ -0,0 +1,434 @@
+- name: Fix resource prefix
+ set_fact:
+ linux_app_plan_resource_group: "{{ resource_group_secondary }}"
+ win_app_name: "{{ (resource_prefix | replace('-','x'))[-8:] }}{{ 1000 | random}}winapp"
+ win_plan_name: "{{ (resource_prefix | replace('-','x'))[-8:] }}winplan"
+ linux_plan_name: "{{ (resource_group_secondary | replace('-','x'))[-8:] }}linplan"
+ slot1_name: "stage1"
+
+- name: Create a windows web app with non-exist app service plan
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}1"
+ plan:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_plan_name }}"
+ is_linux: false
+ sku: S1
+
+- name: Create a windows web app with existing app service plan
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}2"
+ plan: "{{ win_plan_name }}"
+ register: output
+
+- name: stop the web app
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}2"
+ plan: "{{ win_plan_name }}"
+ app_state: stopped
+ register: output
+
+- name: assert output changed
+ assert:
+ that:
+ output.changed
+
+# enable after webapp_facts merged
+# - name: get the web app
+# azure_rm_webapp_info:
+# resource_group: "{{ resource_group }}"
+# name: "{{ win_app_name }}2"
+# register: stopped
+
+# - name: assert web app is stopped
+# assert:
+# that:
+# - stopped.properties.state == "Stopped"
+
+- name: Create a windows web app with existing app service plan, try to update some root level params
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}3"
+ plan: "{{ win_plan_name }}"
+ dns_registration: true
+ https_only: true
+ tags:
+ testwebapptag: test
+ register: output
+
+- name: get web app with resource group and tag
+ azure_rm_webapp_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}3"
+ tags:
+ - testwebapptag
+ register: output
+
+- assert:
+ that:
+ - output.webapps | length == 1
+
+- name: Create a win web app with java run time specific
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}4"
+ plan: "{{ win_plan_name }}"
+ frameworks:
+ - name: "java"
+ version: "1.8"
+ settings:
+ java_container: "Tomcat"
+ java_container_version: "8.0"
+ app_settings:
+ testkey: "testvalue"
+ register: output
+
+- name: assert the web app was created
+ assert:
+ that: output.changed
+
+- name: get web app with name
+ azure_rm_webapp_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}4"
+ register: output
+
+- assert:
+ that:
+ - output.webapps | length == 1
+ - output.webapps[0].app_settings | length == 1
+ - output.webapps[0].frameworks | length > 1 # there's default frameworks eg net_framework
+
+- name: Update app settings and framework
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}4"
+ plan: "{{ win_plan_name }}"
+ frameworks:
+ - name: "java"
+ version: "1.7"
+ settings:
+ java_container: "Tomcat"
+ java_container_version: "8.5"
+ app_settings:
+ testkey2: "testvalue2"
+ register: output
+
+- name: Assert the web app was updated
+ assert:
+ that:
+ - output.changed
+
+- name: get web app with name
+ azure_rm_webapp_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}4"
+ register: output
+
+- name: Assert updating
+ assert:
+ that:
+ - output.webapps[0].app_settings | length == 2
+ - output.webapps[0].app_settings['testkey'] == 'testvalue'
+ - output.webapps[0].app_settings['testkey2'] == 'testvalue2'
+
+- name: get web app with return publishing profile
+ azure_rm_webapp_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}4"
+ return_publish_profile: true
+ register: output
+
+- assert:
+ that:
+ - output.webapps | length == 1
+ - output.webapps[0].publishing_username != ""
+ - output.webapps[0].publishing_password != ""
+
+- name: Purge all existing app settings
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}4"
+ plan: "{{ win_plan_name }}"
+ purge_app_settings: true
+ register: output
+
+- name: Assert the web app was updated
+ assert:
+ that: output.changed
+
+- name: Create a win web app with python run time and php run time
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}5"
+ plan: "{{ win_plan_name }}"
+ frameworks:
+ - name: "python"
+ version: "2.7"
+ - name: node
+ version: "6.6"
+ - name: "php"
+ version: "7.0"
+ register: output
+
+- name: Assert the web app was created
+ assert:
+ that: output.changed
+
+- name: Create a docker web app with some app settings
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}6"
+ plan:
+ resource_group: "{{ linux_app_plan_resource_group }}"
+ name: "{{ linux_plan_name }}"
+ is_linux: true
+ sku: S1
+ number_of_workers: 1
+ container_settings:
+ name: "ansible/ansible:ubuntu1404"
+ register: output
+
+- name: Assert the web app was created
+ assert:
+ that: output.changed
+
+- name: Create a docker web app with private acr registry
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}7"
+ plan:
+ resource_group: "{{ linux_app_plan_resource_group }}"
+ name: "{{ linux_plan_name }}"
+ container_settings:
+ name: "ansible/ansible:ubuntu1404"
+ registry_server_url: test.io
+ registry_server_user: user
+ registry_server_password: password
+ register: output
+
+- name: Assert the web app was created
+ assert:
+ that: output.changed
+
+- name: Create a linux web app with nodejs framework
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}8"
+ plan:
+ resource_group: "{{ linux_app_plan_resource_group }}"
+ name: "{{ linux_plan_name }}"
+ frameworks:
+ - name: node
+ version: "6.6"
+ register: output
+
+- name: Should be idempotent with linux web app created
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}8"
+ plan:
+ resource_group: "{{ linux_app_plan_resource_group }}"
+ name: "{{ linux_plan_name }}"
+ frameworks:
+ - name: node
+ version: "6.6"
+ register: output
+
+- assert:
+ that: not output.changed
+
+- name: Update nodejs framework
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}8"
+ plan:
+ resource_group: "{{ linux_app_plan_resource_group }}"
+ name: "{{ linux_plan_name }}"
+ frameworks:
+ - name: node
+ version: "6.9"
+ register: output
+
+- name: Assert the web app was created
+ assert:
+ that: output.changed
+
+- name: Create a linux web app with deployment source github
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}10"
+ plan:
+ resource_group: "{{ linux_app_plan_resource_group }}"
+ name: "{{ linux_plan_name }}"
+ deployment_source:
+ url: "https://github.com/test/test"
+ branch: master
+ scm_type: GitHub
+ register: output
+
+- name: Assert the web app was created
+ assert:
+ that: output.changed
+
+- name: Delete web app
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}8"
+ state: absent
+ register: output
+
+- name: Assert the web app was deleted
+ assert:
+ that: output.changed
+
+- name: assert error that java is mutually exclusive with frameworks
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}11"
+ plan: "{{ win_plan_name }}"
+ frameworks:
+ - name: "python"
+ version: "2.7"
+ - name: "java"
+ version: "1.8"
+ register: fail_win_java_version_mutual_exclusive
+ failed_when: 'fail_win_java_version_mutual_exclusive.msg != "Java is mutually exclusive with other frameworks."'
+
+- name: assert error when linux web app, only can specify one framework
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ linux_plan_name }}12"
+ plan:
+ resource_group: "{{ linux_app_plan_resource_group }}"
+ name: "{{ linux_plan_name }}"
+ frameworks:
+ - name: "python"
+ version: "2.7"
+ - name: "node"
+ version: "6.6"
+ register: fail_linux_one_framework_only
+ failed_when: fail_linux_one_framework_only.msg != "Can specify one framework only for Linux web app."
+
+- name: Create a linux web app with java tomcat container
+ azure_rm_webapp:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}13"
+ plan:
+ resource_group: "{{ linux_app_plan_resource_group }}"
+ name: "{{ linux_plan_name }}"
+ frameworks:
+ - name: java
+ version: "8"
+ settings:
+ java_container: "tomcat"
+ java_container_version: "8.5"
+ register: output
+
+- name: Assert the web app was created
+ assert:
+ that: output.changed
+
+- name: Get facts with publish profile
+ azure_rm_webapp_info:
+ resource_group: "{{ resource_group }}"
+ name: "{{ win_app_name }}13"
+ no_log: true
+ register: facts
+
+- name: Assert publish profile returned
+ assert:
+ that:
+ - facts.webapps[0].ftp_publish_url != ''
+
+- name: Create a webapp slot (Check mode)
+ azure_rm_webappslot:
+ resource_group: "{{ resource_group }}"
+ webapp_name: "{{ win_app_name }}13"
+ name: "{{ slot1_name }}"
+ configuration_source: "{{ win_app_name }}13"
+ app_settings:
+ testkey: testvalue
+ check_mode: yes
+ register: output
+
+- name: Assert slot check mode creation
+ assert:
+ that:
+ - output.changed
+
+- name: Create a webapp slot
+ azure_rm_webappslot:
+ resource_group: "{{ resource_group }}"
+ webapp_name: "{{ win_app_name }}13"
+ name: "{{ slot1_name }}"
+ configuration_source: "{{ win_app_name }}13"
+ app_settings:
+ testkey: testvalueslot
+ register: output
+
+- name: Assert slot creation
+ assert:
+ that:
+ - output.changed
+
+- name: Update webapp slot (idempotence)
+ azure_rm_webappslot:
+ resource_group: "{{ resource_group }}"
+ webapp_name: "{{ win_app_name }}13"
+ name: "{{ slot1_name }}"
+ app_settings:
+ testkey: testvalueslot
+ register: output
+
+- name: Assert idempotence
+ assert:
+ that:
+ - not output.changed
+
+- name: Update webapp slot
+ azure_rm_webappslot:
+ resource_group: "{{ resource_group }}"
+ webapp_name: "{{ win_app_name }}13"
+ name: "{{ slot1_name }}"
+ frameworks:
+ - name: "node"
+ version: "10.1"
+ app_settings:
+ testkey: testvalue2
+ register: output
+
+- name: Assert updating
+ assert:
+ that:
+ - output.changed
+
+- name: Swap webapp slot
+ azure_rm_webappslot:
+ resource_group: "{{ resource_group }}"
+ webapp_name: "{{ win_app_name }}13"
+ name: "{{ slot1_name }}"
+ swap:
+ action: swap
+ register: output
+
+- name: Assert swap
+ assert:
+ that:
+ - output.changed
+
+- name: Stop webapp slot
+ azure_rm_webappslot:
+ resource_group: "{{ resource_group }}"
+ webapp_name: "{{ win_app_name }}13"
+ name: "{{ slot1_name }}"
+ app_state: stopped
+ register: output
+
+- name: Assert stopped
+ assert:
+ that:
+ - output.changed \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/aliases
new file mode 100644
index 00000000..15133fe6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/aliases
@@ -0,0 +1,5 @@
+cloud/azure
+shippable/azure/group4
+destructive
+azure_rm_workspace
+azure_rm_workspace_facts
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/meta/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/meta/main.yml
new file mode 100644
index 00000000..95e1952f
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/meta/main.yml
@@ -0,0 +1,2 @@
+dependencies:
+ - setup_azure
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/tasks/main.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/tasks/main.yml
new file mode 100644
index 00000000..7f9a05f7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/azure_rm_workspace/tasks/main.yml
@@ -0,0 +1,128 @@
+- name: Prepare random number
+ set_fact:
+ name: "workspace{{ resource_group | hash('md5') | truncate(7, True, '') }}{{ 1000 | random }}"
+
+- name: Create workspace (check mode)
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ retention_in_days: 40
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get workspace
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: facts
+
+- assert:
+ that:
+ - facts.workspaces | length == 0
+
+- name: Create workspace
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ retention_in_days: 40
+ register: output
+
+- assert:
+ that:
+ - output.retention_in_days == 40
+ - output.changed
+ - output.intelligence_packs
+
+- name: Create workspace (idempontent)
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ retention_in_days: 40
+ register: output
+
+- assert:
+ that:
+ - not output.changed
+
+- name: Get workspace
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: facts
+
+- assert:
+ that:
+ - facts.workspaces | length == 1
+ - facts.workspaces[0].id == output.id
+
+- set_fact:
+ pack: "{{ pack | default({}) | combine({output.intelligence_packs[0].name: not output.intelligence_packs[0].enabled}) }}"
+
+- name: Update intelligence pack
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ intelligence_packs: "{{ pack }}"
+ register: intelligence
+
+- assert:
+ that:
+ - intelligence.intelligence_packs[0].enabled != output.intelligence_packs[0].enabled
+
+- name: Remove workspace (check mode)
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ check_mode: yes
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get workspace
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: facts
+
+- assert:
+ that:
+ - facts.workspaces | length == 1
+
+- name: Remove workspace
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - output.changed
+
+- name: Get workspace
+ azure_rm_loganalyticsworkspace_info:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ register: facts
+
+- assert:
+ that:
+ - facts.workspaces | length == 0
+
+- name: Remove workspace (idempontent)
+ azure_rm_loganalyticsworkspace:
+ name: "{{ name }}"
+ resource_group: "{{ resource_group }}"
+ state: absent
+ register: output
+
+- assert:
+ that:
+ - not output.changed
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/aliases
new file mode 100644
index 00000000..e42dbab0
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/aliases
@@ -0,0 +1,2 @@
+cloud/azure
+shippable/azure/group1
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/create_inventory_config.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/create_inventory_config.yml
new file mode 100644
index 00000000..6ed4067a
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/create_inventory_config.yml
@@ -0,0 +1,11 @@
+---
+- hosts: localhost
+ connection: local
+ gather_facts: no
+ vars:
+ template_name: "../templates/{{ template | default('basic.yml') }}"
+ tasks:
+ - name: write inventory config file
+ copy:
+ dest: ../test.azure_rm.yml
+ content: "{{ lookup('template', template_name) }}"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/empty_inventory_config.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/empty_inventory_config.yml
new file mode 100644
index 00000000..06a42793
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/empty_inventory_config.yml
@@ -0,0 +1,9 @@
+---
+- hosts: localhost
+ connection: local
+ gather_facts: no
+ tasks:
+ - name: write inventory config file
+ copy:
+ dest: ../test.azure_rm.yml
+ content: ""
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/setup.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/setup.yml
new file mode 100644
index 00000000..1fed3851
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/setup.yml
@@ -0,0 +1,27 @@
+---
+- include_vars:
+ file: vars.yml
+
+- name: SETUP | Create storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ account_type: Standard_LRS
+
+- name: SETUP | Create availability set
+ azure_rm_availabilityset:
+ name: "{{ availability_set }}"
+ resource_group: "{{ resource_group }}"
+
+- name: SETUP | Create virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ network_name }}"
+ address_prefixes: "{{ network }}"
+
+- name: SETUP | Create subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ name: "{{ subnet_name }}"
+ address_prefix: "{{ subnet }}"
+ virtual_network: "{{ network_name }}" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/teardown.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/teardown.yml
new file mode 100644
index 00000000..c1c5e3ce
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/teardown.yml
@@ -0,0 +1,26 @@
+---
+- name: Destroy subnet
+ azure_rm_subnet:
+ resource_group: "{{ resource_group }}"
+ virtual_network: "{{ network_name }}"
+ name: "{{ subnet_name }}"
+ state: absent
+
+- name: Destroy virtual network
+ azure_rm_virtualnetwork:
+ resource_group: "{{ resource_group }}"
+ name: "{{ network_name }}"
+ state: absent
+
+- name: Destroy availability set
+ azure_rm_availabilityset:
+ resource_group: "{{ resource_group }}"
+ name: "{{ availability_set }}"
+ state: absent
+
+- name: Destroy storage account
+ azure_rm_storageaccount:
+ resource_group: "{{ resource_group }}"
+ name: "{{ storage_account }}"
+ force_delete_nonempty: yes
+ state: absent
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/test_inventory.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/test_inventory.yml
new file mode 100644
index 00000000..ddb998b7
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/test_inventory.yml
@@ -0,0 +1,42 @@
+---
+- hosts: localhost
+ connection: local
+ gather_facts: no
+ tasks:
+ - name: setup
+ include_tasks: setup.yml
+
+ - name: Create minimal VM with defaults
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ admin_username: testuser
+ ssh_password_enabled: false
+ ssh_public_keys:
+ - path: /home/testuser/.ssh/authorized_keys
+ key_data: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfoYlIV4lTPZTv7hXaVwQQuqBgGs4yeNRX0SPo2+HQt9u4X7IGwrtXc0nEUm6LfaCikMH58bOL8f20NTGz285kxdFHZRcBXtqmnMz2rXwhK9gwq5h1khc+GzHtdcJXsGA4y0xuaNcidcg04jxAlN/06fwb/VYwwWTVbypNC0gpGEpWckCNm8vlDlA55sU5et0SZ+J0RKVvEaweUOeNbFZqckGPA384imfeYlADppK/7eAxqfBVadVvZG8IJk4yvATgaIENIFj2cXxqu2mQ/Bp5Wr45uApvJsFXmi+v/nkiOEV1QpLOnEwAZo6EfFS4CCQtsymxJCl1PxdJ5LD4ZOtP xiuxi.sun@qq.com"
+ vm_size: Standard_B1ms
+ virtual_network: "{{ network_name }}"
+ image:
+ offer: UbuntuServer
+ publisher: Canonical
+ sku: 16.04-LTS
+ version: latest
+ register: vm_output
+
+ - meta: refresh_inventory
+
+ - name: Test Inventory
+ assert:
+ that:
+ - vm_name in hostvars
+
+ - name: Delete VM
+ azure_rm_virtualmachine:
+ resource_group: "{{ resource_group }}"
+ name: "{{ vm_name }}"
+ remove_on_absent: all_autocreated
+ state: absent
+
+ - name: teardown
+ include_tasks: teardown.yml
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/vars.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/vars.yml
new file mode 100644
index 00000000..c2aa787d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/playbooks/vars.yml
@@ -0,0 +1,14 @@
+---
+uid: "{{ (resource_group ~ inventory_hostname) | hash('md5') | truncate(18, True, '') }}"
+uid_short: "{{ (resource_group ~ inventory_hostname) | hash('md5') | truncate(10, True, '') }}"
+
+storage_account: "{{ 'stor' ~ uid }}"
+availability_set: "{{ 'avbs' ~ uid_short }}"
+vm_name: "{{ 'vm' ~ uid_short }}"
+network_name: "{{ 'vnet' ~ uid_short }}"
+subnet_name: "{{ 'snet' ~ uid_short }}"
+security_group: "{{ 'sg' ~ uid_short }}"
+public_ip_name: "{{ 'ip' ~ uid_short }}"
+interface_name: "{{ 'int' ~ uid_short }}"
+network: 10.42.0.0/24
+subnet: 10.42.0.0/28 \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/runme.sh b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/runme.sh
new file mode 100755
index 00000000..db56ed8d
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/runme.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+set -eux
+
+# ensure test config is empty
+ansible-playbook playbooks/empty_inventory_config.yml "$@"
+
+export ANSIBLE_INVENTORY=test.azure_rm.yml
+
+# generate inventory config and test using it
+ansible-playbook playbooks/create_inventory_config.yml "$@"
+ansible-playbook playbooks/test_inventory.yml "$@"
+
+#ansible-inventory -i test.azure_rm.yml --list -vvv --playbook-dir=./
+
+# cleanup inventory config
+ansible-playbook playbooks/empty_inventory_config.yml "$@" \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/templates/basic.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/templates/basic.yml
new file mode 100644
index 00000000..636049d6
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/templates/basic.yml
@@ -0,0 +1,3 @@
+---
+plugin: azure.azcollection.azure_rm
+plain_host_names: yes \ No newline at end of file
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/test.azure_rm.yml b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/test.azure_rm.yml
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/inventory_azure/test.azure_rm.yml
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/setup_azure/aliases b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/setup_azure/aliases
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/integration/targets/setup_azure/aliases
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.10.txt b/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.10.txt
new file mode 100644
index 00000000..a4456b9c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.10.txt
@@ -0,0 +1,750 @@
+plugins/modules/azure_rm_aks.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_aks.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_aks.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_aks.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_aks.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_aks.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_aks.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_aks.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_aks_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_aks_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_aks_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_aks_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_aksversion_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_aksversion_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_aksversion_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_appgateway.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_appgateway.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appgateway.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_appgateway.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_appgateway.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_appgateway.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_applicationsecuritygroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_applicationsecuritygroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_applicationsecuritygroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_appserviceplan.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appserviceplan.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_appserviceplan.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_automationaccount.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_automationaccount.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_automationaccount_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_automationaccount_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_automationaccount_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_availabilityset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_availabilityset.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_availabilityset.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerinstance.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_containerinstance.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerinstance.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_containerinstance.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_containerinstance.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_containerinstance.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerinstance.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistry.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistry.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistry.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_deployment.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_deployment.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_deployment.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_deployment.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_deployment_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_deployment_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_deployment_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_deployment_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_dnszone.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnszone.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_dnszone.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_dnszone.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_dnszone_info.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_dnszone_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnszone_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_dnszone_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_dnszone_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_dnszone_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_functionapp.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_functionapp.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_functionapp.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_functionapp.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_functionapp_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_functionapp_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_functionapp_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_functionapp_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_gallery.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_gallery.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_gallery.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_gallery_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_gallery_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_galleryimage.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_galleryimage.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_galleryimage.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_galleryimage.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_galleryimage.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_galleryimage_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_galleryimage_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_galleryimage_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_galleryimageversion_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_galleryimageversion_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_image.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_image.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_image.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_image.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_image.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_image_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_image_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_image_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_image_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_image_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_iotdevice.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iotdevice.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iotdevice_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iotdevice_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iotdevicemodule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iotdevicemodule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iothub.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_iothub.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iothub.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iothub_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_iothub_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iothub_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iothubconsumergroup.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_iothubconsumergroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iothubconsumergroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvault.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_keyvault.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvault.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_keyvault.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_keyvault.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvault.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvault_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_keyvault_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvault_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvaultkey.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvaultkey.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvaultkey.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvaultkey_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_keyvaultkey_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvaultkey_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvaultkey_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_keyvaultsecret.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvaultsecret.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvaultsecret.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvaultsecret_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvaultsecret_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_manageddisk.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_manageddisk.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_manageddisk.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_manageddisk_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_manageddisk_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_manageddisk_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_manageddisk_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_managementgroup.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_managementgroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_managementgroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_networkinterface.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_networkinterface.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_networkinterface.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_networkinterface.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_networkinterface.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_networkinterface.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_networkinterface.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_publicipaddress.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_publicipaddress.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_publicipaddress.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_publicipaddress.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_publicipaddress.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_publicipaddress.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_resource.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resource.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_resource.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_resource.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_resource_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resource_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_resource_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_resource_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_resourcegroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resourcegroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_resourcegroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_registrationdefinition.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_registrationdefinition.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_registrationdefinition.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_registrationdefinition.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_registrationdefinition_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_registrationdefinition_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_registrationassignment.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_registrationassignment.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_registrationassignment.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_registrationassignment_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_registrationassignment_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_securitygroup.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_securitygroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_securitygroup.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_securitygroup.py validate-modules:mutually_exclusive-unknown
+plugins/modules/azure_rm_securitygroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_securitygroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_storageaccount.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_storageaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageaccount.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_storageaccount.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_storageaccount.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_storageaccount.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_storageblob.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageblob.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_storageblob.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_subnet.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_subnet.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_subnet.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_subnet.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_subnet_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_subnet_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_subnet_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_subscription_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_subscription_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_subscription_info.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_virtualmachine.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachine.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_virtualmachine.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualmachine.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachine.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachine.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachineextension.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineextension.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachineextension.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachineimage_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineimage_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachineimage_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescalesetextension_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetextension_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescalesetextension_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_webapp.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webapp.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_webapp.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_webapp.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_webapp.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_webapp_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webapp_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_webapp_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_webapp_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_webappslot.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webappslot.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_webappslot.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_webappslot.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_webappslot.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_autoscale.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_autoscale.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_autoscale.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_autoscale.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_autoscale.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_autoscale_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_autoscale_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_autoscale_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_autoscale_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlab.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlab.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlab.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlab_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlab_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlab_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlab_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabarmtemplate_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabarmtemplate_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabarmtemplate_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabartifact_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabartifact_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabartifact_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabartifactsource.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabartifactsource.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabartifactsource.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabartifactsource_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabartifactsource_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabartifactsource_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabartifactsource_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabcustomimage.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabcustomimage.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabcustomimage.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabenvironment.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabenvironment.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabenvironment.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabenvironment_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabenvironment_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabenvironment_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabenvironment_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabpolicy.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabpolicy.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabpolicy.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabpolicy_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabpolicy_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabpolicy_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabpolicy_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabvirtualmachine_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabvirtualmachine_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabvirtualmachine_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabvirtualmachine_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabvirtualnetwork.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabvirtualnetwork.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabvirtualnetwork.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabvirtualnetwork_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabvirtualnetwork_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_loadbalancer.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_loadbalancer.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_loadbalancer.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_loganalyticsworkspace.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loganalyticsworkspace.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_loganalyticsworkspace.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbconfiguration.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbconfiguration.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbconfiguration_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbconfiguration_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbconfiguration_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_mariadbdatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbdatabase.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbdatabase.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbdatabase_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbdatabase_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbfirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbfirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbfirewallrule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbfirewallrule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbserver.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbserver.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbserver_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_mariadbserver_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbserver_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_monitorlogprofile.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_monitorlogprofile.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_monitorlogprofile.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlconfiguration.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlconfiguration.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlconfiguration.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlconfiguration_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlconfiguration_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlconfiguration_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_mysqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqldatabase.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqldatabase.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqldatabase_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqldatabase_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlfirewallrule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlfirewallrule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlserver.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlserver.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlserver_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_mysqlserver_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlserver_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlconfiguration.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlconfiguration.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlconfiguration.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlconfiguration_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlconfiguration_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlconfiguration_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_postgresqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqldatabase.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqldatabase.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqldatabase_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqldatabase_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlfirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlfirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlfirewallrule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlfirewallrule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlserver.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlserver.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlserver_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_postgresqlserver_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlserver_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_rediscache.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscache.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_rediscache.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_rediscache.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_rediscache.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_rediscache.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_rediscache_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscache_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_rediscache_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_rediscache_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_rediscachefirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscachefirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_rediscachefirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_roleassignment.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roleassignment.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_roleassignment.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_roleassignment_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roleassignment_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_roleassignment_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_roledefinition.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roledefinition.py validate-modules:invalid-argument-spec
+plugins/modules/azure_rm_roledefinition.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_roledefinition.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_roledefinition.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_roledefinition.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_roledefinition.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_roledefinition.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_route.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_route.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_route.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_route_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_route_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_routetable.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_routetable.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_routetable.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_routetable_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_routetable_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_routetable_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_routetable_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebus.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebus.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebus.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebus_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebus_info.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_servicebus_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_servicebus_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebus_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebusqueue.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebusqueue.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebusqueue.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebustopic.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebustopic.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_servicebustopic.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebustopic.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebustopicsubscription.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebustopicsubscription.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebustopicsubscription.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_snapshot.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_snapshot.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_snapshot.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_snapshot.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqldatabase.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_sqldatabase.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqldatabase.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlfirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqlfirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqlfirewallrule_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlfirewallrule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqlfirewallrule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlserver.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqlserver.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqlserver_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlserver_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqlserver_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanager.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_trafficmanager.py validate-modules:invalid-documentation
+plugins/modules/azure_rm_trafficmanager.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_trafficmanager.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanager.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanagerendpoint_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerendpoint_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanagerendpoint_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetworkpeering_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkpeering_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetworkpeering_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_batchaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_batchaccount.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_batchaccount.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_batchaccount.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_cdnprofile.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnprofile.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cdnprofile.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabschedule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabschedule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabschedule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabschedule_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabschedule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabschedule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabschedule_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_lock.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_lock.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_lock_info.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_lock_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_lock_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_azurefirewall.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_azurefirewall.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_azurefirewall.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_azurefirewall.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_azurefirewall.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_azurefirewall.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_azurefirewall.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_azurefirewall_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_azurefirewall_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_privatednszone.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_privatednszone.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_privatednszone_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_privatednszone_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_privatednszone_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_adpassword.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_adpassword.py validate-modules:import-before-documentation
+plugins/modules/azure_rm_adpassword.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adpassword.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_adpassword.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_adpassword_info.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adpassword_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_adpassword_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_adpassword_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_adpassword_info.py validate-modules:import-before-documentation
+plugins/modules/azure_rm_adserviceprincipal.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adserviceprincipal.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_adserviceprincipal.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_adserviceprincipal_info.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adserviceprincipal_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_adserviceprincipal_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_backupazurevm.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_backupazurevm.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_backupazurevm_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_backupazurevm_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_recoveryservicesvault.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_recoveryservicesvault.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_recoveryservicesvault_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_recoveryservicesvault_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_vmbackuppolicy.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_vmbackuppolicy.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_vmbackuppolicy_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_vmbackuppolicy_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_openshiftmanagedcluster.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_openshiftmanagedcluster.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_openshiftmanagedcluster.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_openshiftmanagedcluster.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_subnet.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_vmbackuppolicy.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_privatednsrecordset.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_privatednsrecordset.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_privatednsrecordset.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_privatednsrecordset_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_privatednsrecordset_info.py validate-modules:required_if-unknown-key
+tests/utils/shippable/check_matrix.py replace-urlopen
+tests/utils/shippable/timing.py shebang
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.11.txt b/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.11.txt
new file mode 100644
index 00000000..519fa985
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.11.txt
@@ -0,0 +1,750 @@
+plugins/modules/azure_rm_aks.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_aks.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_aks.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_aks.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_aks.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_aks.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_aks.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_aks.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_aks_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_aks_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_aks_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_aks_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_aksversion_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_aksversion_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_aksversion_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_appgateway.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_appgateway.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appgateway.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_appgateway.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_appgateway.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_appgateway.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_applicationsecuritygroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_applicationsecuritygroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_applicationsecuritygroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_appserviceplan.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appserviceplan.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_appserviceplan.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_automationaccount.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_automationaccount.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_automationaccount_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_automationaccount_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_automationaccount_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_availabilityset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_availabilityset.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_availabilityset.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerinstance.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_containerinstance.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerinstance.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_containerinstance.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_containerinstance.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_containerinstance.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerinstance.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistry.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistry.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistry.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_deployment.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_deployment.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_deployment.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_deployment.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_deployment_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_deployment_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_deployment_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_deployment_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_dnszone.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnszone.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_dnszone.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_dnszone.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_dnszone_info.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_dnszone_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnszone_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_dnszone_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_dnszone_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_dnszone_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_functionapp.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_functionapp.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_functionapp.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_functionapp.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_functionapp_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_functionapp_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_functionapp_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_functionapp_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_gallery.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_gallery.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_gallery.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_gallery_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_gallery_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_galleryimage.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_galleryimage.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_galleryimage.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_galleryimage.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_galleryimage.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_galleryimage_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_galleryimage_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_galleryimage_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_galleryimageversion_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_galleryimageversion_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_image.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_image.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_image.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_image.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_image.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_image_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_image_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_image_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_image_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_image_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_iotdevice.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iotdevice.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iotdevice_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iotdevice_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iotdevicemodule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iotdevicemodule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iothub.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_iothub.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iothub.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iothub_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_iothub_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iothub_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_iothubconsumergroup.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_iothubconsumergroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_iothubconsumergroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvault.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_keyvault.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvault.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_keyvault.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_keyvault.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvault.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvault_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_keyvault_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvault_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvaultkey.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvaultkey.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvaultkey.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvaultkey_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_keyvaultkey_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvaultkey_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvaultkey_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_keyvaultsecret.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvaultsecret.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvaultsecret.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_keyvaultsecret_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_keyvaultsecret_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_manageddisk.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_manageddisk.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_manageddisk.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_manageddisk_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_manageddisk_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_manageddisk_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_manageddisk_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_managementgroup.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_managementgroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_managementgroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_networkinterface.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_networkinterface.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_networkinterface.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_networkinterface.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_networkinterface.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_networkinterface.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_networkinterface.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_publicipaddress.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_publicipaddress.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_publicipaddress.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_publicipaddress.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_publicipaddress.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_publicipaddress.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_resource.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resource.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_resource.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_resource.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_resource_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resource_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_resource_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_resource_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_resourcegroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resourcegroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_resourcegroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_registrationassignment.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_registrationassignment.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_registrationassignment.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_registrationassignment_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_registrationassignment_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_registrationdefinition.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_registrationdefinition.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_registrationdefinition.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_registrationdefinition.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_registrationdefinition_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_registrationdefinition_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_securitygroup.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_securitygroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_securitygroup.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_securitygroup.py validate-modules:mutually_exclusive-unknown
+plugins/modules/azure_rm_securitygroup.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_securitygroup.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_storageaccount.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_storageaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageaccount.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_storageaccount.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_storageaccount.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_storageaccount.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_storageblob.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageblob.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_storageblob.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_subnet.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_subnet.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_subnet.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_subnet.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_subnet_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_subnet_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_subnet_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_subscription_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_subscription_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_subscription_info.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_virtualmachine.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachine.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_virtualmachine.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualmachine.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachine.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachine.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachineextension.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineextension.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachineextension.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachineimage_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineimage_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachineimage_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescalesetextension_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetextension_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescalesetextension_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_webapp.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webapp.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_webapp.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_webapp.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_webapp.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_webapp_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webapp_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_webapp_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_webapp_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_webappslot.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webappslot.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_webappslot.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_webappslot.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_webappslot.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_autoscale.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_autoscale.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_autoscale.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_autoscale.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_autoscale.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_autoscale_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_autoscale_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_autoscale_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_autoscale_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlab.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlab.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlab.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlab_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlab_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlab_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlab_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabarmtemplate_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabarmtemplate_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabarmtemplate_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabartifact_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabartifact_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabartifact_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabartifactsource.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabartifactsource.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabartifactsource.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabartifactsource_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabartifactsource_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabartifactsource_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabartifactsource_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabcustomimage.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabcustomimage.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabcustomimage.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabcustomimage_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabenvironment.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabenvironment.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabenvironment.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabenvironment_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabenvironment_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabenvironment_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabenvironment_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabpolicy.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabpolicy.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabpolicy.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabpolicy_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabpolicy_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabpolicy_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabpolicy_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabvirtualmachine_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabvirtualmachine_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabvirtualmachine_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabvirtualmachine_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_devtestlabvirtualnetwork.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabvirtualnetwork.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabvirtualnetwork.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabvirtualnetwork_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabvirtualnetwork_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_loadbalancer.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_loadbalancer.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_loadbalancer.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_loganalyticsworkspace.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loganalyticsworkspace.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_loganalyticsworkspace.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbconfiguration.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbconfiguration.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbconfiguration_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbconfiguration_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbconfiguration_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_mariadbdatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbdatabase.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbdatabase.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbdatabase_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbdatabase_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbfirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbfirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbfirewallrule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbfirewallrule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbserver.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbserver.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mariadbserver_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_mariadbserver_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mariadbserver_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_monitorlogprofile.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_monitorlogprofile.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_monitorlogprofile.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlconfiguration.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlconfiguration.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlconfiguration.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlconfiguration_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlconfiguration_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlconfiguration_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_mysqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqldatabase.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqldatabase.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqldatabase_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqldatabase_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlfirewallrule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlfirewallrule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlserver.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlserver.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_mysqlserver_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_mysqlserver_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_mysqlserver_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlconfiguration.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlconfiguration.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlconfiguration.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlconfiguration_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlconfiguration_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlconfiguration_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_postgresqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqldatabase.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqldatabase.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqldatabase_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqldatabase_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlfirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlfirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlfirewallrule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlfirewallrule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlserver.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlserver.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_postgresqlserver_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_postgresqlserver_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_postgresqlserver_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_rediscache.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscache.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_rediscache.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_rediscache.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_rediscache.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_rediscache.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_rediscache_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscache_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_rediscache_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_rediscache_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_rediscachefirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscachefirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_rediscachefirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_roleassignment.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roleassignment.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_roleassignment.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_roleassignment_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roleassignment_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_roleassignment_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_roledefinition.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roledefinition.py validate-modules:invalid-argument-spec
+plugins/modules/azure_rm_roledefinition.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_roledefinition.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_roledefinition.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_roledefinition.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_roledefinition.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_roledefinition.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_route.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_route.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_route.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_route_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_route_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_routetable.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_routetable.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_routetable.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_routetable_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_routetable_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_routetable_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_routetable_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebus.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebus.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebus.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebus_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebus_info.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_servicebus_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_servicebus_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebus_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebusqueue.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebusqueue.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebusqueue.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebustopic.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebustopic.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_servicebustopic.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebustopic.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebustopicsubscription.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebustopicsubscription.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebustopicsubscription.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_snapshot.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_snapshot.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_snapshot.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_snapshot.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqldatabase.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_sqldatabase.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqldatabase.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlfirewallrule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqlfirewallrule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqlfirewallrule_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlfirewallrule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqlfirewallrule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlserver.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqlserver.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_sqlserver_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlserver_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_sqlserver_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanager.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_trafficmanager.py validate-modules:invalid-documentation
+plugins/modules/azure_rm_trafficmanager.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_trafficmanager.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanager.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanagerendpoint_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerendpoint_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanagerendpoint_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetworkpeering_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkpeering_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetworkpeering_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_batchaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_batchaccount.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_batchaccount.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_batchaccount.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_cdnprofile.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnprofile.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cdnprofile.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabschedule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabschedule.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabschedule.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabschedule_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_devtestlabschedule_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_devtestlabschedule_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_devtestlabschedule_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_lock.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_lock.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_lock_info.py validate-modules:doc-required-mismatch
+plugins/modules/azure_rm_lock_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_lock_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_azurefirewall.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_azurefirewall.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_azurefirewall.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_azurefirewall.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_azurefirewall.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_azurefirewall.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_azurefirewall.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_azurefirewall_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_azurefirewall_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_privatednszone.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_privatednszone.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_privatednszone_info.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_privatednszone_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_privatednszone_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_adpassword.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_adpassword.py validate-modules:import-before-documentation
+plugins/modules/azure_rm_adpassword.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adpassword.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_adpassword.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_adpassword_info.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adpassword_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_adpassword_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_adpassword_info.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_adpassword_info.py validate-modules:import-before-documentation
+plugins/modules/azure_rm_adserviceprincipal.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adserviceprincipal.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_adserviceprincipal.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_adserviceprincipal_info.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adserviceprincipal_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_adserviceprincipal_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_backupazurevm.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_backupazurevm.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_backupazurevm_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_backupazurevm_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_recoveryservicesvault.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_recoveryservicesvault.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_recoveryservicesvault_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_recoveryservicesvault_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_vmbackuppolicy.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_vmbackuppolicy.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_vmbackuppolicy_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_vmbackuppolicy_info.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_openshiftmanagedcluster.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_openshiftmanagedcluster.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_openshiftmanagedcluster.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_openshiftmanagedcluster.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_subnet.py validate-modules:doc-elements-mismatch
+plugins/modules/azure_rm_vmbackuppolicy.py validate-modules:parameter-list-no-elements
+plugins/modules/azure_rm_privatednsrecordset.py validate-modules:invalid-ansiblemodule-schema
+plugins/modules/azure_rm_privatednsrecordset.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_privatednsrecordset.py validate-modules:required_if-unknown-key
+plugins/modules/azure_rm_privatednsrecordset_info.py validate-modules:required_if-requirements-unknown
+plugins/modules/azure_rm_privatednsrecordset_info.py validate-modules:required_if-unknown-key
+tests/utils/shippable/check_matrix.py replace-urlopen
+tests/utils/shippable/timing.py shebang
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.9.txt b/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.9.txt
new file mode 100644
index 00000000..caf5ef31
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/sanity/ignore-2.9.txt
@@ -0,0 +1,186 @@
+plugins/modules/azure_rm_aks.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_aks.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_aks.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_aks.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_aks_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_aksversion_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appgateway.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_appgateway.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_applicationsecuritygroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_applicationsecuritygroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appserviceplan.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_appserviceplan_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_availabilityset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_availabilityset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerinstance.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_containerinstance.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerinstance_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistry.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistry_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistryreplication_info.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_containerregistrywebhook_info.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_deployment.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_deployment_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_dnsrecordset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnsrecordset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnszone.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_dnszone_info.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_dnszone_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_functionapp.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_functionapp_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_galleryimageversion.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_image.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_image_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvault.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_keyvault.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvaultkey.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_keyvaultsecret.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_manageddisk.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_networkinterface.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_networkinterface.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_networkinterface_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_publicipaddress.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_publicipaddress_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resource.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resource_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resourcegroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_resourcegroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_securitygroup.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_securitygroup.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_securitygroup.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_securitygroup.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_securitygroup_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageaccount.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_storageaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageaccount_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_storageblob.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_subnet.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_subnet_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachine.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachine_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineextension.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineextension_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachineimage_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescaleset.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescaleset_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetextension.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetextension_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetinstance.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualmachinescalesetinstance_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webapp.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webapp_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_webappslot.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_autoscale.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_autoscale.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_autoscale_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnendpoint.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_devtestlab.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabartifactsource.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabcustomimage.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabpolicy.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_devtestlabvirtualmachine.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_devtestlabvirtualnetwork.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_hdinsightcluster.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loadbalancer.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_loadbalancer.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_loganalyticsworkspace.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbdatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mariadbserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlconfiguration.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_mysqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlconfiguration.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_postgresqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscache.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscache.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_rediscache.py validate-modules:doc-type-does-not-match-spec
+plugins/modules/azure_rm_rediscache_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_rediscachefirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roleassignment.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roleassignment_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roledefinition.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_roledefinition.py validate-modules:invalid-argument-spec
+plugins/modules/azure_rm_roledefinition.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_roledefinition_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_route.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_routetable.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_routetable_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebus.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebus_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebusqueue.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebustopic.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebustopicsubscription.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_servicebussaspolicy.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqldatabase.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqldatabase_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlfirewallrule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlfirewallrule_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlserver.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_sqlserver_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanager.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_trafficmanager.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_trafficmanager.py validate-modules:invalid-documentation
+plugins/modules/azure_rm_trafficmanager.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_trafficmanagerendpoint.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerendpoint_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_trafficmanagerprofile.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_trafficmanagerprofile_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetwork.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetwork_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkpeering.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkpeering_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-choices-do-not-match-spec
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-default-does-not-match-spec
+plugins/modules/azure_rm_virtualnetworkgateway.py validate-modules:doc-missing-type
+plugins/modules/azure_rm_batchaccount.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnendpoint_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnprofile.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cosmosdbaccount.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_cosmosdbaccount_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_devtestlabschedule.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_hdinsightcluster_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loadbalancer_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_loganalyticsworkspace_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_cdnprofile_info.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_azurefirewall.py validate-modules:missing-suboption-docs
+plugins/modules/azure_rm_azurefirewall.py validate-modules:parameter-type-not-in-doc
+plugins/modules/azure_rm_azurefirewall.py validate-modules:undocumented-parameter
+plugins/modules/azure_rm_adpassword.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adpassword.py validate-modules:return-syntax-error
+plugins/modules/azure_rm_adpassword.py validate-modules:import-before-documentation
+plugins/modules/azure_rm_adpassword_info.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adpassword_info.py validate-modules:import-before-documentation
+plugins/modules/azure_rm_adserviceprincipal.py validate-modules:nonexistent-parameter-documented
+plugins/modules/azure_rm_adserviceprincipal_info.py validate-modules:nonexistent-parameter-documented
+tests/utils/shippable/check_matrix.py replace-urlopen
+tests/utils/shippable/timing.py shebang
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/ado/ado.sh b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/ado/ado.sh
new file mode 100755
index 00000000..d9eb05a8
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/ado/ado.sh
@@ -0,0 +1,138 @@
+#!/usr/bin/env bash
+
+set -o pipefail -eux
+
+declare -a args
+IFS='/:' read -ra args <<< "$1"
+
+group="${args[0]}"
+
+command -v python
+python -V
+
+if [ "$2" = "2.7" ]
+then
+ command -v pip
+ pip --version
+ pip list --disable-pip-version-check
+else
+ if [ "$2" = "3.8" ]
+ then
+ sudo apt update
+ sudo apt install software-properties-common
+ sudo add-apt-repository ppa:deadsnakes/ppa
+ sudo apt install python"$2" -y
+ sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
+ fi
+
+ command -v pip3
+ pip3 --version
+ pip3 list --disable-pip-version-check
+fi
+
+export PATH="${PWD}/bin:${PATH}"
+export PYTHONIOENCODING="UTF-8"
+export LC_ALL="en_US.utf-8"
+
+if [ "$2" = "2.7" ]
+then
+ pip install virtualenv
+ virtualenv --python /usr/bin/python2.7 ~/ansible-venv
+else
+ pip3 install virtualenv
+ virtualenv --python /usr/bin/python"$2" ~/ansible-venv
+fi
+
+set +ux
+. ~/ansible-venv/bin/activate
+set -ux
+
+if [ "$2" = "2.7" ]
+then
+ if [ "$3" = "devel" ]
+ then
+ pip install git+https://github.com/ansible/ansible.git@devel --disable-pip-version-check
+ else
+ git clone https://github.com/ansible/ansible.git
+ cd "ansible"
+ git checkout "stable-$3"
+ source hacking/env-setup
+ pip install paramiko PyYAML Jinja2 httplib2 six
+ fi
+else
+ if [ "$3" = "devel" ]
+ then
+ pip3 install git+https://github.com/ansible/ansible.git@devel --disable-pip-version-check
+ else
+ git clone https://github.com/ansible/ansible.git
+ cd "ansible"
+ git checkout "stable-$3"
+ source hacking/env-setup
+ pip3 install paramiko PyYAML Jinja2 httplib2 six
+ fi
+fi
+
+TEST_DIR="${HOME}/.ansible/ansible_collections/azure/azcollection"
+mkdir -p "${TEST_DIR}"
+cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}"
+cd "${TEST_DIR}"
+mkdir -p shippable/testresults
+
+if [ "$2" = "2.7" ]
+then
+ pip install --upgrade pip
+ pip install -I -r "${TEST_DIR}/requirements-azure.txt"
+ pip3 install setuptools
+ pip3 install -I -r "${TEST_DIR}/sanity-requirements-azure.txt"
+ pip3 list
+else
+ pip3 install -I -r "${TEST_DIR}/requirements-azure.txt"
+ pip3 install -I -r "${TEST_DIR}/sanity-requirements-azure.txt"
+ pip3 list
+fi
+
+timeout=60
+
+if [ "$4" = "all" ]
+then
+ echo "All module need test"
+else
+ path_dir="${TEST_DIR}/tests/integration/targets/"
+ for item in "$path_dir"*
+ do
+ if [ "${item}" = "$path_dir""$4" ]
+ then
+ echo "PASS"
+ else
+ echo " " >> "${item}"/aliases
+ echo "disabled" >> "${item}"/aliases
+ fi
+ done
+fi
+echo '--------------------------------------------'
+ansible --version
+echo '--------------------------------------------'
+
+ansible-test env --dump --show --timeout "${timeout}" --color -v
+
+cat <<EOF >> "${TEST_DIR}"/tests/integration/cloud-config-azure.ini
+[default]
+AZURE_CLIENT_ID:${AZURE_CLIENT_ID}
+AZURE_SECRET:${AZURE_SECRET}
+AZURE_SUBSCRIPTION_ID:${AZURE_SUBSCRIPTION_ID}
+AZURE_SUBSCRIPTION_SEC_ID:${AZURE_SUBSCRIPTION_SEC_ID}
+AZURE_TENANT:${AZURE_TENANT}
+RESOURCE_GROUP:${RESOURCE_GROUP}
+RESOURCE_GROUP_SECONDARY:${RESOURCE_GROUP_SECONDARY}
+RESOURCE_GROUP_DATALAKE:${RESOURCE_GROUP_DATALAKE}
+AZURE_PRINCIPAL_ID:${AZURE_PRINCIPAL_ID}
+AZURE_MANAGED_BY_TENANT_ID:${AZURE_MANAGED_BY_TENANT_ID}
+AZURE_ROLE_DEFINITION_ID:${AZURE_ROLE_DEFINITION_ID}
+EOF
+
+if [ "sanity" = "${group}" ]
+then
+ ansible-test sanity --color -v --junit
+else
+ ansible-test integration --color -v --retry-on-error "shippable/azure/group${group}/" --allow-destructive
+fi
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/azure.sh b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/azure.sh
new file mode 100755
index 00000000..da037e09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/azure.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+set -o pipefail -eux
+
+declare -a args
+IFS='/:' read -ra args <<< "$1"
+
+cloud="${args[0]}"
+python="${args[1]}"
+group="${args[2]}"
+
+target="shippable/${cloud}/group${group}/"
+
+stage="${S:-prod}"
+
+changed_all_target="shippable/${cloud}/smoketest/"
+
+if ! ansible-test integration "${changed_all_target}" --list-targets > /dev/null 2>&1; then
+ # no smoketest tests are available for this cloud
+ changed_all_target="none"
+fi
+
+if [ "${group}" == "1" ]; then
+ # only run smoketest tests for group1
+ changed_all_mode="include"
+else
+ # smoketest tests already covered by group1
+ changed_all_mode="exclude"
+fi
+
+# shellcheck disable=SC2086
+ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
+ --remote-terminate always --remote-stage "${stage}" \
+ --docker --python "${python}" --changed-all-target "${changed_all_target}" --changed-all-mode "${changed_all_mode}"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/check_matrix.py b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/check_matrix.py
new file mode 100755
index 00000000..96a37758
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/check_matrix.py
@@ -0,0 +1,114 @@
+#!/usr/bin/env python
+"""Verify the currently executing Shippable test matrix matches the one defined in the "shippable.yml" file."""
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import datetime
+import json
+import os
+import re
+import sys
+import time
+from ansible.module_utils.urls import open_url as urlopen
+
+try:
+ from typing import NoReturn
+except ImportError:
+ NoReturn = None
+
+
+def main(): # type: () -> None
+ """Main entry point."""
+ repo_full_name = os.environ['REPO_FULL_NAME']
+ required_repo_full_name = 'ansible-collections/azure'
+
+ if repo_full_name != required_repo_full_name:
+ sys.stderr.write('Skipping matrix check on repo "%s" which is not "%s".\n' % (repo_full_name, required_repo_full_name))
+ return
+
+ with open('shippable.yml', 'rb') as yaml_file:
+ yaml = yaml_file.read().decode('utf-8').splitlines()
+
+ defined_matrix = [match.group(1) for match in [re.search(r'^ *- env: T=(.*)$', line) for line in yaml] if match and match.group(1) != 'none']
+
+ if not defined_matrix:
+ fail('No matrix entries found in the "shippable.yml" file.',
+ 'Did you modify the "shippable.yml" file?')
+
+ run_id = os.environ['SHIPPABLE_BUILD_ID']
+ sleep = 1
+ jobs = []
+
+ for attempts_remaining in range(4, -1, -1):
+ try:
+ jobs = json.loads(urlopen('https://api.shippable.com/jobs?runIds=%s' % run_id).read())
+
+ if not isinstance(jobs, list):
+ raise Exception('Shippable run %s data is not a list.' % run_id)
+
+ break
+ except Exception as ex:
+ if not attempts_remaining:
+ fail('Unable to retrieve Shippable run %s matrix.' % run_id,
+ str(ex))
+
+ sys.stderr.write('Unable to retrieve Shippable run %s matrix: %s\n' % (run_id, ex))
+ sys.stderr.write('Trying again in %d seconds...\n' % sleep)
+ time.sleep(sleep)
+ sleep *= 2
+
+ if len(jobs) != len(defined_matrix):
+ if len(jobs) == 1:
+ hint = '\n\nMake sure you do not use the "Rebuild with SSH" option.'
+ else:
+ hint = ''
+
+ fail('Shippable run %s has %d jobs instead of the expected %d jobs.' % (run_id, len(jobs), len(defined_matrix)),
+ 'Try re-running the entire matrix.%s' % hint)
+
+ actual_matrix = dict((job.get('jobNumber'), dict(tuple(line.split('=', 1)) for line in job.get('env', [])).get('T', '')) for job in jobs)
+ errors = [(job_number, test, actual_matrix.get(job_number)) for job_number, test in enumerate(defined_matrix, 1) if actual_matrix.get(job_number) != test]
+
+ if len(errors):
+ error_summary = '\n'.join('Job %s expected "%s" but found "%s" instead.' % (job_number, expected, actual) for job_number, expected, actual in errors)
+
+ fail('Shippable run %s has a job matrix mismatch.' % run_id,
+ 'Try re-running the entire matrix.\n\n%s' % error_summary)
+
+
+def fail(message, output): # type: (str, str) -> NoReturn
+ # Include a leading newline to improve readability on Shippable "Tests" tab.
+ # Without this, the first line becomes indented.
+ output = '\n' + output.strip()
+
+ timestamp = datetime.datetime.utcnow().replace(microsecond=0).isoformat()
+
+ # hack to avoid requiring junit-xml, which isn't pre-installed on Shippable outside our test containers
+ xml = '''
+<?xml version="1.0" encoding="utf-8"?>
+<testsuites disabled="0" errors="1" failures="0" tests="1" time="0.0">
+\t<testsuite disabled="0" errors="1" failures="0" file="None" log="None" name="ansible-test" skipped="0" tests="1" time="0" timestamp="%s" url="None">
+\t\t<testcase classname="timeout" name="timeout">
+\t\t\t<error message="%s" type="error">%s</error>
+\t\t</testcase>
+\t</testsuite>
+</testsuites>
+''' % (timestamp, message, output)
+
+ path = 'shippable/testresults/check-matrix.xml'
+ dir_path = os.path.dirname(path)
+
+ if not os.path.exists(dir_path):
+ os.makedirs(dir_path)
+
+ with open(path, 'w') as junit_fd:
+ junit_fd.write(xml.lstrip())
+
+ sys.stderr.write(message + '\n')
+ sys.stderr.write(output + '\n')
+
+ sys.exit(1)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/cloud.sh b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/cloud.sh
new file mode 100755
index 00000000..da037e09
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/cloud.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+set -o pipefail -eux
+
+declare -a args
+IFS='/:' read -ra args <<< "$1"
+
+cloud="${args[0]}"
+python="${args[1]}"
+group="${args[2]}"
+
+target="shippable/${cloud}/group${group}/"
+
+stage="${S:-prod}"
+
+changed_all_target="shippable/${cloud}/smoketest/"
+
+if ! ansible-test integration "${changed_all_target}" --list-targets > /dev/null 2>&1; then
+ # no smoketest tests are available for this cloud
+ changed_all_target="none"
+fi
+
+if [ "${group}" == "1" ]; then
+ # only run smoketest tests for group1
+ changed_all_mode="include"
+else
+ # smoketest tests already covered by group1
+ changed_all_mode="exclude"
+fi
+
+# shellcheck disable=SC2086
+ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
+ --remote-terminate always --remote-stage "${stage}" \
+ --docker --python "${python}" --changed-all-target "${changed_all_target}" --changed-all-mode "${changed_all_mode}"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/sanity.sh b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/sanity.sh
new file mode 100755
index 00000000..0c54a42c
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/sanity.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+set -o pipefail -eux
+
+# shellcheck disable=SC2086
+ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
+ --docker \
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/shippable.sh b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/shippable.sh
new file mode 100755
index 00000000..b6723578
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/shippable.sh
@@ -0,0 +1,124 @@
+#!/usr/bin/env bash
+
+set -o pipefail -eux
+
+declare -a args
+IFS='/:' read -ra args <<< "$1"
+
+script="${args[0]}"
+
+test="$1"
+
+docker images ansible/ansible
+docker images quay.io/ansible/*
+docker ps
+
+for container in $(docker ps --format '{{.Image}} {{.ID}}' | grep -v '^drydock/' | sed 's/^.* //'); do
+ docker rm -f "${container}" || true # ignore errors
+done
+
+docker ps
+
+if [ -d /home/shippable/cache/ ]; then
+ ls -la /home/shippable/cache/
+fi
+
+command -v python
+python -V
+
+command -v pip
+pip --version
+pip list --disable-pip-version-check
+
+export PATH="${PWD}/bin:${PATH}"
+export PYTHONIOENCODING='utf-8'
+
+if [ "${JOB_TRIGGERED_BY_NAME:-}" == "nightly-trigger" ]; then
+ COVERAGE=yes
+ COMPLETE=yes
+fi
+
+if [ -n "${COVERAGE:-}" ]; then
+ # on-demand coverage reporting triggered by setting the COVERAGE environment variable to a non-empty value
+ export COVERAGE="--coverage"
+elif [[ "${COMMIT_MESSAGE}" =~ ci_coverage ]]; then
+ # on-demand coverage reporting triggered by having 'ci_coverage' in the latest commit message
+ export COVERAGE="--coverage"
+else
+ # on-demand coverage reporting disabled (default behavior, always-on coverage reporting remains enabled)
+ export COVERAGE="--coverage-check"
+fi
+
+if [ -n "${COMPLETE:-}" ]; then
+ # disable change detection triggered by setting the COMPLETE environment variable to a non-empty value
+ export CHANGED=""
+elif [[ "${COMMIT_MESSAGE}" =~ ci_complete ]]; then
+ # disable change detection triggered by having 'ci_complete' in the latest commit message
+ export CHANGED=""
+else
+ # enable change detection (default behavior)
+ export CHANGED="--changed"
+fi
+
+if [ "${IS_PULL_REQUEST:-}" == "true" ]; then
+ # run unstable tests which are targeted by focused changes on PRs
+ export UNSTABLE="--allow-unstable-changed"
+else
+ # do not run unstable tests outside PRs
+ export UNSTABLE=""
+fi
+
+virtualenv --python /usr/bin/python3.7 ~/ansible-venv
+set +ux
+. ~/ansible-venv/bin/activate
+set -ux
+
+pip install ansible==2.9.0 --disable-pip-version-check
+
+TEST_DIR="${HOME}/.ansible/ansible_collections/azure/azcollection"
+mkdir -p "${TEST_DIR}"
+cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}"
+cd "${TEST_DIR}"
+
+function cleanup
+{
+ if [ -d tests/output/coverage/ ]; then
+ if find tests/output/coverage/ -mindepth 1 -name '.*' -prune -o -print -quit | grep -q .; then
+ # for complete on-demand coverage generate a report for all files with no coverage on the "other" job so we only have one copy
+ if [ "${COVERAGE}" == "--coverage" ] && [ "${CHANGED}" == "" ] && [ "${test}" == "sanity/1" ]; then
+ stub="--stub"
+ else
+ stub=""
+ fi
+
+ # shellcheck disable=SC2086
+ ansible-test coverage xml --color -v --requirements --group-by command --group-by version ${stub:+"$stub"}
+ cp -a tests/output/reports/coverage=*.xml shippable/codecoverage/
+ fi
+ fi
+
+ if [ -d tests/output/junit/ ]; then
+ cp -aT tests/output/junit/ shippable/testresults/
+ fi
+
+ if [ -d tests/output/data/ ]; then
+ cp -a tests/output/data/ shippable/testresults/
+ fi
+
+ if [ -d tests/output/bot/ ]; then
+ cp -aT tests/output/bot/ shippable/testresults/
+ fi
+}
+
+trap cleanup EXIT
+
+if [[ "${COVERAGE:-}" == "--coverage" ]]; then
+ timeout=60
+else
+ timeout=45
+fi
+
+ansible-test env --dump --show --timeout "${timeout}" --color -v
+
+"tests/utils/shippable/check_matrix.py"
+"tests/utils/shippable/${script}.sh" "${test}"
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/timing.py b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/timing.py
new file mode 100755
index 00000000..d9456855
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/timing.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3.6
+from __future__ import (absolute_import, division, print_function)
+__metaclass__ = type
+
+import sys
+import time
+
+start = time.time()
+
+sys.stdin.reconfigure(errors='surrogateescape')
+sys.stdout.reconfigure(errors='surrogateescape')
+
+for line in sys.stdin:
+ seconds = time.time() - start
+ sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line))
+ sys.stdout.flush()
diff --git a/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/timing.sh b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/timing.sh
new file mode 100755
index 00000000..77e25783
--- /dev/null
+++ b/collections-debian-merged/ansible_collections/azure/azcollection/tests/utils/shippable/timing.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+set -o pipefail -eu
+
+"$@" 2>&1 | "$(dirname "$0")/timing.py"