mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 07:43:07 +00:00
31 lines
604 B
Plaintext
31 lines
604 B
Plaintext
#cloud-config
|
|
package_update: true
|
|
packages:
|
|
%{ for pkg in each.value.extra_packages ~}
|
|
- ${pkg}
|
|
%{ endfor ~}
|
|
|
|
users:
|
|
%{ if length(each.value.extra_users) > 0 ~}
|
|
|
|
%{ for u in each.value.extra_users ~}
|
|
- name: ${u.name}
|
|
groups: [${join(", ", u.groups)}]
|
|
shell: /bin/bash
|
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
|
%{ endfor ~}
|
|
|
|
chpasswd:
|
|
list: |
|
|
%{ for u in each.value.extra_users ~}
|
|
${u.name}:${u.password}
|
|
%{ endfor ~}
|
|
expire: false
|
|
|
|
%{ endif ~}
|
|
runcmd:
|
|
%{ if length(each.value.extra_runcmd) > 0 ~}
|
|
%{ for cmd in each.value.extra_runcmd ~}
|
|
- ${cmd}
|
|
%{ endfor ~}
|
|
%{ endif ~} |