2017-09-06 02:38:56 +00:00
|
|
|
- name: set location
|
|
|
|
set_fact:
|
|
|
|
location: eastus
|
|
|
|
|
2017-08-11 23:16:39 +00:00
|
|
|
- name: Get facts for a specific image
|
|
|
|
azure_rm_virtualmachineimage_facts:
|
|
|
|
location: "{{ location }}"
|
|
|
|
publisher: OpenLogic
|
|
|
|
offer: CentOS
|
2017-09-06 02:38:56 +00:00
|
|
|
sku: '7.3'
|
|
|
|
version: '7.3.20170707'
|
2017-08-11 23:16:39 +00:00
|
|
|
register: output
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that: azure_vmimages | length == 1
|
|
|
|
|
|
|
|
- name: List available versions
|
|
|
|
azure_rm_virtualmachineimage_facts:
|
|
|
|
location: "{{ location }}"
|
|
|
|
publisher: OpenLogic
|
|
|
|
offer: CentOS
|
2017-09-06 02:38:56 +00:00
|
|
|
sku: '7.3'
|
2017-08-11 23:16:39 +00:00
|
|
|
register: output
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that: azure_vmimages | length > 0
|
|
|
|
|
|
|
|
- name: List available offers
|
|
|
|
azure_rm_virtualmachineimage_facts:
|
|
|
|
location: "{{ location }}"
|
|
|
|
publisher: OpenLogic
|
|
|
|
register: output
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that: azure_vmimages | length > 0
|
|
|
|
|
|
|
|
- name: List available publishers
|
|
|
|
azure_rm_virtualmachineimage_facts:
|
|
|
|
location: "{{ location }}"
|
|
|
|
register: output
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that: azure_vmimages | length > 0
|