feat: Enhance LXC creation playbook with SSH key injection and new parameters, introduce Ansible configuration, and adjust script paths and secret variable names.
This commit is contained in:
@@ -6,12 +6,13 @@ This directory contains automation playbooks for managing the homelab infrastruc
|
||||
|
||||
### `create_lxc.yml`
|
||||
**Creates and bootstraps a new LXC container on Proxmox.**
|
||||
- **Input**: Prompts for Container Name and IP Address.
|
||||
- **Input**: Prompts for Container Name, IP Address, VMID, CPU Cores, and Memory.
|
||||
- **Actions**:
|
||||
1. Connects to Proxmox API to create a new unprivileged LXC container (Ubuntu 24.04).
|
||||
2. Starts the container and waits for connectivity.
|
||||
3. Temporarily adds the host to the inventory.
|
||||
4. Automatically triggers `lxc_setup_ubuntu.yml` to secure the new container.
|
||||
1. Connects to Proxmox API to create a new unprivileged LXC container.
|
||||
2. **Injects SSH Keys**: Uses `vars.yml` to inject public keys directly into `/root/.ssh/authorized_keys` (bypassing password auth).
|
||||
3. Starts the container and waits for connectivity.
|
||||
4. Automatically secures the container (creates `mbuz` user, secures SSH, disables root) effectively running the logic of `lxc_setup_ubuntu.yml`.
|
||||
5. Adds the new host to `inventory/hosts.ini` in the `[lxc]` group.
|
||||
|
||||
### `lxc_setup_ubuntu.yml`
|
||||
**Secures a fresh Ubuntu installation.**
|
||||
|
||||
Reference in New Issue
Block a user