From a739728d418c8512b3187fa464cdb2dbe00f57c6 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Tue, 21 Jan 2025 21:23:21 -0500 Subject: [PATCH] Add neelix public key to sftp server. --- ansible/roles/sftp/tasks/common.yaml | 17 +++++++++++++++++ nix/configuration/roles/kodi/default.nix | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/ansible/roles/sftp/tasks/common.yaml b/ansible/roles/sftp/tasks/common.yaml index 4a3821a..f1245ba 100644 --- a/ansible/roles/sftp/tasks/common.yaml +++ b/ansible/roles/sftp/tasks/common.yaml @@ -64,6 +64,23 @@ # force: true # diff: false +- name: Create directories + file: + name: "{{ item }}" + state: directory + mode: 0700 + owner: nochainstounlock + group: nochainstounlock + loop: + - /home/nochainstounlock/.ssh + +- name: Set authorized keys + authorized_key: + user: nochainstounlock + key: | + ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMrjXsXjtxEm47XnRZfo67kJULoc0NBLrB0lPYFiS2Ar kodi@neelix + exclusive: true + - import_tasks: tasks/freebsd.yaml when: 'os_flavor == "freebsd"' diff --git a/nix/configuration/roles/kodi/default.nix b/nix/configuration/roles/kodi/default.nix index 2018c3d..c2249a4 100644 --- a/nix/configuration/roles/kodi/default.nix +++ b/nix/configuration/roles/kodi/default.nix @@ -68,6 +68,12 @@ group = "kodi"; mode = "0755"; } + { + directory = ".kodi"; + user = "kodi"; + group = "kodi"; + mode = "0755"; + } ]; }; };