-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglobal_config.tf
134 lines (115 loc) · 4.47 KB
/
global_config.tf
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Global environment configuration
# Path on the local filesystem for your template qcow2 disks (read only)
# Set by the TF_VAR_templates_path environment variable
variable "templates_path" {
description = "Path to the template disks built by packer, uses the TF_VAR_templates_path environment variable"
}
variable "pool_prefix" {
description = "Path to the directory where to create the project pools, uses the TF_VAR_pool_prefix environment variable"
}
# Map different Operating Systems to files in the templates_path set above
# The provision_playbook is an ansible playbook to do basic setup
variable "os_image_catalog" {
description = "Map operating systems to base disk images"
type = map(any)
default = {
"arch_cloud" = {
disk = "https://ftp.acc.umu.se/mirror/archlinux/images/latest/Arch-Linux-x86_64-cloudimg.qcow2"
provision_playbook = ""
ansible_user = "arch"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"arch_cloud_cache" = {
disk = "Arch-Linux-x86_64-cloudimg.qcow2"
provision_playbook = ""
ansible_user = "arch"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"arch_custom" = {
disk = "arch-custom-x86_64.qcow2"
provision_playbook = ""
ansible_user = "arch"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"debian_cloud" = {
disk = "https://cloud.debian.org/images/cloud/bookworm/daily/latest/debian-12-generic-amd64-daily.qcow2",
provision_playbook = ""
ansible_user = "debian"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"debian_cloud_cache" = {
disk = "debian-12-generic-amd64-daily.qcow2",
provision_playbook = ""
ansible_user = "debian"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"debian_custom" = {
disk = "debian-custom-amd64.qcow2",
provision_playbook = ""
ansible_user = "debian"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"fedora_cloud" = {
disk = "https://download.fedoraproject.org/pub/fedora/linux/releases/38/Cloud/x86_64/images/Fedora-Cloud-Base-38-1.6.x86_64.qcow2",
provision_playbook = ""
ansible_user = "fedora"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"fedora_cloud_cache" = {
disk = "Fedora-Cloud-Base-38-1.6.x86_64.qcow2",
provision_playbook = ""
ansible_user = "fedora"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"ubuntu_server_cloud" = {
disk = "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img",
provision_playbook = ""
ansible_user = "ubuntu"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"ubuntu_server_cloud_cache" = {
disk = "noble-server-cloudimg-amd64.img",
provision_playbook = ""
ansible_user = "ubuntu"
video_type = "virtio"
cloudinit_template = "templates/cloud_init.cfg"
},
"windows10" = {
disk = "windows10-custom-x86_64.qcow2",
provision_playbook = "windows_deploy.yml"
ansible_user = "administrator"
video_type = "qxl"
cloudinit_template = ""
}
"windows11" = {
disk = "windows11-custom-x86_64.qcow2",
provision_playbook = "windows_deploy.yml"
ansible_user = "administrator"
video_type = "qxl"
cloudinit_template = ""
}
}
}
# Where are the provisioning playbooks?
# Set by the TF_VAR_ansible_playbooks environment variable if you want to manage
# this centrally and not use the default ./ansible/ path
variable "ansible_playbooks" {
description = "Path to the ansible playbook directory. Uses the TF_VAR_ansible_playbooks environment variable if set. Defaults to ./ansible/"
default = "./ansible"
}
# Top level domain for the networks, all the machine will have a name like:
# vmname.projectname.tld
variable "network_tld" {
description = "Network TLD"
type = string
default = "vms"
}