mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
Merge pull request 'Update cloud-init-vm.yaml.tftpl' (#181) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#181
This commit is contained in:
@ -1,30 +1,31 @@
|
|||||||
|
|
||||||
|
#cloud-config
|
||||||
package_update: true
|
package_update: true
|
||||||
packages:
|
packages:
|
||||||
%{ for pkg in each.value.extra_packages ~}
|
%{ for pkg in each.value.extra_packages ~}
|
||||||
- ${pkg}
|
- ${pkg}
|
||||||
%{ endfor ~}
|
%{ endfor ~}
|
||||||
|
|
||||||
users:
|
|
||||||
%{ if length(each.value.extra_users) > 0 ~}
|
%{ 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}
|
- name: ${u.name}
|
||||||
groups: [${join(", ", u.groups)}]
|
groups: [${join(", ", u.groups)}]
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||||
%{ endfor ~}
|
%{ endfor ~}
|
||||||
|
|
||||||
chpasswd:
|
chpasswd:
|
||||||
list: |
|
list: |
|
||||||
%{ for u in each.value.extra_users ~}
|
%{ for u in each.value.extra_users ~}
|
||||||
${u.name}:${u.password}
|
${u.name}:${u.password}
|
||||||
%{ endfor ~}
|
%{ endfor ~}
|
||||||
expire: false
|
expire: false
|
||||||
|
|
||||||
%{ endif ~}
|
%{ endif ~}
|
||||||
runcmd:
|
|
||||||
%{ if length(each.value.extra_runcmd) > 0 ~}
|
%{ if length(each.value.extra_runcmd) > 0 ~}
|
||||||
|
runcmd:
|
||||||
%{ for cmd in each.value.extra_runcmd ~}
|
%{ for cmd in each.value.extra_runcmd ~}
|
||||||
- ${cmd}
|
- ${cmd}
|
||||||
%{ endfor ~}
|
%{ endfor ~}
|
||||||
%{ endif ~}
|
%{ endif ~}
|
||||||
Reference in New Issue
Block a user