summaryrefslogtreecommitdiff
path: root/test/integration/targets/azure_rm_virtualmachineimage_info/tasks/main.yml
blob: 5d16141dfa4792d5bbdd21b60e314821f489c468 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
- name: set location
  set_fact:
    location: eastus

- name: Get facts for a specific image
  azure_rm_virtualmachineimage_info:
    location: "{{ location }}"
    publisher: OpenLogic
    offer: CentOS
    sku: '7.3'
    version: '7.3.20170707'
  register: output

- assert:
      that: output['vmimages'] | length == 1

- name: List available versions
  azure_rm_virtualmachineimage_info:
    location: "{{ location }}"
    publisher: OpenLogic
    offer: CentOS
    sku: '7.3'
  register: output

- assert:
      that: output['vmimages'] | length > 0

- name: List available offers
  azure_rm_virtualmachineimage_info:
    location: "{{ location }}"
    publisher: OpenLogic
  register: output

- assert:
      that: output['vmimages'] | length > 0

- name: List available publishers
  azure_rm_virtualmachineimage_info:
    location: "{{ location }}"
  register: output

- assert:
      that: output['vmimages'] | length > 0