Recomment user-data from master.

ansible-test
shnee 4 years ago
parent b4ac04fbd8
commit 091b459046

@ -12,25 +12,25 @@ terraform {
# cloud-init # cloud-init
################################################################################ ################################################################################
data "template_file" "master-node-user-datas" { # data "template_file" "master-node-user-datas" {
template = file("${path.module}/cloud_init.cfg") # template = file("${path.module}/cloud_init.cfg")
vars = { # vars = {
admin-passwd = "${var.root-admin-passwd}" # admin-passwd = "${var.root-admin-passwd}"
admin-pub-key = "${var.root-admin-pub-key}" # admin-pub-key = "${var.root-admin-pub-key}"
hostname = "${var.vm-name-prefix}-master-${count.index}" # hostname = "${var.vm-name-prefix}-master-${count.index}"
} # }
count = var.master-nodes # count = var.master-nodes
} # }
#
data "template_file" "worker-node-user-datas" { # data "template_file" "worker-node-user-datas" {
template = file("${path.module}/cloud_init.cfg") # template = file("${path.module}/cloud_init.cfg")
vars = { # vars = {
admin-passwd = "${var.root-admin-passwd}" # admin-passwd = "${var.root-admin-passwd}"
admin-pub-key = "${var.root-admin-pub-key}" # admin-pub-key = "${var.root-admin-pub-key}"
hostname = "${var.vm-name-prefix}-worker-${count.index}" # hostname = "${var.vm-name-prefix}-worker-${count.index}"
} # }
count = var.worker-nodes # count = var.worker-nodes
} # }
data "template_file" "amzn2-node-user-datas" { data "template_file" "amzn2-node-user-datas" {
template = file("${path.module}/cloud_init.cfg") template = file("${path.module}/cloud_init.cfg")

Loading…
Cancel
Save