X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/bfa33fdaa5c0b18e2e376fa181a126e6e8d751a4..2f9e2442103a3cba4280d3e73082dd1225fff60a:/cookbooks/oxidized/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/oxidized/recipes/default.rb b/cookbooks/oxidized/recipes/default.rb index 014955f74..4d1da0343 100644 --- a/cookbooks/oxidized/recipes/default.rb +++ b/cookbooks/oxidized/recipes/default.rb @@ -75,7 +75,7 @@ git "/opt/oxidized/daemon" do depth 1 user "oxidized" group "oxidized" - notifies :run, "bundle_install[/opt/oxidized/daemon]" + notifies :run, "bundle_install[/opt/oxidized/daemon]", :immediately end directory "/opt/oxidized/.ssh" do @@ -85,39 +85,35 @@ directory "/opt/oxidized/.ssh" do end # Key is set as a deployment key in github repo -file "/opt/oxidized/.ssh/id_rsa" do +file "/opt/oxidized/.ssh/id_ed25519" do content keys["git"].join("\n") owner "oxidized" group "oxidized" mode "400" - notifies :delete, "file[/opt/oxidized/.ssh/id_rsa.pub]", :immediately + notifies :delete, "file[/opt/oxidized/.ssh/id_ed25519.pub]", :immediately notifies :restart, "service[oxidized]" end # Ensure public key is deleted if private key is changed. Trigged by notify -file "/opt/oxidized/.ssh/id_rsa.pub" do +file "/opt/oxidized/.ssh/id_ed25519.pub" do action :nothing end -execute "/opt/oxidized/.ssh/id_rsa.pub" do - command "ssh-keygen -f /opt/oxidized/.ssh/id_rsa -y > /opt/oxidized/.ssh/id_rsa.pub" +execute "/opt/oxidized/.ssh/id_ed25519.pub" do + command "ssh-keygen -f /opt/oxidized/.ssh/id_ed25519 -y > /opt/oxidized/.ssh/id_ed25519.pub" user "oxidized" group "oxidized" - creates "/opt/oxidized/.ssh/id_rsa.pub" + creates "/opt/oxidized/.ssh/id_ed25519.pub" notifies :restart, "service[oxidized]" end ssh_known_hosts_entry "github.com" do + action [:create, :flush] file_location "/opt/oxidized/.ssh/known_hosts" owner "oxidized" group "oxidized" end -ssh_known_hosts_entry "github.com_flush" do - action :flush - file_location "/opt/oxidized/.ssh/known_hosts" -end - directory "/var/lib/oxidized" do owner "oxidized" group "oxidized"