mode "755"
end
-git "/opt/oxidized" do
+directory "/opt/oxidized" do
+ owner "oxidized"
+ group "oxidized"
+ mode "755"
+end
+
+git "/opt/oxidized/daemon" do
action :sync
repository "https://github.com/openstreetmap/oxidized.git"
depth 1
user "oxidized"
group "oxidized"
- notifies :run, "bundle_install[/opt/oxidized]"
+ notifies :run, "bundle_install[/opt/oxidized/daemon]"
end
# Key is set as a deployment key in github repo
group "oxidized"
end
-bundle_install "/opt/oxidized" do
+bundle_install "/opt/oxidized/daemon" do
action :nothing
options "--deployment"
user "oxidized"
description "oxidized network device backup daemon"
after "network.target"
user "oxidized"
- working_directory "/opt/oxidized"
+ working_directory "/opt/oxidized/daemon"
exec_start "#{node[:ruby][:bundle]} exec oxidized"
environment "OXIDIZED_HOME" => "/etc/oxidized",
"OXIDIZED_LOGS" => "/var/log/oxidized"