feat: Make LXC CPU cores and memory configurable during creation and refine inventory group insertion regex.

This commit is contained in:
2026-01-04 11:28:13 +01:00
parent 03dedfda68
commit 9e0ba359ec
2 changed files with 11 additions and 3 deletions

View File

@@ -15,6 +15,14 @@
- name: container_id
prompt: "Enter the Container ID (VMID) e.g., 105"
private: no
- name: container_cores
prompt: "Enter CPU Cores (e.g., 2)"
default: "2"
private: no
- name: container_memory
prompt: "Enter Memory in MB (e.g., 1024)"
default: "256"
private: no
tasks:
- name: Normalize IP address (append /24 if missing)
@@ -36,8 +44,8 @@
password: "{{ ansible_password }}"
netif:
net0: "name=eth0,gw=10.0.0.1,ip={{ container_ip_cidr }},bridge=vmbr0"
cores: 2
memory: 1024
cores: "{{ container_cores }}"
memory: "{{ container_memory }}"
swap: 512
state: present
unprivileged: yes