keys = data_bag_item("oxidized", "keys")
devices = data_bag_item("oxidized", "devices")
+directory "/etc/oxidized" do
+ owner "root"
+ group "root"
+ mode "755"
+end
+
template "/etc/oxidized/config" do
source "config.erb"
owner "oxidized"
mode "755"
end
+git "/opt/oxidized" do
+ action :sync
+ repository "https://github.com/openstreetmap/oxidized.git"
+ depth 1
+ user "oxidized"
+ group "oxidized"
+ notifies :run, "bundle_install[/opt/oxidized]"
+end
+
# Key is set as a deployment key in github repo
file "/opt/oxidized/.ssh/id_rsa" do
content keys["git"].join("\n")
notifies :restart, "service[oxidized]"
end
-git "/opt/oxidized" do
- action :sync
- repository "https://github.com/openstreetmap/oxidized.git"
- depth 1
- user "oxidized"
- group "oxidized"
- notifies :run, "bundle_install[/opt/oxidized]"
-end
-
git "/var/lib/oxidized/configs.git" do
action :sync
repository "git@github.com:openstreetmap/oxidized-configs.git" # Uses oxidized ssh key