azure_rm_virtualmachine: Add 'accept_terms' for accepting terms when deploying paid marketplace images (#44701)

azure_rm_storageaccount: Add 'StandardSSD_LRS', and choices to correct unrelated sanity error
This commit is contained in:
Jasper Aorangi 2018-08-30 12:14:44 +12:00 committed by Matt Davis
commit 2541a8c494
6 changed files with 140 additions and 9 deletions

View file

@ -403,3 +403,57 @@
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"
## Tests possible when CI user acccount setup with required authority
#- name: Set test facts
#set_fact:
#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
#- 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: "avbs{{ resource_group | hash('md5') | truncate(7, True, '') }}"
#image: "{{ image_paid }}"
#plan_paid: "{{ plan_paid }}"
#register: output
#- assert:
#that:
#- output.changed
#- output.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: "avbs{{ resource_group | hash('md5') | truncate(7, True, '') }}"
#image: "{{ image_paid }}"
#plan_paid: "{{ plan_paid }}"
#- assert:
#that: not output.changed