From 2ca7e3182121c6b39638dcbec9c1756c3fc38971 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Thu, 12 Nov 2020 15:53:49 +0900 Subject: [PATCH] Do not deploy SSH keys if already deployed. --- cookbooks/base/lsyncd.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cookbooks/base/lsyncd.rb b/cookbooks/base/lsyncd.rb index b0127bd..986d4aa 100644 --- a/cookbooks/base/lsyncd.rb +++ b/cookbooks/base/lsyncd.rb @@ -24,6 +24,9 @@ end source "files/root/.ssh/#{f}" password ENV['ITAMAE_PASSWORD'] + + # Do not overwrite: + not_if "test -e /root/.ssh/#{f}" end end