configure-oglivelgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Line | |
---|
1 | terraform { |
---|
2 | required_version = ">= 0.12" |
---|
3 | backend "local" { |
---|
4 | } |
---|
5 | required_providers { |
---|
6 | esxi = { |
---|
7 | source = "qindel.com/narenas/esxi" |
---|
8 | version = "~> 0.1" |
---|
9 | } |
---|
10 | } |
---|
11 | } |
---|
12 | |
---|
13 | provider "esxi" { |
---|
14 | esxi_hostname = "esxi-jenkins.evlt.uma.es" |
---|
15 | esxi_hostport = "22" |
---|
16 | esxi_hostssl = "443" |
---|
17 | esxi_username = "root" |
---|
18 | esxi_password = var.vi_password |
---|
19 | } |
---|
20 | |
---|
21 | resource "esxi_guest" "modelo" { |
---|
22 | guest_name = format("og-%s-modelo", var.ogversion) |
---|
23 | disk_store = "almacen.00" |
---|
24 | memsize = 1024 |
---|
25 | power = "off" |
---|
26 | numvcpus = 1 |
---|
27 | clone_from_vm = "plantilla-modelo" |
---|
28 | nested_esxi = "y" |
---|
29 | |
---|
30 | network_interfaces { |
---|
31 | virtual_network = var.virtual_network |
---|
32 | nic_type = "e1000" |
---|
33 | mac_address = format("%s:ff",var.mac_prefix) |
---|
34 | } |
---|
35 | } |
---|
36 | |
---|
37 | resource "esxi_guest" "cliente" { |
---|
38 | count = var.num_clients |
---|
39 | guest_name = format("og-%s-pc%02d", var.ogversion, count.index) |
---|
40 | disk_store = "almacen.00" |
---|
41 | boot_disk_size = 50 |
---|
42 | memsize = 1024 |
---|
43 | power = "off" |
---|
44 | numvcpus = 1 |
---|
45 | nested_esxi = "y" |
---|
46 | |
---|
47 | network_interfaces { |
---|
48 | virtual_network = var.virtual_network |
---|
49 | nic_type = "e1000" |
---|
50 | mac_address = format("%s:%s",var.mac_prefix, sum([11 , count.index])) |
---|
51 | } |
---|
52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.