From 0d094aef4d35b0d3a28f7d8e39c050b12188aa24 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 2 Oct 2022 00:12:46 +0100 Subject: [PATCH] oxidized: fix task ordering --- cookbooks/oxidized/recipes/default.rb | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/cookbooks/oxidized/recipes/default.rb b/cookbooks/oxidized/recipes/default.rb index 4e8ea2f70..0ea5ec1f6 100644 --- a/cookbooks/oxidized/recipes/default.rb +++ b/cookbooks/oxidized/recipes/default.rb @@ -34,6 +34,12 @@ package %w[ 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" @@ -57,6 +63,15 @@ directory "/var/log/oxidized" do 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") @@ -80,15 +95,6 @@ execute "/opt/oxidized/.ssh/id_rsa.pub" do 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 -- 2.43.2