]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/oxidized/recipes/default.rb
oxidized: fix cookstyle and immediately flush ssh_known_hosts_entry
[chef.git] / cookbooks / oxidized / recipes / default.rb
index 119ac13c1c2465eb6235ce63a6f8b602201fd57c..4b255698920a165efc5941a1a9e19a35c1628fc9 100644 (file)
@@ -107,6 +107,19 @@ execute "/opt/oxidized/.ssh/id_rsa.pub" do
   notifies :restart, "service[oxidized]"
 end
 
+ssh_known_hosts_entry "github.com" do
+  action :flush
+  file_location "/opt/oxidized/.ssh/known_hosts"
+  owner "oxidized"
+  group "oxidized"
+end
+
+directory "/var/lib/oxidized" do
+  owner "oxidized"
+  group "oxidized"
+  mode "750"
+end
+
 git "/var/lib/oxidized/configs.git" do
   action :sync
   repository "git@github.com:openstreetmap/oxidized-configs.git" # Uses oxidized ssh key
@@ -129,6 +142,7 @@ systemd_service "oxidized" do
   after "network.target"
   user "oxidized"
   working_directory "/opt/oxidized/daemon"
+  runtime_directory "oxidized"
   exec_start "#{node[:ruby][:bundle]} exec oxidized"
   environment "OXIDIZED_HOME" => "/etc/oxidized",
               "OXIDIZED_LOGS" => "/var/log/oxidized"