]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/oxidized/recipes/default.rb
oxidized: add correct known hosts location
[chef.git] / cookbooks / oxidized / recipes / default.rb
index 5754ceefe9aef7cd7c68ed16ee9645529f3b500d..9963670fc98bfa07b072f7641f5dd8345f22ae52 100644 (file)
@@ -78,6 +78,12 @@ git "/opt/oxidized/daemon" do
   notifies :run, "bundle_install[/opt/oxidized/daemon]"
 end
 
+directory "/opt/oxidized/.ssh" do
+  owner "oxidized"
+  group "oxidized"
+  mode "700"
+end
+
 # Key is set as a deployment key in github repo
 file "/opt/oxidized/.ssh/id_rsa" do
   content keys["git"].join("\n")
@@ -101,6 +107,12 @@ execute "/opt/oxidized/.ssh/id_rsa.pub" do
   notifies :restart, "service[oxidized]"
 end
 
+ssh_known_hosts_entry 'github.com' do
+  file_location "/opt/oxidized/.ssh/known_hosts"
+  owner "oxidized"
+  group "oxidized"
+end
+
 git "/var/lib/oxidized/configs.git" do
   action :sync
   repository "git@github.com:openstreetmap/oxidized-configs.git" # Uses oxidized ssh key