feat ✨: Added new feature to generate Debian VM templates and deploy clones
This commit introduces a new feature that allows users to create Debian VM templates and deploy clones. The feature includes options for customizing the template, such as making it a template or creating clones from it.
This commit is contained in:
24
templates/cloudinit_userdata.yaml.j2
Normal file
24
templates/cloudinit_userdata.yaml.j2
Normal file
@@ -0,0 +1,24 @@
|
||||
#cloud-config
|
||||
|
||||
users:
|
||||
- name: {{ ci_user }}
|
||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||
groups: users, admin, sudo
|
||||
shell: /bin/bash
|
||||
lock_passwd: false
|
||||
passwd: {{ ci_password | password_hash('sha512') }}
|
||||
ssh_authorized_keys:
|
||||
- {{ lookup('file', ssh_key_path) }}
|
||||
|
||||
chpasswd:
|
||||
expire: false
|
||||
|
||||
ssh_pwauth: true
|
||||
|
||||
timezone: "{{ timezone | default('UTC') }}"
|
||||
|
||||
package_update: true
|
||||
package_upgrade: false
|
||||
|
||||
runcmd:
|
||||
- echo "Cloud-init user-data executed for {{ hostname }}"
|
||||
Reference in New Issue
Block a user