From: Tom Hughes Date: Wed, 22 Jul 2020 21:41:52 +0000 (+0100) Subject: Use string for file modes in remote_directory resources X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/d1b835abf6c54e768ead54dd0056011554ba0b71 Use string for file modes in remote_directory resources --- diff --git a/cookbooks/accounts/recipes/default.rb b/cookbooks/accounts/recipes/default.rb index 586d59004..e1023682a 100644 --- a/cookbooks/accounts/recipes/default.rb +++ b/cookbooks/accounts/recipes/default.rb @@ -67,7 +67,7 @@ search(:accounts, "*:*").each do |account| mode "755" files_owner name.to_s files_group name.to_s - files_mode 0o644 + files_mode "644" only_if do cookbook = run_context.cookbook_collection[cookbook_name] files = cookbook.relative_filenames_in_preferred_directory(node, :files, name.to_s) diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index 7fd25945c..be4e96c68 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -476,7 +476,7 @@ remote_directory "/srv/ooc.openstreetmap.org/html" do mode "755" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" end ssl_certificate "ooc.openstreetmap.org" do diff --git a/cookbooks/dmca/recipes/default.rb b/cookbooks/dmca/recipes/default.rb index 625f702f1..30ab6d9ab 100644 --- a/cookbooks/dmca/recipes/default.rb +++ b/cookbooks/dmca/recipes/default.rb @@ -33,7 +33,7 @@ remote_directory "/srv/dmca.openstreetmap.org/html" do mode "755" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" end ssl_certificate "dmca.openstreetmap.org" do diff --git a/cookbooks/dns/recipes/default.rb b/cookbooks/dns/recipes/default.rb index 6bb3865f0..ba6355b04 100644 --- a/cookbooks/dns/recipes/default.rb +++ b/cookbooks/dns/recipes/default.rb @@ -60,7 +60,7 @@ remote_directory "/srv/dns.openstreetmap.org/html" do mode "755" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" end zones = [] diff --git a/cookbooks/exim/recipes/default.rb b/cookbooks/exim/recipes/default.rb index 2e8e0f642..6234aa964 100644 --- a/cookbooks/exim/recipes/default.rb +++ b/cookbooks/exim/recipes/default.rb @@ -191,7 +191,7 @@ remote_directory "/etc/exim4/noreply" do mode "755" files_owner "root" files_group "Debian-exim" - files_mode 0o755 + files_mode "755" purge true end diff --git a/cookbooks/gps-tile/recipes/default.rb b/cookbooks/gps-tile/recipes/default.rb index 5546b3431..21a515034 100644 --- a/cookbooks/gps-tile/recipes/default.rb +++ b/cookbooks/gps-tile/recipes/default.rb @@ -114,7 +114,7 @@ remote_directory "/srv/gps-tile.openstreetmap.org/html" do mode "755" files_owner "gpstile" files_group "gpstile" - files_mode 0o644 + files_mode "644" end apache_module "headers" diff --git a/cookbooks/irc/recipes/default.rb b/cookbooks/irc/recipes/default.rb index 60ef89110..7fbc7ff74 100644 --- a/cookbooks/irc/recipes/default.rb +++ b/cookbooks/irc/recipes/default.rb @@ -37,7 +37,7 @@ remote_directory "/srv/irc.openstreetmap.org/html" do mode "755" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" end apache_site "irc.openstreetmap.org" do diff --git a/cookbooks/letsencrypt/recipes/default.rb b/cookbooks/letsencrypt/recipes/default.rb index fad5eb27c..3590fc94d 100644 --- a/cookbooks/letsencrypt/recipes/default.rb +++ b/cookbooks/letsencrypt/recipes/default.rb @@ -112,7 +112,7 @@ remote_directory "/srv/acme.openstreetmap.org/bin" do mode "755" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" end directory "/srv/acme.openstreetmap.org/requests" do diff --git a/cookbooks/mediawiki/resources/extension.rb b/cookbooks/mediawiki/resources/extension.rb index 4b44fa3d1..8e7fbaa4b 100644 --- a/cookbooks/mediawiki/resources/extension.rb +++ b/cookbooks/mediawiki/resources/extension.rb @@ -41,7 +41,7 @@ action :create do mode "755" files_owner node[:mediawiki][:user] files_group node[:mediawiki][:group] - files_mode 0o755 + files_mode "755" end else extension_repository = new_resource.repository || default_repository diff --git a/cookbooks/mediawiki/resources/skin.rb b/cookbooks/mediawiki/resources/skin.rb index 4930c01b7..f70ad6afe 100644 --- a/cookbooks/mediawiki/resources/skin.rb +++ b/cookbooks/mediawiki/resources/skin.rb @@ -40,7 +40,7 @@ action :create do mode "755" files_owner node[:mediawiki][:user] files_group node[:mediawiki][:group] - files_mode 0o755 + files_mode "755" end else skin_repository = new_resource.repository || default_repository diff --git a/cookbooks/munin/recipes/plugins.rb b/cookbooks/munin/recipes/plugins.rb index 7a2ebd60d..7b8eb1a47 100644 --- a/cookbooks/munin/recipes/plugins.rb +++ b/cookbooks/munin/recipes/plugins.rb @@ -26,7 +26,7 @@ remote_directory "/usr/local/share/munin/plugins" do mode "755" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" purge true end @@ -37,7 +37,7 @@ remote_directory "/etc/munin/plugin-conf.d" do mode "750" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" purge false notifies :restart, "service[munin-node]" end diff --git a/cookbooks/munin/recipes/server.rb b/cookbooks/munin/recipes/server.rb index 0b6e142ac..881b7d5d8 100644 --- a/cookbooks/munin/recipes/server.rb +++ b/cookbooks/munin/recipes/server.rb @@ -80,7 +80,7 @@ remote_directory "/srv/munin.openstreetmap.org" do mode "755" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" end # directory to put dumped files in diff --git a/cookbooks/planet/recipes/default.rb b/cookbooks/planet/recipes/default.rb index 5996b77dc..0f505af06 100644 --- a/cookbooks/planet/recipes/default.rb +++ b/cookbooks/planet/recipes/default.rb @@ -34,7 +34,7 @@ remote_directory "/store/planet#html" do mode "0755" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" end remote_directory "/store/planet#cgi" do @@ -45,7 +45,7 @@ remote_directory "/store/planet#cgi" do mode "755" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" end remote_directory node[:planet][:dump][:xml_history_directory] do @@ -55,7 +55,7 @@ remote_directory node[:planet][:dump][:xml_history_directory] do mode "775" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" end remote_directory "/store/planet/cc-by-sa/full-experimental" do @@ -65,7 +65,7 @@ remote_directory "/store/planet/cc-by-sa/full-experimental" do mode "775" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" end [:xml_directory, :xml_history_directory, diff --git a/cookbooks/planet/recipes/replication.rb b/cookbooks/planet/recipes/replication.rb index 2579b511c..76b014867 100644 --- a/cookbooks/planet/recipes/replication.rb +++ b/cookbooks/planet/recipes/replication.rb @@ -41,7 +41,7 @@ remote_directory "/opt/flush" do mode "755" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" end execute "/opt/flush/Makefile" do @@ -60,7 +60,7 @@ remote_directory "/usr/local/bin" do mode "755" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" end template "/usr/local/bin/users-agreed" do @@ -84,7 +84,7 @@ remote_directory "/store/planet/users_deleted" do mode "755" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" end remote_directory "/store/planet/replication" do @@ -94,7 +94,7 @@ remote_directory "/store/planet/replication" do mode "755" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" end directory "/store/planet/replication/changesets" do diff --git a/cookbooks/subversion/recipes/default.rb b/cookbooks/subversion/recipes/default.rb index d7a33bf33..f38efb7b8 100644 --- a/cookbooks/subversion/recipes/default.rb +++ b/cookbooks/subversion/recipes/default.rb @@ -30,7 +30,7 @@ remote_directory "#{repository_directory}/hooks" do mode "755" files_owner "www-data" files_group "www-data" - files_mode 0o755 + files_mode "755" purge false end diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index 5a7a33af8..57ee431b0 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -115,7 +115,7 @@ remote_directory "/srv/tile.openstreetmap.org/html" do mode "755" files_owner "tile" files_group "tile" - files_mode 0o644 + files_mode "644" end template "/srv/tile.openstreetmap.org/html/index.html" do @@ -456,7 +456,7 @@ remote_directory "/usr/local/bin" do mode "755" files_owner "root" files_group "root" - files_mode 0o755 + files_mode "755" end template "/usr/local/bin/expire-tiles" do diff --git a/cookbooks/trac/recipes/default.rb b/cookbooks/trac/recipes/default.rb index 768dd4748..070a520aa 100644 --- a/cookbooks/trac/recipes/default.rb +++ b/cookbooks/trac/recipes/default.rb @@ -56,7 +56,7 @@ remote_directory "/var/lib/trac/htdocs" do mode "755" files_owner "trac" files_group "trac" - files_mode 0o644 + files_mode "644" purge true end @@ -67,7 +67,7 @@ remote_directory "/var/lib/trac/templates" do mode "755" files_owner "trac" files_group "trac" - files_mode 0o644 + files_mode "644" purge true end diff --git a/cookbooks/web/recipes/frontend.rb b/cookbooks/web/recipes/frontend.rb index 1c71a2fd0..c52007dd4 100644 --- a/cookbooks/web/recipes/frontend.rb +++ b/cookbooks/web/recipes/frontend.rb @@ -36,8 +36,6 @@ apache_site "default" do action [:disable] end -# Static legacy files used by external websites -# eg: OpenLayers remote_directory "#{node[:web][:base_directory]}/static" do source "static" owner "root" @@ -45,7 +43,7 @@ remote_directory "#{node[:web][:base_directory]}/static" do mode "755" files_owner "root" files_group "root" - files_mode 0o644 + files_mode "644" end apache_site "www.openstreetmap.org" do diff --git a/cookbooks/wordpress/resources/plugin.rb b/cookbooks/wordpress/resources/plugin.rb index e2a57156b..ccc8010d5 100644 --- a/cookbooks/wordpress/resources/plugin.rb +++ b/cookbooks/wordpress/resources/plugin.rb @@ -37,7 +37,7 @@ action :create do mode "755" files_owner node[:wordpress][:user] files_group node[:wordpress][:group] - files_mode 0o755 + files_mode "755" end else plugin_repository = new_resource.repository || default_repository diff --git a/cookbooks/wordpress/resources/theme.rb b/cookbooks/wordpress/resources/theme.rb index e0d8c399b..3e8fabe94 100644 --- a/cookbooks/wordpress/resources/theme.rb +++ b/cookbooks/wordpress/resources/theme.rb @@ -37,7 +37,7 @@ action :create do mode "755" files_owner node[:wordpress][:user] files_group node[:wordpress][:group] - files_mode 0o644 + files_mode "644" end else theme_repository = new_resource.repository || default_repository