diff --git a/cloud-init-vm.yaml.tftpl b/cloud-init-vm.yaml.tftpl index 4cfe075..5256ec8 100644 --- a/cloud-init-vm.yaml.tftpl +++ b/cloud-init-vm.yaml.tftpl @@ -2,31 +2,31 @@ package_update: true %{ if length(each.value.extra_packages) > 0 ~} packages: - %{ for pkg in each.value.extra_packages ~} +%{ for pkg in each.value.extra_packages ~} - ${pkg} - %{ endfor ~} +%{ endfor ~} %{ endif ~} %{ if length(each.value.extra_users) > 0 ~} users: - %{ for u in each.value.extra_users ~} +%{ for u in each.value.extra_users ~} - name: ${u.name} groups: [${join(", ", u.groups)}] shell: /bin/bash sudo: ALL=(ALL) NOPASSWD:ALL - %{ endfor ~} +%{ endfor ~} chpasswd: list: - %{ for u in each.value.extra_users ~} +%{ for u in each.value.extra_users ~} ${u.name}:${u.password} - %{ endfor ~} +%{ endfor ~} expire: false %{ endif ~} %{ if length(each.value.extra_runcmd) > 0 ~} runcmd: - %{ for cmd in each.value.extra_runcmd ~} +%{ for cmd in each.value.extra_runcmd ~} - ${cmd} - %{ endfor ~} +%{ endfor ~} %{ endif ~}