mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
919 B
YAML
44 lines
919 B
YAML
7 years ago
|
- name: set location
|
||
|
set_fact:
|
||
|
location: eastus
|
||
|
|
||
7 years ago
|
- name: Get facts for a specific image
|
||
|
azure_rm_virtualmachineimage_facts:
|
||
|
location: "{{ location }}"
|
||
|
publisher: OpenLogic
|
||
|
offer: CentOS
|
||
7 years ago
|
sku: '7.3'
|
||
|
version: '7.3.20170707'
|
||
7 years ago
|
register: output
|
||
|
|
||
|
- assert:
|
||
|
that: azure_vmimages | length == 1
|
||
|
|
||
|
- name: List available versions
|
||
|
azure_rm_virtualmachineimage_facts:
|
||
|
location: "{{ location }}"
|
||
|
publisher: OpenLogic
|
||
|
offer: CentOS
|
||
7 years ago
|
sku: '7.3'
|
||
7 years ago
|
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
|