Updated get-vim-ips script to use hostnames.

- Made the qemu-agent content in the cloud-init config to be controlled
  by a 'install-qemu-agent' flag.
This commit is contained in:
2021-12-09 23:13:00 -05:00
parent 482e8d1027
commit fee62e0385
6 changed files with 107 additions and 58 deletions
+4 -3
View File
@@ -1,9 +1,10 @@
data "template_file" "user-datas" {
template = file("${var.cloud-init-template}")
vars = {
admin-passwd = "${var.root-admin-passwd}"
admin-pub-key = "${var.root-admin-pub-key}"
hostname = "${var.hostname-prefix}-${count.index}"
admin-passwd = "${var.root-admin-passwd}"
admin-pub-key = "${var.root-admin-pub-key}"
hostname = "${var.hostname-prefix}-${count.index}"
install-qemu-agent = var.install-qemu-agent
}
count = var.num
}
+6
View File
@@ -8,6 +8,12 @@ variable "hostname-prefix" {
description = "This prefix wil be applied as a prefix for the hostnames."
}
variable "install-qemu-agent" {
default = false
description = "This flag determines whether or not qemu-agent is installed."
type = bool
}
variable "num" {
description = "The number of user-datas to create with these parameters."
}