-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ansible Deploy VM playbook
46 lines (46 loc) · 1.29 KB
/
Ansible Deploy VM playbook
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
- hosts: localhost
tasks:
- name: Include secret environment items
include_vars:
file: keys.yml
name: keys
- name: DTC-TESTVM1
vmware_guest:
hostname: "{{ keys.vcenter_server }}"
username: "{{ keys.vcenter_user }}"
password: "{{ keys.vcenter_pass }}"
validate_certs: False
name: DTC-TESTVM1
template: WIN2019STD
datacenter: "{{ keys.datacenter_name }}"
folder: /{{ keys.datacenter_name }}/vm
cluster: "{{ keys.cluster_name }}"
datastore: "SSDCluster"
disk:
- size_gb: "150"
type: "thick"
hardware:
memory_mb: "32768"
num_cpus: "4"
num_cpu_cores_per_socket: "1"
networks:
- name: VM Network
ip: 10.229.31.86
netmask: 255.255.255.0
gateway: 10.229.31.1
type: static
dns_servers: 10.229.31.195
customization:
hostname: "DTC-TESTVM1"
dns_servers:
- 10.229.31.195
- 10.229.31.245
domain: "DANY.NYCNET"
joindomain: "DANY.NYCNET"
password: "{{keys.password}}"
domainadmin: "{{keys.domainadmin}}"
domainadminpassword: "{{keys.domainadminpassword}}"
timezone: "035"
state: poweredon
wait_for_ip_address: yes
delegate_to: localhost