From 82b4bd3e9cd612512749a0f16ac7221e41266954 Mon Sep 17 00:00:00 2001 From: Jose Date: Sun, 2 Nov 2025 10:04:28 +0100 Subject: [PATCH] =?UTF-8?q?chore=20=F0=9F=93=A6:=20Update=20setupacdc.yml?= =?UTF-8?q?=20to=20use=20container=5Fpubkey?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated the setupacdc.yml file to include the container's SSH public key for authorized key management, ensuring secure access to the container. This change improves security and reduces manual configuration steps. --- tasks/setupacdc.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/setupacdc.yml b/tasks/setupacdc.yml index 698fb19..3451425 100644 --- a/tasks/setupacdc.yml +++ b/tasks/setupacdc.yml @@ -25,7 +25,7 @@ container_onboot: 1 container_protection: 0 container_unprivileged: 1 - # container_tags: "ansible_managed,test" + container_pubkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}" container_tags: - ansible_managed - test @@ -38,6 +38,7 @@ -ostype {{ container_ostype }} \ -hostname {{ container_hostname }} \ -password {{ container_password }} \ + -ssh-public-keys {{ container_pubkey }} \ -cores {{ container_cores }} \ -memory {{ container_memory }} \ -swap {{ container_swap }} \ @@ -84,7 +85,7 @@ become: true tasks: - + - name: Ensure SSH authorized keys are present ansible.posix.authorized_key: user: root