Update cloud-init-vm.yaml.tftpl

This commit is contained in:
2025-08-27 14:02:41 +00:00
parent e866b5c2cf
commit ec340b7f6b

View File

@ -1,12 +1,13 @@
#cloud-config
package_update: true
packages:
%{ for pkg in each.value.extra_packages ~}
- ${pkg}
%{ endfor ~}
users:
%{ if length(each.value.extra_users) > 0 ~}
users:
%{ for u in each.value.extra_users ~}
- name: ${u.name}
groups: [${join(", ", u.groups)}]
@ -16,14 +17,14 @@ users:
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 ~}
runcmd:
%{ if length(each.value.extra_runcmd) > 0 ~}
runcmd:
%{ for cmd in each.value.extra_runcmd ~}
- ${cmd}
%{ endfor ~}