]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/accounts/recipes/default.rb
Enable resolved prometheus exporter
[chef.git] / cookbooks / accounts / recipes / default.rb
index 250ca9e410a136b406a6c84848109b849d9a0032..b395aeca615c44f3bb46546c2610e27f076fb031 100644 (file)
@@ -19,7 +19,7 @@
 
 package "zsh"
 
 
 package "zsh"
 
-administrators = []
+administrators = node[:accounts][:administrators].to_a
 
 search(:accounts, "*:*").each do |account|
   name = account["id"]
 
 search(:accounts, "*:*").each do |account|
   name = account["id"]
@@ -64,18 +64,16 @@ search(:accounts, "*:*").each do |account|
       source name.to_s
       owner name.to_s
       group name.to_s
       source name.to_s
       owner name.to_s
       group name.to_s
-      mode 0o755
+      mode "755"
       files_owner name.to_s
       files_group name.to_s
       files_owner name.to_s
       files_group name.to_s
-      files_mode 0o644
+      files_mode "644"
       only_if do
       only_if do
-        begin
-          cookbook = run_context.cookbook_collection[cookbook_name]
-          files = cookbook.relative_filenames_in_preferred_directory(node, :files, name.to_s)
-          !files.empty?
-        rescue Chef::Exceptions::FileNotFound
-          false
-        end
+        cookbook = run_context.cookbook_collection[cookbook_name]
+        files = cookbook.relative_filenames_in_preferred_directory(node, :files, name.to_s)
+        !files.empty?
+      rescue Chef::Exceptions::FileNotFound
+        false
       end
     end
 
       end
     end