chore 📦: Update setupacdc.yml to use container_pubkey

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.
This commit is contained in:
2025-11-02 10:04:28 +01:00
parent 4537dcd27a
commit 82b4bd3e9c

View File

@@ -25,7 +25,7 @@
container_onboot: 1 container_onboot: 1
container_protection: 0 container_protection: 0
container_unprivileged: 1 container_unprivileged: 1
# container_tags: "ansible_managed,test" container_pubkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
container_tags: container_tags:
- ansible_managed - ansible_managed
- test - test
@@ -38,6 +38,7 @@
-ostype {{ container_ostype }} \ -ostype {{ container_ostype }} \
-hostname {{ container_hostname }} \ -hostname {{ container_hostname }} \
-password {{ container_password }} \ -password {{ container_password }} \
-ssh-public-keys {{ container_pubkey }} \
-cores {{ container_cores }} \ -cores {{ container_cores }} \
-memory {{ container_memory }} \ -memory {{ container_memory }} \
-swap {{ container_swap }} \ -swap {{ container_swap }} \
@@ -84,7 +85,7 @@
become: true become: true
tasks: tasks:
- name: Ensure SSH authorized keys are present - name: Ensure SSH authorized keys are present
ansible.posix.authorized_key: ansible.posix.authorized_key:
user: root user: root