From 4cc30a0a359308325889b7b27b52f6a018ff6733 Mon Sep 17 00:00:00 2001 From: Lasse Heikkila Date: Sun, 24 Jan 2021 18:59:25 +0200 Subject: [PATCH] Fix existing SSH host key check. This addresses issue #4 about bootstrap ssh keys error. Previous condition did not seem to work. --- roles/bootstrap/tasks/setup_sshd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/bootstrap/tasks/setup_sshd.yml b/roles/bootstrap/tasks/setup_sshd.yml index 4a6a9f0..cdc8c3b 100644 --- a/roles/bootstrap/tasks/setup_sshd.yml +++ b/roles/bootstrap/tasks/setup_sshd.yml @@ -38,7 +38,7 @@ - "[>|#]" command: - /usr/nekoware/bin/ssh-keygen -f /usr/nekoware/etc/ssh_host_ecdsa_key -q -N "" - when: "{{ 'nekoware' in keyname }}" + when: keyname.output | select('search','No such file or directory') | list | count == 1 - name: Start sshd at bootup with chkconfig telnet: