-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathimages.yml
84 lines (78 loc) · 2.19 KB
/
images.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
- name: Images playbook
hosts: localhost
gather_facts: false
collections:
- nutanix.ncp
module_defaults:
group/nutanix.ncp.ntnx:
nutanix_host: <host_ip>
nutanix_username: <user>
nutanix_password: <pass>
validate_certs: false
tasks:
- name: Setting Variables
set_fact:
image_uuid: ""
source_path: ""
source_uri: ""
clusters_name: ""
- name: create image from local workstation
ntnx_images:
state: "present"
source_path: "{{source_path}}"
clusters:
- name: "{{clusters_name}}"
categories:
AppFamily:
- Backup
checksum:
checksum_algorithm: SHA_1
checksum_value: 44610efd741a3ab4a548a81ea94869bb8b692977
name: "ansible-test-with-categories-mapping"
desc: "description"
image_type: "ISO_IMAGE"
version:
product_name: "test"
product_version: "1.2.0"
wait: true
- name: create image from with source as remote server file location
ntnx_images:
state: "present"
source_uri: "{{source_uri}}"
clusters:
- name: "{{clusters_name}}"
categories:
AppFamily:
- Backup
checksum:
checksum_algorithm: SHA_1
checksum_value: 44610efd741a3ab4a548a81ea94869bb8b692977
name: "ansible-test-with-categories-mapping"
desc: "description"
image_type: "DISK_IMAGE"
version:
product_name: "test"
product_version: "1.2.0"
wait: true
- name: override categories of existing image
ntnx_images:
state: "present"
image_uuid: "{{image-uuid}}"
categories:
AppTier:
- Default
AppFamily:
- Backup
wait: true
- name: dettach all categories from existing image
ntnx_images:
state: "present"
image_uuid: "00000000-0000-0000-0000-000000000000"
remove_categories: true
wait: true
- name: delete existing image
ntnx_images:
state: "absent"
image_uuid: "00000000-0000-0000-0000-000000000000"
wait: true