-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildinfra.yml
56 lines (56 loc) · 1.94 KB
/
buildinfra.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
---
- name: Testing terraform module
connection: local
hosts: 127.0.0.1
gather_facts: no
vars_prompt:
- name: "vsphere_server"
prompt: "vSphere FQDN or IP"
- name: "vsphere_user"
prompt: "vSphere user"
- name: "vsphere_pass"
prompt: "vSphere password"
private: yes
- name: "vsphere_datacenter"
prompt: "vSphere datacenter to create the plan to"
- name: "vsphere_datastore"
prompt: "vSphere datastore to create the plan to"
- name: "vsphere_pool"
prompt: |
vSphere resource pool.
If you don't have a cluster, it's going to be your ESXi host with /Resources/
Eg: 192.168.0.10/Resources
- name: "vsphere_network"
prompt: "Name of the network"
default: "VM Network"
- name: "vsphere_template"
prompt: "Name of the VM template to create from"
- name: "vm_name"
prompt: "Name of the VM to create"
- name: "vm_admin_pass"
prompt: "Windows administrator password"
- name: "vm_folder"
prompt: "The path to the folder to put this virtual machine in, relative to the datacenter that the resource pool is in"
- name: "vm_cpu"
prompt: "Number of vCPUs"
default: 2
- name: "vm_memory"
prompt: "RAM (in MB)"
default: 4096
tasks:
- terraform:
project_path: "{{ playbook_dir }}"
variables:
vsphere_server: "{{ vsphere_server }}"
vsphere_user: "{{ vsphere_user }}"
vsphere_pass: "{{ vsphere_pass }}"
vsphere_datacenter: "{{ vsphere_datacenter }}"
vsphere_datastore: "{{ vsphere_datastore }}"
vsphere_pool: "{{ vsphere_pool }}"
vsphere_network: "{{ vsphere_network }}"
vsphere_template: "{{ vsphere_template }}"
vm_name: "{{ vm_name }}"
vm_admin_pass: "{{ vm_admin_pass }}"
vm_folder: "{{ vm_folder }}"
vm_cpu: "{{ vm_cpu }}"
vm_memory: "{{ vm_memory }}"