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:
53
defaults/main.yml
Normal file
53
defaults/main.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
vm_id: 150
|
||||
hostname: debian-template-base
|
||||
|
||||
memory: 4096
|
||||
cores: 4
|
||||
bridge: vmbr0
|
||||
storage: local-lvm
|
||||
cpu_type: host
|
||||
mac_address: "DE:AD:BE:EF:44:55"
|
||||
|
||||
# Networking for template VM
|
||||
ip_mode: dhcp
|
||||
ipconfig0: "ip=dhcp"
|
||||
|
||||
packages:
|
||||
- qemu-guest-agent
|
||||
- curl
|
||||
- htop
|
||||
|
||||
ci_user: debian
|
||||
ci_password: "SecurePass123"
|
||||
ssh_key_path: "~/.ssh/id_rsa.pub"
|
||||
|
||||
resize_disk: true
|
||||
resize_size: "16G"
|
||||
|
||||
gpu_passthrough: false
|
||||
gpu_device: "0000:01:00.0"
|
||||
virtio_gpu: false
|
||||
|
||||
enable_tpm: false
|
||||
|
||||
##########################
|
||||
# NEW OPTIONS
|
||||
##########################
|
||||
|
||||
# Convert VM to template?
|
||||
make_template: true
|
||||
|
||||
# Create clones from the template?
|
||||
create_clones: true
|
||||
|
||||
# List of clones to generate
|
||||
clones:
|
||||
- id: 301
|
||||
hostname: app01
|
||||
ip: "192.168.1.81/24"
|
||||
gateway: "192.168.1.1"
|
||||
|
||||
- id: 302
|
||||
hostname: app02
|
||||
ip: "192.168.1.82/24"
|
||||
gateway: "192.168.1.1"
|
||||
Reference in New Issue
Block a user