Commit 4588eb14 authored by Alex Hanselka's avatar Alex Hanselka
Browse files

feat: pass in cloud-init data

parent 8028aa96
Pipeline #3283 passed with stage
in 4 minutes and 15 seconds
......@@ -2,6 +2,11 @@ variable "node_name" {}
variable "image" {}
variable "type" {}
variable "user_data" {
type = "string"
default = ""
}
variable "server_location" {
type = "string"
default = "nbg1"
......@@ -40,6 +45,7 @@ resource "hcloud_server" "generic-hcloud" {
server_type = "${var.type}"
location = "${var.server_location}"
ssh_keys = ["${data.hcloud_ssh_key.ansible.id}", "${data.hcloud_ssh_key.ahanselka.id}"]
user_data = "${var.user_data}"
provisioner "local-exec" {
command = "curl -X POST -F token=${var.ansible_token} -F ref=master -F 'variables[NEW_HOST]=${var.node_name}' https://gitlab.darkdna.net/api/v4/projects/144/trigger/pipeline"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment