File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ - name : Example virtual_disk_info module
3+ hosts : localhost
4+ connection : local
5+ gather_facts : false
6+ vars :
7+ # Source http link:
8+ # https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
9+ virtual_disk_name : focal-server-cloudimg-amd64.img
10+
11+ tasks :
12+ # ------------------------------------------------------
13+ - name : List all virtual disks
14+ scale_computing.hypercore.virtual_disk_info :
15+ register : virtual_disk_results
16+
17+ - name : Show all virtual disks
18+ debug :
19+ var : virtual_disk_results
20+
21+ # ------------------------------------------------------
22+ - name : Get info about specific virtual disk - {{ virtual_disk_name }}
23+ scale_computing.hypercore.virtual_disk_info :
24+ name : " {{ virtual_disk_name }}"
25+ register : virtual_disk_results
26+
27+ - name : Show info about single virtual disk
28+ debug :
29+ var : virtual_disk_results
30+
31+ # ------------------------------------------------------
32+ - name : Get info about not present virtual disk
33+ scale_computing.hypercore.virtual_disk_info :
34+ name : no-such-virtual-disk-20sb9uagwa3.iso
35+ register : virtual_disk_results
36+
37+ - name : Show info about absent virtual disk
38+ debug :
39+ var : virtual_disk_results
You can’t perform that action at this time.
0 commit comments