mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Migrate more Azure integration tests. (#29034)
This commit is contained in:
parent
8f4c8844c4
commit
08bdb6198e
10 changed files with 34 additions and 8 deletions
3
test/integration/targets/azure_rm_deployment/aliases
Normal file
3
test/integration/targets/azure_rm_deployment/aliases
Normal file
|
@ -0,0 +1,3 @@
|
|||
cloud/azure
|
||||
posix/ci/cloud/group2/azure
|
||||
destructive
|
|
@ -0,0 +1,2 @@
|
|||
dependencies:
|
||||
- setup_azure
|
29
test/integration/targets/azure_rm_deployment/tasks/main.yml
Normal file
29
test/integration/targets/azure_rm_deployment/tasks/main.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
- 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: "{{ 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: "{{ 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 }}"
|
Loading…
Add table
Add a link
Reference in a new issue