-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
56 lines (47 loc) · 1022 Bytes
/
main.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
resource "linode_instance" "vpn" {
label = "${var.name}-wg"
region = "${var.region}"
type = "${var.type}"
disk {
label = "root"
size = 10240
authorized_keys = ["${var.ssh_keys}"]
authorized_users = ["${var.ssh_users}"]
image = "${var.source_image_id}"
}
config {
label = "default"
kernel = "linode/grub2"
devices {
sda = {
disk_label = "root"
}
}
}
provisioner "ansible" {
plays {
playbook = {
file_path = "${var.ansible_repo_path}/linode/bootstrap.yml"
}
}
plays {
playbook = {
file_path = "${var.ansible_repo_path}/linode/setup.yml"
}
}
plays {
playbook = {
file_path = "${var.ansible_repo_path}/main.yml"
skip_tags = ["users"]
}
}
defaults {
extra_vars = {
ansible_python_interpreter = "/usr/bin/python3"
}
}
ansible_ssh_settings {
ssh_keyscan_timeout = 360
}
}
}