From: Jakub Czajka Date: Fri, 1 Dec 2023 01:40:41 +0000 (+0100) Subject: Copy SSH public key after the turnup. X-Git-Url: https://git.ekhem.eu.org/?a=commitdiff_plain;h=cbccbe42c5e876c7eb9759cb803bcf7154ba342e;p=turnup.git Copy SSH public key after the turnup. --- diff --git a/install/ssh_public_keys.yaml b/install/ssh_public_keys.yaml new file mode 100644 index 0000000..d6400e8 --- /dev/null +++ b/install/ssh_public_keys.yaml @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Jakub Czajka +# License: GPL-3.0 or later. + +- hosts: servers + tasks: + - name: Copy the SSH key for user {{ users }} + authorized_key: + user: "{{ item }}" + state: present + key: "{{ public_key }}" + key_options: > + "no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty" + become: true + with_items: "{{ users }}" diff --git a/turnup.yaml b/turnup.yaml index 1aafc0f..11f5d2c 100644 --- a/turnup.yaml +++ b/turnup.yaml @@ -26,3 +26,4 @@ with_items: "{{ post_receive_scripts.files }}" - import_playbook: install/database_from_save.yaml +- import_playbook: install/ssh_public_keys.yaml