From bb83d9368b88b6bed7a8301dc0a56128ed9f8a4d Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 4 Nov 2025 19:12:16 +0100 Subject: [PATCH] =?UTF-8?q?style=20=F0=9F=92=8E:=20Update=20LXC=20containe?= =?UTF-8?q?r=20setup=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the pct create command to include ssh-public-keys and features, ensuring consistency with other setup commands. --- tasks/setupacdc.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tasks/setupacdc.yml b/tasks/setupacdc.yml index 1ef1780..d51e628 100644 --- a/tasks/setupacdc.yml +++ b/tasks/setupacdc.yml @@ -50,22 +50,23 @@ - name: Create LXC container {{ container_hostname }} with id {{ container_id }} using pct command on shell ansible.builtin.shell: | + set -e pct create {{ container_id }} {{ container_template }} \ -ostype {{ container_ostype }} \ -hostname {{ container_hostname }} \ -password "{{ container_password }}" \ - -ssh-public-keys {{ ssh_keys_file }} \ + -ssh-public-keys "{{ ssh_keys_file }}" \ -cores {{ container_cores }} \ -memory {{ container_memory }} \ -swap {{ container_swap }} \ - -net0 {{container_net}} \ + -net0 "{{container_net}}" \ -storage {{ container_storage }} \ -description "{{ container_description }}" \ -onboot {{ container_onboot }} \ -protection {{ container_protection }} \ -unprivileged {{ container_unprivileged }} \ -tags "{{ container_tags | join(',') }}" \ - -features {{ container_features }} + -features "{{ container_features }}" args: creates: "/etc/pve/lxc/{{ container_id }}.conf" no_log: false