]> git.openstreetmap.org Git - chef.git/commitdiff
oxidized: switch to ed25519 key
authorGrant Slater <github@firefishy.com>
Wed, 5 Oct 2022 21:13:03 +0000 (22:13 +0100)
committerGrant Slater <github@firefishy.com>
Wed, 5 Oct 2022 21:13:37 +0000 (22:13 +0100)
cookbooks/oxidized/recipes/default.rb
cookbooks/oxidized/templates/default/config.erb

index 7bb287f7513665ef88a6f6c8b66bb5d1e1ce358e..4d1da0343e17997a33c2996afe08bcacd3e57973 100644 (file)
@@ -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,25 +85,25 @@ 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
 
index 8b19f7b9394a3327d0c278f21fc5be2ba860615a..132dfe39250bdd459d35fd69acccb7fbe6cba26c 100644 (file)
@@ -21,7 +21,7 @@ hooks:
     type: githubrepo
     events: [post_store]
     remote_repo: git@github.com:openstreetmap/oxidized-configs.git
-    privatekey: /opt/oxidized/.ssh/id_rsa
+    privatekey: /opt/oxidized/.ssh/id_ed25519
 source:
   default: csv
   csv: