From 3a1adfa24135eb4411f96a9d870d149864802868 Mon Sep 17 00:00:00 2001
From: Vladimir Still <git@vstill.eu>
Date: Fri, 18 Feb 2022 21:16:40 +0100
Subject: [PATCH] ansible: Don't expect ssh key update script to exits
 externally

---
 ansible/files/known_hosts.service    | 2 +-
 ansible/roles/pds_deb/tasks/main.yml | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ansible/files/known_hosts.service b/ansible/files/known_hosts.service
index 0b2951c..992ff10 100644
--- a/ansible/files/known_hosts.service
+++ b/ansible/files/known_hosts.service
@@ -8,4 +8,4 @@ RefuseManualStop=yes
 
 [Service]
 Type=oneshot
-ExecStart=/root/deploy/bin/get_ssh_hosts
+ExecStart=/usr/sbin/get_ssh_hosts
diff --git a/ansible/roles/pds_deb/tasks/main.yml b/ansible/roles/pds_deb/tasks/main.yml
index 8218ad3..36ba46b 100644
--- a/ansible/roles/pds_deb/tasks/main.yml
+++ b/ansible/roles/pds_deb/tasks/main.yml
@@ -58,6 +58,12 @@
   notify:
     - restart nscd
 
+- name: known_hosts update script
+  copy:
+    src: ../bin/get_ssh_hosts
+    dest: /usr/sbin
+    mode: a=rx
+
 - name: known_hosts update service files
   copy:
     src: '{{item}}'
-- 
GitLab