From 69b07231313656ff29086297972351acb131d383 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Wed, 23 Oct 2024 20:34:01 +0200 Subject: [PATCH] Deploy SSH public key. --- deploy_ssh_private_key.yml => deploy_ssh_keypair.yml | 5 +++++ tasks/retrieve_secret_vars.yml | 2 ++ 2 files changed, 7 insertions(+) rename deploy_ssh_private_key.yml => deploy_ssh_keypair.yml (70%) diff --git a/deploy_ssh_private_key.yml b/deploy_ssh_keypair.yml similarity index 70% rename from deploy_ssh_private_key.yml rename to deploy_ssh_keypair.yml index e1fbe0a..0cb3193 100644 --- a/deploy_ssh_private_key.yml +++ b/deploy_ssh_keypair.yml @@ -14,3 +14,8 @@ dest: "{{ ansible_user_dir }}/.ssh/" mode: 0600 + - name: Deploy SSH public key + copy: + src: "{{ ansible_user_dir }}/{{ ANSIBLE_WORKDIR }}/id_rsa.pub" + dest: "/{{ ansible_user_dir }}/.ssh/" + mode: 0640 diff --git a/tasks/retrieve_secret_vars.yml b/tasks/retrieve_secret_vars.yml index f7832c9..09e9fa7 100644 --- a/tasks/retrieve_secret_vars.yml +++ b/tasks/retrieve_secret_vars.yml @@ -90,6 +90,8 @@ with_items: - name: secrets/bootstrap/id_rsa dir: "{{ remote_workdir }}" + - name: secrets/bootstrap/id_rsa.pub + dir: "{{ remote_workdir }}" environment: SECRETS_ARCHIVE_PASSPHRASE: "{{ lookup('env', 'SECRETS_ARCHIVE_PASSPHRASE') }}"