Migrate more Azure integration tests. (#29034)

This commit is contained in:
Matt Clay 2017-09-05 19:38:56 -07:00 committed by GitHub
parent 8f4c8844c4
commit 08bdb6198e
10 changed files with 34 additions and 8 deletions

View file

@ -110,7 +110,7 @@ except:
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
AZURE_ENUM_MODULES = ['azure.mgmt.compute.models.compute_management_client_enums']
AZURE_ENUM_MODULES = ['azure.mgmt.compute.models']
class AzureRMVirtualMachineImageFacts(AzureRMModuleBase):

View file

@ -0,0 +1,3 @@
cloud/azure
posix/ci/cloud/group2/azure
destructive

View file

@ -0,0 +1,2 @@
dependencies:
- setup_azure

View file

@ -1,16 +1,22 @@
- name: Create random dns label
set_fact:
dns_label: "test{{ resource_group | hash('md5') | truncate(16, True, '') + (65535 | random | string) }}"
- name: Create Azure Deploy
azure_rm_deployment:
resource_group: Test_Deployment
resource_group: "{{ resource_group }}"
location: "eastus"
template_link: 'https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-linux/azuredeploy.json'
deployment_name: "{{ dns_label }}"
parameters:
adminUsername:
value: chouseknecht
adminPassword:
value: password123!
dnsLabelPrefix:
value: testvm9910001
value: "{{ dns_label }}"
ubuntuOSVersion:
value: "14.04.2-LTS"
value: "16.04.0-LTS"
register: output
- name: Add new instance to host group

View file

@ -0,0 +1,4 @@
cloud/azure
posix/ci/cloud/group2/azure
destructive
azure_rm_securitygroup_facts

View file

@ -0,0 +1,2 @@
dependencies:
- setup_azure

View file

@ -0,0 +1,3 @@
cloud/azure
posix/ci/cloud/group2/azure
destructive

View file

@ -0,0 +1,2 @@
dependencies:
- setup_azure

View file

@ -1,10 +1,14 @@
- name: set location
set_fact:
location: eastus
- name: Get facts for a specific image
azure_rm_virtualmachineimage_facts:
location: "{{ location }}"
publisher: OpenLogic
offer: CentOS
sku: '7.1'
version: '7.1.20150731'
sku: '7.3'
version: '7.3.20170707'
register: output
- assert:
@ -15,7 +19,7 @@
location: "{{ location }}"
publisher: OpenLogic
offer: CentOS
sku: '7.1'
sku: '7.3'
register: output
- assert: