From 9d940ca0007b08e15fbe8fb461d206be212fd202 Mon Sep 17 00:00:00 2001 From: harry Date: Fri, 10 Apr 2026 15:21:40 +0000 Subject: [PATCH] Update playbooks/new_lxc.yml --- playbooks/new_lxc.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/playbooks/new_lxc.yml b/playbooks/new_lxc.yml index 7a3ce56..73026c2 100644 --- a/playbooks/new_lxc.yml +++ b/playbooks/new_lxc.yml @@ -19,6 +19,14 @@ lxc_ssh_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINegitHaQG8i+s412h3wTWf/KvpeX1CEpYFva9MhHR+7 ansible-key" tasks: + # ======================================================================== + # NEW FIX: Auto-install missing dependencies into Semaphore's isolated venv + # ======================================================================== + - name: Ensure Proxmox API dependencies are installed in Semaphore + ansible.builtin.shell: "{{ ansible_playbook_python }} -m pip install proxmoxer requests" + changed_when: false + # ======================================================================== + - name: Get the next available VMID from the Proxmox cluster ansible.builtin.uri: url: "https://{{ proxmox_api_host }}:8006/api2/json/cluster/nextid" @@ -45,20 +53,10 @@ ostemplate: "{{ lxc_template }}" cores: "{{ lxc_cores }}" memory: "{{ lxc_memory }}" - - # FIX: Combined storage pool and size into the single required format disk: "{{ lxc_storage }}:{{ lxc_disk_size }}" - - # Configure network for DHCP on the specified bridge netif: '{"net0":"name=eth0,bridge={{ lxc_bridge }},ip=dhcp"}' - - # Explicitly set the DNS nameserver nameserver: "{{ lxc_dns }}" - - # Inject the SSH public key pubkey: "{{ lxc_ssh_key }}" - - # Highly recommended security flag for Proxmox containers unprivileged: true state: present