From aeaa46f3071de018b5c5e0f5678cb5b4082e3ddc Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 21 Jul 2020 20:41:45 +0100 Subject: [PATCH] Use strings for file modes --- .rubocop_todo.yml | 5 -- cookbooks/accounts/recipes/default.rb | 2 +- cookbooks/apache/recipes/default.rb | 2 +- cookbooks/apache/resources/conf.rb | 2 +- cookbooks/apache/resources/module.rb | 2 +- cookbooks/apache/resources/site.rb | 2 +- cookbooks/apt/recipes/default.rb | 8 +-- cookbooks/backup/recipes/default.rb | 6 +-- cookbooks/bind/recipes/default.rb | 6 +-- cookbooks/blog/recipes/default.rb | 4 +- cookbooks/blogs/recipes/default.rb | 2 +- cookbooks/chef/recipes/default.rb | 20 +++---- cookbooks/chef/recipes/repository.rb | 10 ++-- cookbooks/chef/recipes/server.rb | 4 +- cookbooks/civicrm/recipes/default.rb | 14 ++--- cookbooks/clamav/recipes/default.rb | 2 +- cookbooks/db/recipes/backup.rb | 2 +- cookbooks/db/recipes/base.rb | 6 +-- cookbooks/dev/recipes/default.rb | 34 ++++++------ cookbooks/devices/recipes/default.rb | 4 +- cookbooks/dhcpd/recipes/default.rb | 2 +- cookbooks/dmca/recipes/default.rb | 4 +- cookbooks/dns/recipes/default.rb | 20 +++---- cookbooks/docker/recipes/default.rb | 4 +- cookbooks/donate/recipes/default.rb | 8 +-- cookbooks/elasticsearch/recipes/default.rb | 2 +- cookbooks/exim/recipes/default.rb | 22 ++++---- cookbooks/fail2ban/recipes/default.rb | 4 +- cookbooks/fail2ban/resources/filter.rb | 4 +- cookbooks/fail2ban/resources/jail.rb | 2 +- cookbooks/forum/recipes/default.rb | 12 ++--- cookbooks/foundation/recipes/board.rb | 2 +- cookbooks/foundation/recipes/dwg.rb | 2 +- cookbooks/foundation/recipes/mwg.rb | 2 +- cookbooks/foundation/recipes/owg.rb | 4 +- cookbooks/foundation/recipes/wiki.rb | 2 +- cookbooks/ftp/recipes/default.rb | 4 +- cookbooks/geodns/recipes/default.rb | 8 +-- cookbooks/geoipupdate/recipes/default.rb | 2 +- cookbooks/git/recipes/server.rb | 10 ++-- cookbooks/git/recipes/web.rb | 6 +-- cookbooks/gps-tile/recipes/default.rb | 4 +- cookbooks/hardware/recipes/default.rb | 22 ++++---- cookbooks/imagery/recipes/default.rb | 6 +-- cookbooks/imagery/resources/layer.rb | 8 +-- cookbooks/imagery/resources/site.rb | 18 +++---- cookbooks/incron/recipes/default.rb | 2 +- cookbooks/irc/recipes/default.rb | 4 +- cookbooks/kibana/recipes/default.rb | 10 ++-- cookbooks/letsencrypt/recipes/default.rb | 30 +++++------ cookbooks/logstash/recipes/default.rb | 12 ++--- cookbooks/logstash/recipes/forwarder.rb | 4 +- cookbooks/mailman/recipes/default.rb | 4 +- cookbooks/mediawiki/recipes/default.rb | 2 +- cookbooks/mediawiki/resources/extension.rb | 6 +-- cookbooks/mediawiki/resources/site.rb | 24 ++++----- cookbooks/mediawiki/resources/skin.rb | 6 +-- cookbooks/memcached/recipes/default.rb | 2 +- cookbooks/munin/recipes/default.rb | 2 +- cookbooks/munin/recipes/plugins.rb | 4 +- cookbooks/munin/recipes/server.rb | 12 ++--- cookbooks/munin/resources/plugin_conf.rb | 2 +- cookbooks/mysql/recipes/default.rb | 2 +- cookbooks/networking/recipes/default.rb | 46 ++++++++-------- cookbooks/nfs/recipes/default.rb | 2 +- cookbooks/nfs/recipes/server.rb | 2 +- cookbooks/nginx/recipes/default.rb | 8 +-- cookbooks/nginx/resources/site.rb | 2 +- cookbooks/nominatim/recipes/default.rb | 42 +++++++-------- cookbooks/ntp/recipes/default.rb | 2 +- cookbooks/ohai/resources/plugin.rb | 4 +- cookbooks/openssh/recipes/default.rb | 4 +- cookbooks/openvpn/recipes/default.rb | 4 +- cookbooks/osmosis/recipes/default.rb | 4 +- cookbooks/osqa/recipes/default.rb | 10 ++-- cookbooks/otrs/recipes/default.rb | 8 +-- cookbooks/passenger/recipes/default.rb | 2 +- cookbooks/php/recipes/fpm.rb | 2 +- cookbooks/php/resources/fpm.rb | 2 +- cookbooks/planet/recipes/current.rb | 10 ++-- cookbooks/planet/recipes/default.rb | 16 +++--- cookbooks/planet/recipes/dump.rb | 6 +-- cookbooks/planet/recipes/notes.rb | 4 +- cookbooks/planet/recipes/replication.rb | 40 +++++++------- cookbooks/postgresql/recipes/default.rb | 8 +-- cookbooks/rsyncd/recipes/default.rb | 4 +- cookbooks/serverinfo/recipes/default.rb | 8 +-- cookbooks/snmpd/recipes/default.rb | 2 +- cookbooks/spamassassin/recipes/default.rb | 6 +-- cookbooks/squid/recipes/default.rb | 6 +-- cookbooks/squid/resources/fragment.rb | 2 +- cookbooks/ssl/recipes/default.rb | 4 +- cookbooks/ssl/resources/certificate.rb | 6 +-- cookbooks/stateofthemap/recipes/default.rb | 18 +++---- cookbooks/subversion/recipes/default.rb | 4 +- cookbooks/supybot/recipes/default.rb | 28 +++++----- cookbooks/switch2osm/recipes/default.rb | 4 +- cookbooks/sysfs/recipes/default.rb | 2 +- cookbooks/systemd/resources/path.rb | 2 +- cookbooks/systemd/resources/service.rb | 6 +-- cookbooks/systemd/resources/timer.rb | 2 +- cookbooks/systemd/resources/tmpfile.rb | 2 +- cookbooks/taginfo/recipes/default.rb | 16 +++--- cookbooks/tile/recipes/default.rb | 62 +++++++++++----------- cookbooks/tilecache/recipes/default.rb | 16 +++--- cookbooks/tilelog/recipes/default.rb | 4 +- cookbooks/tools/recipes/default.rb | 2 +- cookbooks/trac/recipes/default.rb | 14 ++--- cookbooks/web/recipes/base.rb | 6 +-- cookbooks/web/recipes/cleanup.rb | 2 +- cookbooks/web/recipes/frontend.rb | 2 +- cookbooks/web/recipes/rails.rb | 6 +-- cookbooks/web/recipes/statistics.rb | 2 +- cookbooks/web/resources/rails_port.rb | 14 ++--- cookbooks/wiki/recipes/default.rb | 6 +-- cookbooks/wordpress/resources/plugin.rb | 2 +- cookbooks/wordpress/resources/site.rb | 8 +-- cookbooks/wordpress/resources/theme.rb | 2 +- 118 files changed, 471 insertions(+), 476 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6be451ec0..24a331788 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -40,8 +40,3 @@ ChefModernize/Definitions: # SupportedStyles: strings, symbols ChefStyle/AttributeKeys: EnforcedStyle: symbols - -# Offense count: 489 -# Cop supports --auto-correct. -ChefStyle/FileMode: - Enabled: false diff --git a/cookbooks/accounts/recipes/default.rb b/cookbooks/accounts/recipes/default.rb index fa7dc2814..586d59004 100644 --- a/cookbooks/accounts/recipes/default.rb +++ b/cookbooks/accounts/recipes/default.rb @@ -64,7 +64,7 @@ search(:accounts, "*:*").each do |account| 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_mode 0o644 diff --git a/cookbooks/apache/recipes/default.rb b/cookbooks/apache/recipes/default.rb index 59d45d09d..5ab1b21ee 100644 --- a/cookbooks/apache/recipes/default.rb +++ b/cookbooks/apache/recipes/default.rb @@ -50,7 +50,7 @@ template "/etc/apache2/ports.conf" do source "ports.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" end service "apache2" do diff --git a/cookbooks/apache/resources/conf.rb b/cookbooks/apache/resources/conf.rb index 5bedbab44..a163b4496 100644 --- a/cookbooks/apache/resources/conf.rb +++ b/cookbooks/apache/resources/conf.rb @@ -48,7 +48,7 @@ action_class do source new_resource.template owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.variables end end diff --git a/cookbooks/apache/resources/module.rb b/cookbooks/apache/resources/module.rb index 52cde2f85..6658d52a6 100644 --- a/cookbooks/apache/resources/module.rb +++ b/cookbooks/apache/resources/module.rb @@ -33,7 +33,7 @@ action :install do source new_resource.conf owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.variables end end diff --git a/cookbooks/apache/resources/site.rb b/cookbooks/apache/resources/site.rb index f1016927c..96cf872f4 100644 --- a/cookbooks/apache/resources/site.rb +++ b/cookbooks/apache/resources/site.rb @@ -32,7 +32,7 @@ action :create do source new_resource.template owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.variables.merge(:name => new_resource.site, :directory => site_directory) end end diff --git a/cookbooks/apt/recipes/default.rb b/cookbooks/apt/recipes/default.rb index 99092214d..d0a26fae7 100644 --- a/cookbooks/apt/recipes/default.rb +++ b/cookbooks/apt/recipes/default.rb @@ -32,7 +32,7 @@ template "/etc/apt/preferences.d/99-chef" do source "preferences.erb" owner "root" group "root" - mode 0o644 + mode "644" end apt_update "/etc/apt/sources.list" do @@ -49,7 +49,7 @@ template "/etc/apt/sources.list" do source "sources.list.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :archive_host => archive_host, :codename => node[:lsb][:codename] notifies :update, "apt_update[/etc/apt/sources.list]", :immediately end @@ -186,7 +186,7 @@ if Dir.exist?("/usr/share/unattended-upgrades") file "/etc/apt/apt.conf.d/20auto-upgrades" do user "root" group "root" - mode 0o644 + mode "644" content auto_upgrades end end @@ -195,5 +195,5 @@ template "/etc/apt/apt.conf.d/60chef" do source "apt.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" end diff --git a/cookbooks/backup/recipes/default.rb b/cookbooks/backup/recipes/default.rb index 794f8e51e..a123a19ab 100644 --- a/cookbooks/backup/recipes/default.rb +++ b/cookbooks/backup/recipes/default.rb @@ -27,19 +27,19 @@ package %w[ directory "/store/backup" do owner "osmbackup" group "osmbackup" - mode 0o2755 + mode "2755" recursive true end cookbook_file "/usr/local/bin/expire-backups" do owner "root" group "root" - mode 0o755 + mode "755" end template "/etc/cron.daily/expire-backups" do source "expire.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end diff --git a/cookbooks/bind/recipes/default.rb b/cookbooks/bind/recipes/default.rb index aa19e91e2..77c777e1a 100644 --- a/cookbooks/bind/recipes/default.rb +++ b/cookbooks/bind/recipes/default.rb @@ -45,7 +45,7 @@ template "/etc/bind/named.conf.local" do source "named.local.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[#{service_name}]" end @@ -53,7 +53,7 @@ template "/etc/bind/named.conf.options" do source "named.options.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :ipv4_clients => ipv4_clients, :ipv6_clients => ipv6_clients notifies :restart, "service[#{service_name}]" end @@ -62,7 +62,7 @@ template "/etc/bind/db.10" do source "db.10.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :reload, "service[#{service_name}]" end diff --git a/cookbooks/blog/recipes/default.rb b/cookbooks/blog/recipes/default.rb index 49759f4ee..2dd9e5f4d 100644 --- a/cookbooks/blog/recipes/default.rb +++ b/cookbooks/blog/recipes/default.rb @@ -24,7 +24,7 @@ passwords = data_bag_item("blog", "passwords") directory "/srv/blog.openstreetmap.org" do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end wordpress_site "blog.openstreetmap.org" do @@ -111,6 +111,6 @@ template "/etc/cron.daily/blog-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o750 + mode "750" variables :passwords => passwords end diff --git a/cookbooks/blogs/recipes/default.rb b/cookbooks/blogs/recipes/default.rb index d9596b688..61602b139 100644 --- a/cookbooks/blogs/recipes/default.rb +++ b/cookbooks/blogs/recipes/default.rb @@ -37,7 +37,7 @@ end directory "/srv/blogs.openstreetmap.org" do owner "blogs" group "blogs" - mode 0o755 + mode "755" end git "/srv/blogs.openstreetmap.org" do diff --git a/cookbooks/chef/recipes/default.rb b/cookbooks/chef/recipes/default.rb index c6565c56a..61ac42415 100644 --- a/cookbooks/chef/recipes/default.rb +++ b/cookbooks/chef/recipes/default.rb @@ -40,7 +40,7 @@ remote_file "#{cache_dir}/#{chef_package}" do source "https://packages.chef.io/files/stable/chef/#{chef_version}/ubuntu/#{node[:lsb][:release]}/#{chef_package}" owner "root" group "root" - mode 0o644 + mode "644" backup false ignore_failure true end @@ -53,59 +53,59 @@ end directory "/etc/chef" do owner "root" group "root" - mode 0o755 + mode "755" end template "/etc/chef/client.rb" do source "client.rb.erb" owner "root" group "root" - mode 0o640 + mode "640" end file "/etc/chef/client.pem" do owner "root" group "root" - mode 0o400 + mode "400" end template "/etc/chef/report.rb" do source "report.rb.erb" owner "root" group "root" - mode 0o644 + mode "644" end template "/etc/logrotate.d/chef" do source "logrotate.erb" owner "root" group "root" - mode 0o644 + mode "644" end directory "/etc/chef/trusted_certs" do owner "root" group "root" - mode 0o755 + mode "755" end template "/etc/chef/trusted_certs/verisign.pem" do source "verisign.pem.erb" owner "root" group "root" - mode 0o644 + mode "644" end directory node[:ohai][:plugin_dir] do owner "root" group "root" - mode 0o755 + mode "755" end directory "/var/log/chef" do owner "root" group "root" - mode 0o755 + mode "755" end systemd_service "chef-client" do diff --git a/cookbooks/chef/recipes/repository.rb b/cookbooks/chef/recipes/repository.rb index 44e9db114..d5d8d2bc2 100644 --- a/cookbooks/chef/recipes/repository.rb +++ b/cookbooks/chef/recipes/repository.rb @@ -28,7 +28,7 @@ end directory "/var/lib/chef" do owner "chefrepo" group "chefrepo" - mode 0o2775 + mode "2775" end %w[public private].each do |repository| @@ -45,28 +45,28 @@ end directory "/var/lib/chef/#{repository}/.chef" do owner "chefrepo" group "chefrepo" - mode 0o2775 + mode "2775" end file "/var/lib/chef/#{repository}/.chef/client.pem" do content keys["git"].join("\n") owner "chefrepo" group "chefrepo" - mode 0o660 + mode "660" end cookbook_file "/var/lib/chef/#{repository}/.chef/knife.rb" do source "knife.rb" owner "chefrepo" group "chefrepo" - mode 0o660 + mode "660" end template "#{repository_directory}/hooks/post-receive" do source "post-receive.erb" owner "chefrepo" group "chefrepo" - mode 0o750 + mode "750" variables :repository => repository end end diff --git a/cookbooks/chef/recipes/server.rb b/cookbooks/chef/recipes/server.rb index f965592a1..cd4968b73 100644 --- a/cookbooks/chef/recipes/server.rb +++ b/cookbooks/chef/recipes/server.rb @@ -52,7 +52,7 @@ template "/etc/opscode/chef-server.rb" do source "server.rb.erb" owner "root" group "root" - mode 0o640 + mode "640" notifies :run, "execute[chef-server-reconfigure]" end @@ -98,7 +98,7 @@ template "/etc/cron.daily/chef-server-backup" do source "server-backup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end munin_plugin "chef_status" diff --git a/cookbooks/civicrm/recipes/default.rb b/cookbooks/civicrm/recipes/default.rb index 246f66332..936364026 100644 --- a/cookbooks/civicrm/recipes/default.rb +++ b/cookbooks/civicrm/recipes/default.rb @@ -73,7 +73,7 @@ civicrm_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm" directory "/opt/civicrm-#{civicrm_version}" do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end remote_file "#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip" do @@ -81,7 +81,7 @@ remote_file "#{cache_dir}/civicrm-#{civicrm_version}-wordpress.zip" do source "https://download.civicrm.org/civicrm-#{civicrm_version}-wordpress.zip" owner "wordpress" group "wordpress" - mode 0o644 + mode "644" backup false end @@ -90,7 +90,7 @@ remote_file "#{cache_dir}/civicrm-#{civicrm_version}-l10n.tar.gz" do source "https://download.civicrm.org/civicrm-#{civicrm_version}-l10n.tar.gz" owner "wordpress" group "wordpress" - mode 0o644 + mode "644" backup false end @@ -124,7 +124,7 @@ end directory "/srv/join.osmfoundation.org/wp-content/plugins/files" do owner "www-data" group "www-data" - mode 0o755 + mode "755" end extensions_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm-extensions" @@ -132,7 +132,7 @@ extensions_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm-e directory extensions_directory do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end node[:civicrm][:extensions].each_value do |details| @@ -169,7 +169,7 @@ end file "#{civicrm_directory}/civicrm.settings.php" do owner "wordpress" group "wordpress" - mode 0o644 + mode "644" content settings end @@ -184,6 +184,6 @@ template "/etc/cron.daily/osmf-crm-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o750 + mode "750" variables :passwords => passwords end diff --git a/cookbooks/clamav/recipes/default.rb b/cookbooks/clamav/recipes/default.rb index bbfc2cd68..f6dd24a5c 100644 --- a/cookbooks/clamav/recipes/default.rb +++ b/cookbooks/clamav/recipes/default.rb @@ -27,7 +27,7 @@ template "/etc/clamav-unofficial-sigs.conf.d/50-chef.conf" do source "clamav-unofficial-sigs.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" end execute "freshclam" do diff --git a/cookbooks/db/recipes/backup.rb b/cookbooks/db/recipes/backup.rb index 66ddd765d..0fe004d20 100644 --- a/cookbooks/db/recipes/backup.rb +++ b/cookbooks/db/recipes/backup.rb @@ -21,7 +21,7 @@ template "/usr/local/bin/backup-db" do source "backup-db.erb" owner "root" group "root" - mode 0o755 + mode "755" end cron_d "backup-db" do diff --git a/cookbooks/db/recipes/base.rb b/cookbooks/db/recipes/base.rb index f92a6ea0b..d63a37811 100644 --- a/cookbooks/db/recipes/base.rb +++ b/cookbooks/db/recipes/base.rb @@ -37,7 +37,7 @@ end directory "/srv/www.openstreetmap.org" do group "rails" - mode 0o2775 + mode "2775" end rails_port "www.openstreetmap.org" do @@ -57,7 +57,7 @@ end directory function_directory do owner "rails" group "rails" - mode 0o755 + mode "755" end execute function_directory do @@ -90,6 +90,6 @@ template "/usr/local/bin/openstreetmap-wal-e" do source "wal-e.erb" owner "root" group "postgres" - mode 0o750 + mode "750" variables :s3_key => wal_secrets["s3_key"] end diff --git a/cookbooks/dev/recipes/default.rb b/cookbooks/dev/recipes/default.rb index d881e8eb3..7fd25945c 100644 --- a/cookbooks/dev/recipes/default.rb +++ b/cookbooks/dev/recipes/default.rb @@ -104,14 +104,14 @@ end directory "/srv/dev.openstreetmap.org" do owner "root" group "root" - mode 0o755 + mode "755" end template "/srv/dev.openstreetmap.org/index.html" do source "dev.html.erb" owner "root" group "root" - mode 0o644 + mode "644" end ssl_certificate "dev.openstreetmap.org" do @@ -129,7 +129,7 @@ template "/etc/phppgadmin/config.inc.php" do source "phppgadmin.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" end file "/etc/apache2/conf.d/phppgadmin" do @@ -177,7 +177,7 @@ search(:accounts, "*:*").each do |account| source "sudoers.user.erb" owner "root" group "root" - mode 0o440 + mode "440" variables :user => name end end @@ -192,7 +192,7 @@ if node[:postgresql][:clusters][:"12/main"] source "cleanup-assets.erb" owner "root" group "root" - mode 0o755 + mode "755" end ruby_version = node[:passenger][:ruby_version] @@ -257,31 +257,31 @@ if node[:postgresql][:clusters][:"12/main"] directory site_directory do owner "apis" group "apis" - mode 0o755 + mode "755" end directory log_directory do owner "apis" group "apis" - mode 0o755 + mode "755" end directory gpx_directory do owner "apis" group "apis" - mode 0o755 + mode "755" end directory "#{gpx_directory}/traces" do owner "apis" group "apis" - mode 0o755 + mode "755" end directory "#{gpx_directory}/images" do owner "apis" group "apis" - mode 0o755 + mode "755" end rails_port site_name do @@ -306,7 +306,7 @@ if node[:postgresql][:clusters][:"12/main"] source "rails.setup.rb.erb" owner "apis" group "apis" - mode 0o644 + mode "644" variables :site => site_name notifies :restart, "rails_port[#{site_name}]" end @@ -360,7 +360,7 @@ if node[:postgresql][:clusters][:"12/main"] source "cgimap.environment.erb" owner "root" group "root" - mode 0o640 + mode "640" variables :cgimap_port => cgimap_port, :database_port => node[:postgresql][:clusters][:"12/main"][:port], :database_name => database_name, @@ -391,7 +391,7 @@ if node[:postgresql][:clusters][:"12/main"] source "logrotate.apis.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :name => name, :log_directory => log_directory, :rails_directory => rails_directory @@ -436,14 +436,14 @@ if node[:postgresql][:clusters][:"12/main"] directory "/srv/apis.dev.openstreetmap.org" do owner "apis" group "apis" - mode 0o755 + mode "755" end template "/srv/apis.dev.openstreetmap.org/index.html" do source "apis.html.erb" owner "apis" group "apis" - mode 0o644 + mode "644" end ssl_certificate "apis.dev.openstreetmap.org" do @@ -466,14 +466,14 @@ end directory "/srv/ooc.openstreetmap.org" do owner "root" group "root" - mode 0o755 + mode "755" end remote_directory "/srv/ooc.openstreetmap.org/html" do source "ooc" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o644 diff --git a/cookbooks/devices/recipes/default.rb b/cookbooks/devices/recipes/default.rb index 6c859aa77..8572dd232 100644 --- a/cookbooks/devices/recipes/default.rb +++ b/cookbooks/devices/recipes/default.rb @@ -20,7 +20,7 @@ cookbook_file "/usr/local/bin/fixeep-82574_83.sh" do owner "root" group "root" - mode 0o755 + mode "755" end execute "udevadm-trigger" do @@ -32,6 +32,6 @@ template "/etc/udev/rules.d/99-chef.rules" do source "udev.rules.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :run, "execute[udevadm-trigger]" end diff --git a/cookbooks/dhcpd/recipes/default.rb b/cookbooks/dhcpd/recipes/default.rb index 18343a67d..a8f0dd6f7 100644 --- a/cookbooks/dhcpd/recipes/default.rb +++ b/cookbooks/dhcpd/recipes/default.rb @@ -27,7 +27,7 @@ template "/etc/dhcp/dhcpd.conf" do source "dhcpd.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :domain => domain end diff --git a/cookbooks/dmca/recipes/default.rb b/cookbooks/dmca/recipes/default.rb index c0bd959a6..625f702f1 100644 --- a/cookbooks/dmca/recipes/default.rb +++ b/cookbooks/dmca/recipes/default.rb @@ -23,14 +23,14 @@ include_recipe "php::apache" directory "/srv/dmca.openstreetmap.org" do owner "root" group "root" - mode 0o755 + mode "755" end remote_directory "/srv/dmca.openstreetmap.org/html" do source "html" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o644 diff --git a/cookbooks/dns/recipes/default.rb b/cookbooks/dns/recipes/default.rb index 057daf55c..6bb3865f0 100644 --- a/cookbooks/dns/recipes/default.rb +++ b/cookbooks/dns/recipes/default.rb @@ -44,20 +44,20 @@ remote_file "/usr/local/bin/dnscontrol" do source "https://github.com/StackExchange/dnscontrol/releases/download/v3.2.0/dnscontrol-Linux" owner "root" group "root" - mode 0o755 + mode "755" end directory "/srv/dns.openstreetmap.org" do owner "root" group "root" - mode 0o755 + mode "755" end remote_directory "/srv/dns.openstreetmap.org/html" do source "html" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o644 @@ -72,7 +72,7 @@ Dir.glob("/var/lib/dns/json/*.json").each do |kmlfile| source "zone.html.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :zone => zone end @@ -83,7 +83,7 @@ template "/srv/dns.openstreetmap.org/html/index.html" do source "index.html.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :zones => zones end @@ -102,7 +102,7 @@ template "/usr/local/bin/dns-update" do source "dns-update.erb" owner "root" group "git" - mode 0o750 + mode "750" variables :passwords => passwords, :geoservers => geoservers end @@ -116,7 +116,7 @@ end directory "/var/lib/dns" do owner "git" group "git" - mode 0o2775 + mode "2775" notifies :run, "execute[dns-update]" end @@ -124,7 +124,7 @@ template "/var/lib/dns/creds.json" do source "creds.json.erb" owner "git" group "git" - mode 0o440 + mode "440" variables :passwords => passwords end @@ -132,7 +132,7 @@ cookbook_file "#{node[:dns][:repository]}/hooks/post-receive" do source "post-receive" owner "git" group "git" - mode 0o750 + mode "750" only_if { ::Dir.exist?("#{node[:dns][:repository]}/hooks") } end @@ -140,7 +140,7 @@ template "/usr/local/bin/dns-check" do source "dns-check.erb" owner "root" group "git" - mode 0o750 + mode "750" variables :passwords => passwords, :geoservers => geoservers end diff --git a/cookbooks/docker/recipes/default.rb b/cookbooks/docker/recipes/default.rb index 54d65dfe5..23891f110 100644 --- a/cookbooks/docker/recipes/default.rb +++ b/cookbooks/docker/recipes/default.rb @@ -28,14 +28,14 @@ package %w[ directory "/etc/docker" do owner "root" group "root" - mode 0o755 + mode "755" end template "/etc/docker/daemon.json" do source "daemon.json.erb" owner "root" group "root" - mode 0o644 + mode "644" end service "docker" do diff --git a/cookbooks/donate/recipes/default.rb b/cookbooks/donate/recipes/default.rb index 7eaf47bdd..ca38efbb1 100644 --- a/cookbooks/donate/recipes/default.rb +++ b/cookbooks/donate/recipes/default.rb @@ -47,7 +47,7 @@ end directory "/srv/donate.openstreetmap.org" do owner "donate" group "donate" - mode 0o755 + mode "755" end git "/srv/donate.openstreetmap.org" do @@ -61,14 +61,14 @@ end directory "/srv/donate.openstreetmap.org/data" do owner "donate" group "donate" - mode 0o755 + mode "755" end template "/srv/donate.openstreetmap.org/scripts/db-connect.inc.php" do source "db-connect.inc.php.erb" owner "root" group "donate" - mode 0o644 + mode "644" variables :passwords => passwords end @@ -92,6 +92,6 @@ template "/etc/cron.daily/osmf-donate-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o750 + mode "750" variables :passwords => passwords end diff --git a/cookbooks/elasticsearch/recipes/default.rb b/cookbooks/elasticsearch/recipes/default.rb index 7feaa4a4c..cd7e8ff01 100644 --- a/cookbooks/elasticsearch/recipes/default.rb +++ b/cookbooks/elasticsearch/recipes/default.rb @@ -26,7 +26,7 @@ template "/etc/elasticsearch/elasticsearch.yml" do source "elasticsearch.yml.erb" user "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[elasticsearch]" end diff --git a/cookbooks/exim/recipes/default.rb b/cookbooks/exim/recipes/default.rb index a9f6472e6..2e8e0f642 100644 --- a/cookbooks/exim/recipes/default.rb +++ b/cookbooks/exim/recipes/default.rb @@ -53,7 +53,7 @@ else key_file "/etc/ssl/private/exim.key" owner "root" group "ssl-cert" - mode 0o640 + mode "640" org "OpenStreetMap" email "postmaster@openstreetmap.org" common_name node[:fqdn] @@ -86,7 +86,7 @@ if node[:exim][:smarthost_name] directory "/srv/mta-sts.#{primary_domain}" do owner "root" group "root" - mode 0o755 + mode "755" end domains.each do |domain| @@ -94,7 +94,7 @@ if node[:exim][:smarthost_name] source "mta-sts.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :domain => domain end end @@ -114,7 +114,7 @@ end file "/etc/exim4/blocked-senders" do owner "root" group "Debian-exim" - mode 0o644 + mode "644" end if node[:exim][:dkim_selectors] @@ -124,20 +124,20 @@ if node[:exim][:dkim_selectors] owner "root" source "dkim-domains.erb" group "Debian-exim" - mode 0o644 + mode "644" end template "/etc/exim4/dkim-selectors" do owner "root" source "dkim-selectors.erb" group "Debian-exim" - mode 0o644 + mode "644" end directory "/etc/exim4/dkim-keys" do owner "root" group "Debian-exim" - mode 0o755 + mode "755" end node[:exim][:dkim_selectors].each do |domain, _selector| @@ -145,7 +145,7 @@ if node[:exim][:dkim_selectors] content keys[domain].join("\n") owner "root" group "Debian-exim" - mode 0o640 + mode "640" end end end @@ -154,7 +154,7 @@ template "/etc/exim4/exim4.conf" do source "exim4.conf.erb" owner "root" group "Debian-exim" - mode 0o644 + mode "644" variables :relay_to_domains => relay_to_domains.sort, :relay_from_hosts => relay_from_hosts.sort notifies :restart, "service[exim4]" @@ -181,14 +181,14 @@ template "/etc/aliases" do source "aliases.erb" owner "root" group "root" - mode 0o644 + mode "644" end remote_directory "/etc/exim4/noreply" do source "noreply" owner "root" group "Debian-exim" - mode 0o755 + mode "755" files_owner "root" files_group "Debian-exim" files_mode 0o755 diff --git a/cookbooks/fail2ban/recipes/default.rb b/cookbooks/fail2ban/recipes/default.rb index 81bb4cd40..e0e8e2372 100644 --- a/cookbooks/fail2ban/recipes/default.rb +++ b/cookbooks/fail2ban/recipes/default.rb @@ -25,7 +25,7 @@ template "/etc/fail2ban/jail.d/00-default.conf" do source "jail.default.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[fail2ban]" end @@ -33,7 +33,7 @@ template "/etc/fail2ban/paths-overrides.local" do source "paths-overrides.local.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[fail2ban]" end diff --git a/cookbooks/fail2ban/resources/filter.rb b/cookbooks/fail2ban/resources/filter.rb index 5e10241a4..3cd173eee 100644 --- a/cookbooks/fail2ban/resources/filter.rb +++ b/cookbooks/fail2ban/resources/filter.rb @@ -30,7 +30,7 @@ action :create do source new_resource.source owner "root" group "root" - mode 0o644 + mode "644" end else template "/etc/fail2ban/filter.d/#{new_resource.filter}.conf" do @@ -38,7 +38,7 @@ action :create do source "filter.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :failregex => new_resource.failregex, :ignoreregex => new_resource.ignoreregex end diff --git a/cookbooks/fail2ban/resources/jail.rb b/cookbooks/fail2ban/resources/jail.rb index 66fa19d2d..6ff5307e3 100644 --- a/cookbooks/fail2ban/resources/jail.rb +++ b/cookbooks/fail2ban/resources/jail.rb @@ -33,7 +33,7 @@ action :create do source "jail.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :name => new_resource.jail, :filter => new_resource.filter, :logpath => new_resource.logpath, diff --git a/cookbooks/forum/recipes/default.rb b/cookbooks/forum/recipes/default.rb index 80694cf50..798c778d1 100644 --- a/cookbooks/forum/recipes/default.rb +++ b/cookbooks/forum/recipes/default.rb @@ -50,7 +50,7 @@ end directory "/srv/forum.openstreetmap.org" do owner "forum" group "forum" - mode 0o755 + mode "755" end git "/srv/forum.openstreetmap.org/html/" do @@ -69,7 +69,7 @@ remote_file "#{cache_dir}/air3_v0.8.zip" do checksum "df547e3ac9596c1e6d9eedcb108559f84a28669763e24114ca6cdcbf118caf6c" owner "root" group "root" - mode 0o644 + mode "644" backup false end @@ -85,20 +85,20 @@ end directory "/srv/forum.openstreetmap.org/html/cache/" do owner "www-data" group "www-data" - mode 0o755 + mode "755" end directory "/srv/forum.openstreetmap.org/html/img/avatars/" do owner "www-data" group "www-data" - mode 0o755 + mode "755" end template "/srv/forum.openstreetmap.org/html/config.php" do source "config.php.erb" owner "forum" group "www-data" - mode 0o440 + mode "440" variables :passwords => passwords end @@ -114,6 +114,6 @@ template "/etc/cron.daily/forum-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o750 + mode "750" variables :passwords => passwords end diff --git a/cookbooks/foundation/recipes/board.rb b/cookbooks/foundation/recipes/board.rb index d951a2a0d..dae3ca476 100644 --- a/cookbooks/foundation/recipes/board.rb +++ b/cookbooks/foundation/recipes/board.rb @@ -41,5 +41,5 @@ end cookbook_file "/srv/board.osmfoundation.org/Wiki.png" do owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" end diff --git a/cookbooks/foundation/recipes/dwg.rb b/cookbooks/foundation/recipes/dwg.rb index 13238888e..5624cbb6a 100644 --- a/cookbooks/foundation/recipes/dwg.rb +++ b/cookbooks/foundation/recipes/dwg.rb @@ -41,5 +41,5 @@ end cookbook_file "/srv/dwg.osmfoundation.org/Wiki.png" do owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" end diff --git a/cookbooks/foundation/recipes/mwg.rb b/cookbooks/foundation/recipes/mwg.rb index d347528c8..9fa47457e 100644 --- a/cookbooks/foundation/recipes/mwg.rb +++ b/cookbooks/foundation/recipes/mwg.rb @@ -41,5 +41,5 @@ end cookbook_file "/srv/mwg.osmfoundation.org/Wiki.png" do owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" end diff --git a/cookbooks/foundation/recipes/owg.rb b/cookbooks/foundation/recipes/owg.rb index dc1f359eb..5622f3343 100644 --- a/cookbooks/foundation/recipes/owg.rb +++ b/cookbooks/foundation/recipes/owg.rb @@ -45,7 +45,7 @@ git "/srv/operations.osmfoundation.org" do end directory "/srv/operations.osmfoundation.org/_site" do - mode 0o755 + mode "755" owner "nobody" group "nogroup" end @@ -53,7 +53,7 @@ end # Workaround https://github.com/jekyll/jekyll/issues/7804 # by creating a .jekyll-cache folder directory "/srv/operations.osmfoundation.org/.jekyll-cache" do - mode 0o755 + mode "755" owner "nobody" group "nogroup" end diff --git a/cookbooks/foundation/recipes/wiki.rb b/cookbooks/foundation/recipes/wiki.rb index 92ec86ea0..8fbbaf8c7 100644 --- a/cookbooks/foundation/recipes/wiki.rb +++ b/cookbooks/foundation/recipes/wiki.rb @@ -57,5 +57,5 @@ end cookbook_file "/srv/wiki.osmfoundation.org/Wiki.png" do owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" end diff --git a/cookbooks/ftp/recipes/default.rb b/cookbooks/ftp/recipes/default.rb index d2c42100c..28d69a751 100644 --- a/cookbooks/ftp/recipes/default.rb +++ b/cookbooks/ftp/recipes/default.rb @@ -26,14 +26,14 @@ template "/etc/vsftpd.conf" do source "vsftpd.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" end template "/etc/pam.d/vsftpd" do source "pam-vsftpd.erb" owner "root" group "root" - mode 0o644 + mode "644" end service "vsftpd" do diff --git a/cookbooks/geodns/recipes/default.rb b/cookbooks/geodns/recipes/default.rb index f017fb124..43643c2f9 100644 --- a/cookbooks/geodns/recipes/default.rb +++ b/cookbooks/geodns/recipes/default.rb @@ -26,7 +26,7 @@ package %w[ directory "/etc/gdnsd/config.d" do owner "nobody" group "nogroup" - mode 0o755 + mode "755" end %w[tile nominatim].each do |zone| @@ -36,7 +36,7 @@ end source "zone.#{type}.erb" owner "nobody" group "nogroup" - mode 0o644 + mode "644" variables :zone => zone end end @@ -46,7 +46,7 @@ template "/etc/gdnsd/config" do source "config.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[gdnsd]" end @@ -54,7 +54,7 @@ template "/etc/gdnsd/zones/geo.openstreetmap.org" do source "geo.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[gdnsd]" end diff --git a/cookbooks/geoipupdate/recipes/default.rb b/cookbooks/geoipupdate/recipes/default.rb index 58bf40d8b..b27b439b6 100644 --- a/cookbooks/geoipupdate/recipes/default.rb +++ b/cookbooks/geoipupdate/recipes/default.rb @@ -27,7 +27,7 @@ template "/etc/GeoIP.conf" do source "GeoIP.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :license_keys => license_keys end diff --git a/cookbooks/git/recipes/server.rb b/cookbooks/git/recipes/server.rb index 5ee3686d8..9b4e06a45 100644 --- a/cookbooks/git/recipes/server.rb +++ b/cookbooks/git/recipes/server.rb @@ -28,19 +28,19 @@ git_directory = node[:git][:directory] directory git_directory do owner "root" group "root" - mode 0o775 + mode "775" end directory "#{git_directory}/public" do owner node[:git][:public_user] group node[:git][:public_group] - mode 0o2775 + mode "2775" end directory "#{git_directory}/private" do owner node[:git][:private_user] group node[:git][:private_group] - mode 0o2775 + mode "2775" end Dir.glob("#{git_directory}/*/*.git").each do |repository| @@ -48,7 +48,7 @@ Dir.glob("#{git_directory}/*/*.git").each do |repository| source "post-update.erb" owner "root" group node[:git][:group] - mode 0o755 + mode "755" end end @@ -56,5 +56,5 @@ template "/etc/cron.daily/git-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end diff --git a/cookbooks/git/recipes/web.rb b/cookbooks/git/recipes/web.rb index 468074e2c..7e1f38cc2 100644 --- a/cookbooks/git/recipes/web.rb +++ b/cookbooks/git/recipes/web.rb @@ -29,20 +29,20 @@ template "/etc/gitweb.conf" do source "gitweb.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" end directory "/srv/#{git_site}" do owner "root" group "root" - mode 0o755 + mode "755" end template "/srv/#{git_site}/robots.txt" do source "robots.txt.erb" owner "root" group "root" - mode 0o644 + mode "644" end ssl_certificate git_site do diff --git a/cookbooks/gps-tile/recipes/default.rb b/cookbooks/gps-tile/recipes/default.rb index b960143e7..5546b3431 100644 --- a/cookbooks/gps-tile/recipes/default.rb +++ b/cookbooks/gps-tile/recipes/default.rb @@ -38,7 +38,7 @@ package %w[ directory "/srv/gps-tile.openstreetmap.org" do owner "gpstile" group "gpstile" - mode 0o755 + mode "755" end git "/srv/gps-tile.openstreetmap.org/import" do @@ -111,7 +111,7 @@ remote_directory "/srv/gps-tile.openstreetmap.org/html" do source "html" owner "gpstile" group "gpstile" - mode 0o755 + mode "755" files_owner "gpstile" files_group "gpstile" files_mode 0o644 diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index ad00a2e61..6e155f04f 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -146,7 +146,7 @@ if File.exist?("/etc/default/grub") source "grub.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :units => units, :entry => grub_entry notifies :run, "execute[update-grub]" end @@ -163,7 +163,7 @@ template "/etc/initramfs-tools/conf.d/mdadm" do source "initramfs-mdadm.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :run, "execute[update-initramfs]" end @@ -270,7 +270,7 @@ if status_packages.include?("cciss-vol-status") source "cciss-vol-statusd.erb" owner "root" group "root" - mode 0o755 + mode "755" notifies :restart, "service[cciss-vol-statusd]" end @@ -301,7 +301,7 @@ end source "raid.default.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :devices => status_packages[status_package] end @@ -406,14 +406,14 @@ if disks.count.positive? source "smartd-mailer.erb" owner "root" group "root" - mode 0o755 + mode "755" end template "/etc/smartd.conf" do source "smartd.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :disks => disks end @@ -421,7 +421,7 @@ if disks.count.positive? source "smartmontools.erb" owner "root" group "root" - mode 0o644 + mode "644" end service "smartd" do @@ -481,7 +481,7 @@ if File.exist?("/etc/mdadm/mdadm.conf") file "/etc/mdadm/mdadm.conf" do owner "root" group "root" - mode 0o644 + mode "644" content mdadm_conf end @@ -495,7 +495,7 @@ template "/etc/modules" do source "modules.erb" owner "root" group "root" - mode 0o644 + mode "644" end service "kmod" do @@ -510,7 +510,7 @@ if node[:hardware][:watchdog] source "watchdog.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :module => node[:hardware][:watchdog] end @@ -557,7 +557,7 @@ unless Dir.glob("/sys/class/hwmon/hwmon*").empty? source "sensors.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :run, "execute[/etc/sensors.d/chef.conf]" end end diff --git a/cookbooks/imagery/recipes/default.rb b/cookbooks/imagery/recipes/default.rb index 7fd210284..63b33b70f 100644 --- a/cookbooks/imagery/recipes/default.rb +++ b/cookbooks/imagery/recipes/default.rb @@ -49,21 +49,21 @@ package %w[ directory "/srv/imagery/mapserver" do owner "root" group "root" - mode 0o755 + mode "755" recursive true end directory "/srv/imagery/common" do owner "root" group "root" - mode 0o755 + mode "755" recursive true end directory "/srv/imagery/common/ostn02-ntv2-data" do owner "root" group "root" - mode 0o755 + mode "755" end remote_file "#{Chef::Config[:file_cache_path]}/ostn02-ntv2-data.zip" do diff --git a/cookbooks/imagery/resources/layer.rb b/cookbooks/imagery/resources/layer.rb index c26ac085d..05a0452ee 100644 --- a/cookbooks/imagery/resources/layer.rb +++ b/cookbooks/imagery/resources/layer.rb @@ -44,7 +44,7 @@ action :create do file "/srv/imagery/layers/#{new_resource.site}/#{new_resource.layer}.yml" do owner "root" group "root" - mode 0o644 + mode "644" content YAML.dump(:name => new_resource.layer, :title => new_resource.title || new_resource.layer, :url => "//{s}.#{new_resource.site}/layer/#{new_resource.layer}/{z}/{x}/{y}.png", @@ -59,7 +59,7 @@ action :create do source "mapserver.map.erb" owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.to_hash end @@ -76,7 +76,7 @@ action :create do directory "/srv/imagery/nginx/#{new_resource.site}" do owner "root" group "root" - mode 0o755 + mode "755" recursive true end @@ -85,7 +85,7 @@ action :create do source "nginx_imagery_layer_fragment.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.to_hash end end diff --git a/cookbooks/imagery/resources/site.rb b/cookbooks/imagery/resources/site.rb index 720181498..711ae3e50 100644 --- a/cookbooks/imagery/resources/site.rb +++ b/cookbooks/imagery/resources/site.rb @@ -30,20 +30,20 @@ action :create do directory "/srv/#{new_resource.site}" do user "root" group "root" - mode 0o755 + mode "755" end directory "/srv/imagery/layers/#{new_resource.site}" do user "root" group "root" - mode 0o755 + mode "755" recursive true end directory "/srv/imagery/overlays/#{new_resource.site}" do user "root" group "root" - mode 0o755 + mode "755" recursive true end @@ -51,7 +51,7 @@ action :create do source "index.html.erb" user "root" group "root" - mode 0o644 + mode "644" variables :title => new_resource.title end @@ -59,28 +59,28 @@ action :create do source "robots.txt" user "root" group "root" - mode 0o644 + mode "644" end cookbook_file "/srv/#{new_resource.site}/imagery.css" do source "imagery.css" user "root" group "root" - mode 0o644 + mode "644" end cookbook_file "/srv/#{new_resource.site}/clientaccesspolicy.xml" do source "clientaccesspolicy.xml" user "root" group "root" - mode 0o644 + mode "644" end cookbook_file "/srv/#{new_resource.site}/crossdomain.xml" do source "crossdomain.xml" user "root" group "root" - mode 0o644 + mode "644" end layers = Dir.glob("/srv/imagery/layers/#{new_resource.site}/*.yml").collect do |path| @@ -91,7 +91,7 @@ action :create do source "imagery.js.erb" user "root" group "root" - mode 0o644 + mode "644" variables :bbox => new_resource.bbox, :layers => layers end diff --git a/cookbooks/incron/recipes/default.rb b/cookbooks/incron/recipes/default.rb index f7d44a45e..4c785d15e 100644 --- a/cookbooks/incron/recipes/default.rb +++ b/cookbooks/incron/recipes/default.rb @@ -41,7 +41,7 @@ incrontabs.each do |user, lines| file "/var/spool/incron/#{user}" do owner user group "incron" - mode 0o600 + mode "600" content lines.join("\n") end end diff --git a/cookbooks/irc/recipes/default.rb b/cookbooks/irc/recipes/default.rb index 238c17c8a..60ef89110 100644 --- a/cookbooks/irc/recipes/default.rb +++ b/cookbooks/irc/recipes/default.rb @@ -27,14 +27,14 @@ end directory "/srv/irc.openstreetmap.org" do owner "root" group "root" - mode 0755 + mode "755" end remote_directory "/srv/irc.openstreetmap.org/html" do source "html" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o644 diff --git a/cookbooks/kibana/recipes/default.rb b/cookbooks/kibana/recipes/default.rb index ceeaf13df..1a8c7712a 100644 --- a/cookbooks/kibana/recipes/default.rb +++ b/cookbooks/kibana/recipes/default.rb @@ -34,7 +34,7 @@ end directory "/opt/kibana-#{version}" do owner "root" group "root" - mode 0o755 + mode "755" end execute "unzip-kibana-#{version}" do @@ -48,19 +48,19 @@ end directory "/etc/kibana" do owner "root" group "root" - mode 0o755 + mode "755" end directory "/var/run/kibana" do owner "kibana" group "kibana" - mode 0o755 + mode "755" end directory "/var/log/kibana" do owner "kibana" group "kibana" - mode 0o755 + mode "755" end systemd_service "kibana@" do @@ -87,7 +87,7 @@ node[:kibana][:sites].each do |name, details| )) owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[kibana@#{name}]" end diff --git a/cookbooks/letsencrypt/recipes/default.rb b/cookbooks/letsencrypt/recipes/default.rb index 899ee1fc5..fad5eb27c 100644 --- a/cookbooks/letsencrypt/recipes/default.rb +++ b/cookbooks/letsencrypt/recipes/default.rb @@ -30,31 +30,31 @@ package %w[ directory "/etc/letsencrypt" do owner "letsencrypt" group "letsencrypt" - mode 0o755 + mode "755" end directory "/var/lib/letsencrypt" do owner "letsencrypt" group "letsencrypt" - mode 0o755 + mode "755" end directory "/var/log/letsencrypt" do owner "letsencrypt" group "letsencrypt" - mode 0o700 + mode "700" end directory "/srv/acme.openstreetmap.org" do owner "letsencrypt" group "letsencrypt" - mode 0o755 + mode "755" end directory "/srv/acme.openstreetmap.org/html" do owner "letsencrypt" group "letsencrypt" - mode 0o755 + mode "755" end ssl_certificate "acme.openstreetmap.org" do @@ -70,46 +70,46 @@ end directory "/srv/acme.openstreetmap.org/config" do owner "letsencrypt" group "letsencrypt" - mode 0o755 + mode "755" end directory "/srv/acme.openstreetmap.org/work" do owner "letsencrypt" group "letsencrypt" - mode 0o755 + mode "755" end directory "/srv/acme.openstreetmap.org/logs" do owner "letsencrypt" group "letsencrypt" - mode 0o700 + mode "700" end directory "/srv/acme.openstreetmap.org/.chef" do owner "letsencrypt" group "letsencrypt" - mode 0o2775 + mode "2775" end file "/srv/acme.openstreetmap.org/.chef/client.pem" do content keys["letsencrypt"].join("\n") owner "letsencrypt" group "letsencrypt" - mode 0o660 + mode "660" end cookbook_file "/srv/acme.openstreetmap.org/.chef/knife.rb" do source "knife.rb" owner "letsencrypt" group "letsencrypt" - mode 0o660 + mode "660" end remote_directory "/srv/acme.openstreetmap.org/bin" do source "bin" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o755 @@ -118,7 +118,7 @@ end directory "/srv/acme.openstreetmap.org/requests" do owner "root" group "root" - mode 0o755 + mode "755" end certificates = search(:node, "letsencrypt:certificates").each_with_object({}) do |n, c| @@ -137,7 +137,7 @@ certificates.each do |name, details| source "request.erb" owner "root" group "letsencrypt" - mode 0o754 + mode "754" variables details end @@ -171,7 +171,7 @@ template "/srv/acme.openstreetmap.org/bin/check-certificates" do source "check-certificates.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :certificates => certificates end diff --git a/cookbooks/logstash/recipes/default.rb b/cookbooks/logstash/recipes/default.rb index e58df226b..712b33cb8 100644 --- a/cookbooks/logstash/recipes/default.rb +++ b/cookbooks/logstash/recipes/default.rb @@ -31,7 +31,7 @@ cookbook_file "/var/lib/logstash/beats.crt" do source "beats.crt" user "root" group "logstash" - mode 0o644 + mode "644" notifies :restart, "service[logstash]" end @@ -39,7 +39,7 @@ file "/var/lib/logstash/beats.key" do content keys["beats"].join("\n") user "root" group "logstash" - mode 0o640 + mode "640" notifies :restart, "service[logstash]" end @@ -47,19 +47,19 @@ template "/etc/logstash/conf.d/chef.conf" do source "logstash.conf.erb" user "root" group "root" - mode 0o644 + mode "644" notifies :start, "service[logstash]" end file "/etc/logrotate.d/logstash" do - mode 0o644 + mode "644" end template "/etc/default/logstash" do source "logstash.default.erb" user "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[logstash]" end @@ -71,7 +71,7 @@ template "/etc/cron.daily/expire-logstash" do source "expire.erb" owner "root" group "root" - mode 0o755 + mode "755" end forwarders = search(:node, "recipes:logstash\\:\\:forwarder") diff --git a/cookbooks/logstash/recipes/forwarder.rb b/cookbooks/logstash/recipes/forwarder.rb index c87b9edf1..af74c9e4c 100644 --- a/cookbooks/logstash/recipes/forwarder.rb +++ b/cookbooks/logstash/recipes/forwarder.rb @@ -27,7 +27,7 @@ cookbook_file "/etc/filebeat/filebeat.crt" do source "beats.crt" user "root" group "root" - mode 0o600 + mode "600" notifies :restart, "service[filebeat]" end @@ -35,7 +35,7 @@ file "/etc/filebeat/filebeat.yml" do content YAML.dump(node[:logstash][:forwarder].to_hash) user "root" group "root" - mode 0o600 + mode "600" notifies :restart, "service[filebeat]" end diff --git a/cookbooks/mailman/recipes/default.rb b/cookbooks/mailman/recipes/default.rb index a4d9768ab..bd88b9d92 100644 --- a/cookbooks/mailman/recipes/default.rb +++ b/cookbooks/mailman/recipes/default.rb @@ -29,7 +29,7 @@ template "/etc/mailman/mm_cfg.py" do source "mm_cfg.py.erb" user "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[mailman]" end @@ -63,5 +63,5 @@ template "/etc/cron.daily/lists-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end diff --git a/cookbooks/mediawiki/recipes/default.rb b/cookbooks/mediawiki/recipes/default.rb index 7dd28bb4e..08e7d73d0 100644 --- a/cookbooks/mediawiki/recipes/default.rb +++ b/cookbooks/mediawiki/recipes/default.rb @@ -76,7 +76,7 @@ template "/etc/mediawiki/parsoid/config.yaml" do source "parsoid-config.yaml.erb" owner "root" group "root" - mode 0o644 + mode "644" end service "parsoid" do diff --git a/cookbooks/mediawiki/resources/extension.rb b/cookbooks/mediawiki/resources/extension.rb index b332d4296..4b44fa3d1 100644 --- a/cookbooks/mediawiki/resources/extension.rb +++ b/cookbooks/mediawiki/resources/extension.rb @@ -38,7 +38,7 @@ action :create do source new_resource.source owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o755 + mode "755" files_owner node[:mediawiki][:user] files_group node[:mediawiki][:group] files_mode 0o755 @@ -71,7 +71,7 @@ action :create do source new_resource.template user node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o664 + mode "664" variables new_resource.variables end else @@ -79,7 +79,7 @@ action :create do content " new_resource.site, :directory => mediawiki_directory, :database_params => database_params, @@ -226,7 +226,7 @@ action :create do source "mediawiki-backup.cron.erb" owner "root" group "root" - mode 0o700 + mode "700" variables :name => new_resource.site, :directory => site_directory, :database_params => database_params @@ -493,7 +493,7 @@ action :create do cookbook "mediawiki" owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" backup false end @@ -501,7 +501,7 @@ action :create do cookbook "mediawiki" owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" backup false end @@ -509,7 +509,7 @@ action :create do cookbook "mediawiki" owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" backup false end @@ -544,7 +544,7 @@ action :update do source "LocalSettings.php.erb" owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o664 + mode "664" variables :name => new_resource.site, :directory => mediawiki_directory, :database_params => database_params, diff --git a/cookbooks/mediawiki/resources/skin.rb b/cookbooks/mediawiki/resources/skin.rb index a80827340..4930c01b7 100644 --- a/cookbooks/mediawiki/resources/skin.rb +++ b/cookbooks/mediawiki/resources/skin.rb @@ -37,7 +37,7 @@ action :create do source new_resource.source owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o755 + mode "755" files_owner node[:mediawiki][:user] files_group node[:mediawiki][:group] files_mode 0o755 @@ -63,7 +63,7 @@ action :create do source new_resource.template user node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o664 + mode "664" variables new_resource.variables end else @@ -79,7 +79,7 @@ action :create do content file_content user node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o664 + mode "664" only_if { ::File.exist?(skin_file) } end end diff --git a/cookbooks/memcached/recipes/default.rb b/cookbooks/memcached/recipes/default.rb index 1df2a7eb7..937e8b93c 100644 --- a/cookbooks/memcached/recipes/default.rb +++ b/cookbooks/memcached/recipes/default.rb @@ -30,7 +30,7 @@ template "/etc/memcached.conf" do source "memcached.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[memcached]" end diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 70d6f3050..aad5d40d8 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -44,7 +44,7 @@ template "/etc/munin/munin-node.conf" do source "munin-node.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :servers => servers notifies :restart, "service[munin-node]" end diff --git a/cookbooks/munin/recipes/plugins.rb b/cookbooks/munin/recipes/plugins.rb index 8f0eca1f2..7a2ebd60d 100644 --- a/cookbooks/munin/recipes/plugins.rb +++ b/cookbooks/munin/recipes/plugins.rb @@ -23,7 +23,7 @@ remote_directory "/usr/local/share/munin/plugins" do source "plugins" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o755 @@ -34,7 +34,7 @@ remote_directory "/etc/munin/plugin-conf.d" do source "plugin-conf.d" owner "root" group "munin" - mode 0o750 + mode "750" files_owner "root" files_group "root" files_mode 0o644 diff --git a/cookbooks/munin/recipes/server.rb b/cookbooks/munin/recipes/server.rb index f9fe98def..0b6e142ac 100644 --- a/cookbooks/munin/recipes/server.rb +++ b/cookbooks/munin/recipes/server.rb @@ -27,13 +27,13 @@ template "/etc/default/rrdcached" do source "rrdcached.erb" owner "root" group "root" - mode 0o644 + mode "644" end directory "/var/lib/munin/rrdcached" do owner "munin" group "munin" - mode 0o755 + mode "755" end service "rrdcached" do @@ -62,7 +62,7 @@ template "/etc/munin/munin.conf" do source "munin.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :expiry_time => expiry_time, :clients => clients, :frontends => frontends, :backends => backends, :tilecaches => tilecaches, :renderers => renderers, @@ -77,7 +77,7 @@ remote_directory "/srv/munin.openstreetmap.org" do source "www" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o644 @@ -87,7 +87,7 @@ end directory "/srv/munin.openstreetmap.org/dumps" do owner "www-data" group "www-data" - mode 0o755 + mode "755" end ssl_certificate "munin.openstreetmap.org" do @@ -103,7 +103,7 @@ template "/etc/cron.daily/munin-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end munin_plugin "munin_stats" diff --git a/cookbooks/munin/resources/plugin_conf.rb b/cookbooks/munin/resources/plugin_conf.rb index ab9a54a65..e58a42889 100644 --- a/cookbooks/munin/resources/plugin_conf.rb +++ b/cookbooks/munin/resources/plugin_conf.rb @@ -31,7 +31,7 @@ action :create do source new_resource.template owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.variables.merge(:name => new_resource.plugin_conf) end end diff --git a/cookbooks/mysql/recipes/default.rb b/cookbooks/mysql/recipes/default.rb index a8f14a0ae..99c086519 100644 --- a/cookbooks/mysql/recipes/default.rb +++ b/cookbooks/mysql/recipes/default.rb @@ -31,7 +31,7 @@ template "/etc/mysql/mysql.conf.d/zzz-chef.cnf" do source "my.cnf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[mysql]" end diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 5c73c5cc3..a6fcaf80f 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -173,7 +173,7 @@ end file "/etc/netplan/99-chef.yaml" do owner "root" group "root" - mode 0o644 + mode "644" content YAML.dump(netplan) end @@ -196,7 +196,7 @@ template "/etc/hosts" do source "hosts.erb" owner "root" group "root" - mode 0o644 + mode "644" not_if { ENV["TEST_KITCHEN"] } end @@ -207,14 +207,14 @@ end directory "/etc/systemd/resolved.conf.d" do owner "root" group "root" - mode 0o755 + mode "755" end template "/etc/systemd/resolved.conf.d/99-chef.conf" do source "resolved.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[systemd-resolved]", :immediately end @@ -288,7 +288,7 @@ template "/etc/default/shorewall" do source "shorewall-default.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall]" end @@ -296,7 +296,7 @@ template "/etc/shorewall/shorewall.conf" do source "shorewall.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall]" end @@ -304,7 +304,7 @@ template "/etc/shorewall/zones" do source "shorewall-zones.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :type => "ipv4" notifies :restart, "service[shorewall]" end @@ -313,7 +313,7 @@ template "/etc/shorewall/interfaces" do source "shorewall-interfaces.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall]" end @@ -321,7 +321,7 @@ template "/etc/shorewall/hosts" do source "shorewall-hosts.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :zones => zones notifies :restart, "service[shorewall]" end @@ -330,7 +330,7 @@ template "/etc/shorewall/conntrack" do source "shorewall-conntrack.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall]" only_if { node[:networking][:firewall][:raw] } end @@ -339,7 +339,7 @@ template "/etc/shorewall/policy" do source "shorewall-policy.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall]" end @@ -347,7 +347,7 @@ template "/etc/shorewall/rules" do source "shorewall-rules.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :family => "inet" notifies :restart, "service[shorewall]" end @@ -362,7 +362,7 @@ template "/etc/logrotate.d/shorewall" do source "logrotate.shorewall.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :name => "shorewall" end @@ -392,7 +392,7 @@ if node[:roles].include?("gateway") source "shorewall-masq.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall]" end else @@ -409,7 +409,7 @@ unless node.interfaces(:family => :inet6).empty? source "shorewall-default.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall6]" end @@ -417,7 +417,7 @@ unless node.interfaces(:family => :inet6).empty? source "shorewall6.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall6]" end @@ -425,7 +425,7 @@ unless node.interfaces(:family => :inet6).empty? source "shorewall-zones.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :type => "ipv6" notifies :restart, "service[shorewall6]" end @@ -434,7 +434,7 @@ unless node.interfaces(:family => :inet6).empty? source "shorewall6-interfaces.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall6]" end @@ -442,7 +442,7 @@ unless node.interfaces(:family => :inet6).empty? source "shorewall6-hosts.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :zones => zones notifies :restart, "service[shorewall6]" end @@ -451,7 +451,7 @@ unless node.interfaces(:family => :inet6).empty? source "shorewall-conntrack.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall6]" only_if { node[:networking][:firewall][:raw] } end @@ -460,7 +460,7 @@ unless node.interfaces(:family => :inet6).empty? source "shorewall-policy.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[shorewall6]" end @@ -468,7 +468,7 @@ unless node.interfaces(:family => :inet6).empty? source "shorewall-rules.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :family => "inet6" notifies :restart, "service[shorewall6]" end @@ -483,7 +483,7 @@ unless node.interfaces(:family => :inet6).empty? source "logrotate.shorewall.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :name => "shorewall6" end diff --git a/cookbooks/nfs/recipes/default.rb b/cookbooks/nfs/recipes/default.rb index c42cf9c82..216e825f2 100644 --- a/cookbooks/nfs/recipes/default.rb +++ b/cookbooks/nfs/recipes/default.rb @@ -29,7 +29,7 @@ node[:nfs].each do |mountpoint, details| directory mountpoint do owner "root" group "root" - mode 0o755 + mode "755" recursive true not_if { ::File.exist?(mountpoint) } end diff --git a/cookbooks/nfs/recipes/server.rb b/cookbooks/nfs/recipes/server.rb index 0378075fd..93fad876c 100644 --- a/cookbooks/nfs/recipes/server.rb +++ b/cookbooks/nfs/recipes/server.rb @@ -56,7 +56,7 @@ template "/etc/exports" do source "exports.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :exports => exports notifies :run, "execute[exportfs]" end diff --git a/cookbooks/nginx/recipes/default.rb b/cookbooks/nginx/recipes/default.rb index a7775c162..20128a1cb 100644 --- a/cookbooks/nginx/recipes/default.rb +++ b/cookbooks/nginx/recipes/default.rb @@ -27,13 +27,13 @@ template "/etc/nginx/nginx.conf" do source "nginx.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" end directory node[:nginx][:cache][:fastcgi][:directory] do owner "www-data" group "root" - mode 0o755 + mode "755" recursive true only_if { node[:nginx][:cache][:fastcgi][:enable] } end @@ -41,7 +41,7 @@ end directory node[:nginx][:cache][:proxy][:directory] do owner "www-data" group "root" - mode 0o755 + mode "755" recursive true only_if { node[:nginx][:cache][:proxy][:enable] } end @@ -65,7 +65,7 @@ template "/usr/local/bin/nginx-old-cache-cleanup" do source "nginx-old-cache-cleanup.erb" owner "root" group "root" - mode 0o755 + mode "755" end cron_d "nginx-old-cache-cleanup" do diff --git a/cookbooks/nginx/resources/site.rb b/cookbooks/nginx/resources/site.rb index 8a50ae042..25066f459 100644 --- a/cookbooks/nginx/resources/site.rb +++ b/cookbooks/nginx/resources/site.rb @@ -31,7 +31,7 @@ action :create do source new_resource.template owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.variables.merge(:name => new_resource.site, :directory => directory) end end diff --git a/cookbooks/nominatim/recipes/default.rb b/cookbooks/nominatim/recipes/default.rb index d92975742..f0a365c09 100644 --- a/cookbooks/nominatim/recipes/default.rb +++ b/cookbooks/nominatim/recipes/default.rb @@ -27,14 +27,14 @@ email_errors = data_bag_item("accounts", "lonvia")["email"] directory basedir do owner "nominatim" group "nominatim" - mode 0o755 + mode "755" recursive true end directory node[:nominatim][:logdir] do owner "nominatim" group "nominatim" - mode 0o755 + mode "755" recursive true end @@ -42,14 +42,14 @@ file "#{node[:nominatim][:logdir]}/query.log" do action :create_if_missing owner "www-data" group "adm" - mode 0o664 + mode "664" end file "#{node[:nominatim][:logdir]}/update.log" do action :create_if_missing owner "nominatim" group "adm" - mode 0o664 + mode "664" end # exception granted for a limited time so that they can set up their own server @@ -99,7 +99,7 @@ end directory "#{basedir}/tablespaces" do owner "postgres" group "postgres" - mode 0o700 + mode "700" end # Note: tablespaces must be exactly in the same location on each @@ -109,7 +109,7 @@ node[:nominatim][:tablespaces].each do |name, location| directory location do owner "postgres" group "postgres" - mode 0o700 + mode "700" recursive true end @@ -133,14 +133,14 @@ if node[:nominatim][:state] == "master" directory node[:rsyncd][:modules][:archive][:path] do owner "postgres" group "postgres" - mode 0o700 + mode "700" end template "/usr/local/bin/clean-db-nominatim" do source "clean-db-nominatim.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :archive_dir => node[:rsyncd][:modules][:archive][:path], :update_stop_file => "#{basedir}/status/updates_disabled", :streaming_clients => search(:node, "nominatim_state:slave").map { |slave| slave[:fqdn] }.join(" ") @@ -178,7 +178,7 @@ build_directory = "#{basedir}/bin" directory build_directory do owner "nominatim" group "nominatim" - mode 0o755 + mode "755" recursive true end @@ -209,7 +209,7 @@ template "#{source_directory}/.git/hooks/post-merge" do source "git-post-merge-hook.erb" owner "nominatim" group "nominatim" - mode 0o755 + mode "755" variables :srcdir => source_directory, :builddir => build_directory, :dbname => node[:nominatim][:dbname] @@ -219,7 +219,7 @@ template "#{build_directory}/settings/local.php" do source "settings.erb" owner "nominatim" group "nominatim" - mode 0o664 + mode "664" variables :base_url => node[:nominatim][:state] == "off" ? node[:fqdn] : "nominatim.openstreetmap.org", :dbname => node[:nominatim][:dbname], :flatnode_file => node[:nominatim][:flatnode_file], @@ -236,7 +236,7 @@ template "/etc/logrotate.d/nominatim" do source "logrotate.nominatim.erb" owner "root" group "root" - mode 0o644 + mode "644" end external_data = [ @@ -250,7 +250,7 @@ external_data.each do |fname| source "https://www.nominatim.org/data/#{fname}" owner "nominatim" group "nominatim" - mode 0o644 + mode "644" end end @@ -259,7 +259,7 @@ remote_file "#{source_directory}/data/country_osm_grid.sql.gz" do source "https://www.nominatim.org/data/country_grid.sql.gz" owner "nominatim" group "nominatim" - mode 0o644 + mode "644" end if node[:nominatim][:state] == "off" @@ -319,7 +319,7 @@ template "#{source_directory}/utils/nominatim-update" do source "updater.erb" user "nominatim" group "nominatim" - mode 0o755 + mode "755" variables :bindir => build_directory, :srcdir => source_directory, :logfile => "#{node[:nominatim][:logdir]}/update.log", @@ -332,7 +332,7 @@ template "/etc/init.d/nominatim-update" do source "updater.init.erb" user "nominatim" group "nominatim" - mode 0o755 + mode "755" variables :source_directory => source_directory end @@ -341,7 +341,7 @@ end source "#{fname}.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :db => node[:nominatim][:dbname] end end @@ -351,7 +351,7 @@ end directory "#{basedir}/etc" do owner "nominatim" group "adm" - mode 0o775 + mode "775" end %w[user_agent referrer email].each do |name| @@ -359,7 +359,7 @@ end action :create_if_missing owner "nominatim" group "adm" - mode 0o664 + mode "664" end end @@ -403,7 +403,7 @@ template "/etc/logrotate.d/nginx" do source "logrotate.nginx.erb" owner "root" group "root" - mode 0o644 + mode "644" end munin_plugin_conf "nominatim" do @@ -427,7 +427,7 @@ end directory "#{basedir}/status" do owner "nominatim" group "postgres" - mode 0o775 + mode "775" end include_recipe "fail2ban" diff --git a/cookbooks/ntp/recipes/default.rb b/cookbooks/ntp/recipes/default.rb index da5ff8193..02c80bc01 100644 --- a/cookbooks/ntp/recipes/default.rb +++ b/cookbooks/ntp/recipes/default.rb @@ -42,7 +42,7 @@ template "/etc/chrony/chrony.conf" do source "chrony.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[chrony]" end diff --git a/cookbooks/ohai/resources/plugin.rb b/cookbooks/ohai/resources/plugin.rb index ceff104b9..580d4912f 100644 --- a/cookbooks/ohai/resources/plugin.rb +++ b/cookbooks/ohai/resources/plugin.rb @@ -30,7 +30,7 @@ action :create do directory "/etc/chef/ohai" do owner "root" group "root" - mode 0o755 + mode "755" recursive true end @@ -38,7 +38,7 @@ action :create do source new_resource.template owner "root" group "root" - mode 0o644 + mode "644" notifies :reload, "ohai[#{new_resource.plugin}]" end end diff --git a/cookbooks/openssh/recipes/default.rb b/cookbooks/openssh/recipes/default.rb index 78df22c5e..06a88e8b5 100644 --- a/cookbooks/openssh/recipes/default.rb +++ b/cookbooks/openssh/recipes/default.rb @@ -27,7 +27,7 @@ template "/etc/ssh/sshd_config.d/chef.conf" do source "sshd_config.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[ssh]" only_if { Dir.exist?("/etc/ssh/sshd_config.d") } end @@ -73,7 +73,7 @@ end template "/etc/ssh/ssh_known_hosts" do source "ssh_known_hosts.erb" - mode 0o444 + mode "444" owner "root" group "root" backup false diff --git a/cookbooks/openvpn/recipes/default.rb b/cookbooks/openvpn/recipes/default.rb index 2446fe970..9cae35c67 100644 --- a/cookbooks/openvpn/recipes/default.rb +++ b/cookbooks/openvpn/recipes/default.rb @@ -55,7 +55,7 @@ node[:openvpn][:tunnels].each do |name, details| file "/etc/openvpn/#{name}.key" do owner "root" group "root" - mode 0o600 + mode "600" content peer[:openvpn][:keys][name] end end @@ -65,7 +65,7 @@ node[:openvpn][:tunnels].each do |name, details| source "tunnel.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :name => name, :address => node[:openvpn][:address], :port => node[:openvpn][:tunnels][name][:port], diff --git a/cookbooks/osmosis/recipes/default.rb b/cookbooks/osmosis/recipes/default.rb index 4160a9b40..ff38e90e0 100644 --- a/cookbooks/osmosis/recipes/default.rb +++ b/cookbooks/osmosis/recipes/default.rb @@ -40,7 +40,7 @@ end directory osmosis_directory do owner "root" group "root" - mode 0o755 + mode "755" end remote_file "#{cache_dir}/#{osmosis_package}" do @@ -48,7 +48,7 @@ remote_file "#{cache_dir}/#{osmosis_package}" do source "https://github.com/openstreetmap/osmosis/releases/download/#{osmosis_version}/osmosis-#{osmosis_version}.zip" owner "root" group "root" - mode 0o644 + mode "644" backup false end diff --git a/cookbooks/osqa/recipes/default.rb b/cookbooks/osqa/recipes/default.rb index 72534683e..c56a2a9b6 100644 --- a/cookbooks/osqa/recipes/default.rb +++ b/cookbooks/osqa/recipes/default.rb @@ -101,7 +101,7 @@ node[:osqa][:sites].each do |site| directory directory do owner site_user group site_group - mode 0o755 + mode "755" end execute "osqa-migrate" do @@ -126,14 +126,14 @@ node[:osqa][:sites].each do |site| directory "#{directory}/upfiles" do user site_user group site_group - mode 0o755 + mode "755" end template "#{directory}/osqa/osqa.wsgi" do source "osqa.wsgi.erb" owner site_user group site_group - mode 0o644 + mode "644" variables :directory => directory notifies :reload, "service[apache2]" end @@ -155,7 +155,7 @@ node[:osqa][:sites].each do |site| file "#{directory}/osqa/settings_local.py" do owner site_user group site_group - mode 0o644 + mode "644" content settings notifies :reload, "service[apache2]" end @@ -164,7 +164,7 @@ node[:osqa][:sites].each do |site| source "backup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :name => backup_name, :directory => directory, :user => site_user, :database => database_name end end diff --git a/cookbooks/otrs/recipes/default.rb b/cookbooks/otrs/recipes/default.rb index e43a89244..e235f619c 100644 --- a/cookbooks/otrs/recipes/default.rb +++ b/cookbooks/otrs/recipes/default.rb @@ -92,7 +92,7 @@ end file "/opt/otrs-#{version}/Kernel/Config.pm" do owner user group "www-data" - mode 0o664 + mode "664" content config end @@ -121,7 +121,7 @@ Dir.glob("/opt/otrs/var/cron/*.dist") do |distname| file name do owner "otrs" group "www-data" - mode 0o664 + mode "664" content IO.read(distname) notifies :run, "execute[/opt/otrs/bin/Cron.sh]" end @@ -141,12 +141,12 @@ template "/etc/sudoers.d/otrs" do source "sudoers.erb" owner "root" group "root" - mode 0o440 + mode "440" end template "/etc/cron.daily/otrs-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end diff --git a/cookbooks/passenger/recipes/default.rb b/cookbooks/passenger/recipes/default.rb index 159c6b3ca..5ad026023 100644 --- a/cookbooks/passenger/recipes/default.rb +++ b/cookbooks/passenger/recipes/default.rb @@ -33,7 +33,7 @@ template "/usr/local/bin/passenger-ruby" do source "ruby.erb" owner "root" group "root" - mode 0o755 + mode "755" notifies :reload, "service[apache2]" end diff --git a/cookbooks/php/recipes/fpm.rb b/cookbooks/php/recipes/fpm.rb index 0be8bafe3..ecda9640c 100644 --- a/cookbooks/php/recipes/fpm.rb +++ b/cookbooks/php/recipes/fpm.rb @@ -25,7 +25,7 @@ template "/etc/php/#{node[:php][:version]}/fpm/conf.d/99-chef.ini" do source "php-fpm.ini.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[php#{node[:php][:version]}-fpm]" end diff --git a/cookbooks/php/resources/fpm.rb b/cookbooks/php/resources/fpm.rb index 0376af4a4..870ca4ff5 100644 --- a/cookbooks/php/resources/fpm.rb +++ b/cookbooks/php/resources/fpm.rb @@ -31,7 +31,7 @@ action :create do source new_resource.template owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.variables end end diff --git a/cookbooks/planet/recipes/current.rb b/cookbooks/planet/recipes/current.rb index 6242559eb..c7a4a8f50 100644 --- a/cookbooks/planet/recipes/current.rb +++ b/cookbooks/planet/recipes/current.rb @@ -27,20 +27,20 @@ template "/usr/local/bin/planet-update" do source "planet-update.erb" owner "root" group "root" - mode 0o755 + mode "755" end template "/usr/local/bin/planet-update-file" do source "planet-update-file.erb" owner "root" group "root" - mode 0o755 + mode "755" end directory "/var/lib/planet" do owner "planet" group "planet" - mode 0o755 + mode "755" end remote_file "/var/lib/planet/planet.pbf" do @@ -48,7 +48,7 @@ remote_file "/var/lib/planet/planet.pbf" do source "https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf" owner "planet" group "planet" - mode 0o644 + mode "644" not_if { ENV["TEST_KITCHEN"] } end @@ -63,5 +63,5 @@ template "/etc/logrotate.d/planet-update" do source "planet-update.logrotate.erb" owner "root" group "root" - mode 0o644 + mode "644" end diff --git a/cookbooks/planet/recipes/default.rb b/cookbooks/planet/recipes/default.rb index 4ea86b7ac..5996b77dc 100644 --- a/cookbooks/planet/recipes/default.rb +++ b/cookbooks/planet/recipes/default.rb @@ -42,7 +42,7 @@ remote_directory "/store/planet#cgi" do source "cgi" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o755 @@ -52,7 +52,7 @@ remote_directory node[:planet][:dump][:xml_history_directory] do source "history_cgi" owner "www-data" group "planet" - mode 0o775 + mode "775" files_owner "root" files_group "root" files_mode 0o755 @@ -62,7 +62,7 @@ remote_directory "/store/planet/cc-by-sa/full-experimental" do source "ccbysa_history_cgi" owner "www-data" group "planet" - mode 0o775 + mode "775" files_owner "root" files_group "root" files_mode 0o755 @@ -73,21 +73,21 @@ end directory node[:planet][:dump][dir] do owner "www-data" group "planet" - mode 0o775 + mode "775" end end directory "/store/planet/notes" do owner "www-data" group "planet" - mode 0o775 + mode "775" end template "/usr/local/bin/apache-latest-planet-filename" do source "apache-latest-planet-filename.erb" owner "root" group "root" - mode 0o755 + mode "755" notifies :restart, "service[apache2]" end @@ -109,7 +109,7 @@ template "/etc/logrotate.d/apache2" do source "logrotate.apache.erb" owner "root" group "root" - mode 0o644 + mode "644" end munin_plugin "planet_age" @@ -118,7 +118,7 @@ template "/usr/local/bin/old-planet-file-cleanup" do source "old-planet-file-cleanup.erb" owner "root" group "root" - mode 0o755 + mode "755" end cron_d "old-planet-file-cleanup" do diff --git a/cookbooks/planet/recipes/dump.rb b/cookbooks/planet/recipes/dump.rb index 1d1d170bf..86a22d449 100644 --- a/cookbooks/planet/recipes/dump.rb +++ b/cookbooks/planet/recipes/dump.rb @@ -52,7 +52,7 @@ package %w[ directory "/opt/planet-dump-ng" do owner "root" group "root" - mode 0o755 + mode "755" end git "/opt/planet-dump-ng" do @@ -94,7 +94,7 @@ end directory "/store/planetdump" do owner "www-data" group "www-data" - mode 0o755 + mode "755" recursive true end @@ -103,7 +103,7 @@ end source "#{program}.erb" owner "root" group "root" - mode 0o755 + mode "755" end end diff --git a/cookbooks/planet/recipes/notes.rb b/cookbooks/planet/recipes/notes.rb index 662abe770..bccbb0fcf 100644 --- a/cookbooks/planet/recipes/notes.rb +++ b/cookbooks/planet/recipes/notes.rb @@ -31,7 +31,7 @@ package %w[ directory "/opt/planet-notes-dump" do owner "root" group "root" - mode 0o755 + mode "755" end git "/opt/planet-notes-dump" do @@ -46,7 +46,7 @@ template "/usr/local/bin/planet-notes-dump" do source "planet-notes-dump.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :password => db_passwords["planetdump"] end diff --git a/cookbooks/planet/recipes/replication.rb b/cookbooks/planet/recipes/replication.rb index 3fbfd7377..2579b511c 100644 --- a/cookbooks/planet/recipes/replication.rb +++ b/cookbooks/planet/recipes/replication.rb @@ -38,7 +38,7 @@ remote_directory "/opt/flush" do source "flush" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o755 @@ -57,7 +57,7 @@ remote_directory "/usr/local/bin" do source "replication-bin" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o755 @@ -67,21 +67,21 @@ template "/usr/local/bin/users-agreed" do source "users-agreed.erb" owner "root" group "root" - mode 0o755 + mode "755" end template "/usr/local/bin/users-deleted" do source "users-deleted.erb" owner "root" group "root" - mode 0o755 + mode "755" end remote_directory "/store/planet/users_deleted" do source "users_deleted" owner "planet" group "planet" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o644 @@ -91,7 +91,7 @@ remote_directory "/store/planet/replication" do source "replication-cgi" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o755 @@ -100,44 +100,44 @@ end directory "/store/planet/replication/changesets" do owner "planet" group "planet" - mode 0o755 + mode "755" end directory "/store/planet/replication/day" do owner "planet" group "planet" - mode 0o755 + mode "755" end directory "/store/planet/replication/hour" do owner "planet" group "planet" - mode 0o755 + mode "755" end directory "/store/planet/replication/minute" do owner "planet" group "planet" - mode 0o755 + mode "755" end directory "/etc/replication" do owner "root" group "root" - mode 0o755 + mode "755" end directory "/var/run/lock/changeset-replication/" do owner "planet" group "planet" - mode 0o750 + mode "750" end template "/etc/replication/auth.conf" do source "replication.auth.erb" user "root" group "planet" - mode 0o640 + mode "640" variables :password => db_passwords["planetdiff"] end @@ -145,7 +145,7 @@ template "/etc/replication/changesets.conf" do source "changesets.conf.erb" user "root" group "planet" - mode 0o640 + mode "640" variables :password => db_passwords["planetdiff"] end @@ -153,27 +153,27 @@ template "/etc/replication/users-agreed.conf" do source "users-agreed.conf.erb" user "planet" group "planet" - mode 0o600 + mode "600" variables :password => db_passwords["planetdiff"] end directory "/var/lib/replication" do owner "planet" group "planet" - mode 0o755 + mode "755" end directory "/var/lib/replication/hour" do owner "planet" group "planet" - mode 0o755 + mode "755" end template "/var/lib/replication/hour/configuration.txt" do source "replication.config.erb" owner "planet" group "planet" - mode 0o644 + mode "644" variables :base => "minute", :interval => 3600 end @@ -184,14 +184,14 @@ end directory "/var/lib/replication/day" do owner "planet" group "planet" - mode 0o755 + mode "755" end template "/var/lib/replication/day/configuration.txt" do source "replication.config.erb" owner "planet" group "planet" - mode 0o644 + mode "644" variables :base => "hour", :interval => 86400 end diff --git a/cookbooks/postgresql/recipes/default.rb b/cookbooks/postgresql/recipes/default.rb index a513f018e..4e5068712 100644 --- a/cookbooks/postgresql/recipes/default.rb +++ b/cookbooks/postgresql/recipes/default.rb @@ -36,7 +36,7 @@ node[:postgresql][:versions].each do |version| source "postgresql.conf.erb" owner "postgres" group "postgres" - mode 0o644 + mode "644" variables :version => version, :defaults => defaults, :settings => settings notifies :reload, "service[postgresql]" end @@ -45,7 +45,7 @@ node[:postgresql][:versions].each do |version| source "pg_hba.conf.erb" owner "postgres" group "postgres" - mode 0o640 + mode "640" variables :early_rules => settings[:early_authentication_rules] || defaults[:early_authentication_rules], :late_rules => settings[:late_authentication_rules] || defaults[:late_authentication_rules] notifies :reload, "service[postgresql]" @@ -55,7 +55,7 @@ node[:postgresql][:versions].each do |version| source "pg_ident.conf.erb" owner "postgres" group "postgres" - mode 0o640 + mode "640" variables :maps => settings[:user_name_maps] || defaults[:user_name_maps] notifies :reload, "service[postgresql]" end @@ -82,7 +82,7 @@ node[:postgresql][:versions].each do |version| source "recovery.conf.erb" owner "postgres" group "postgres" - mode 0o640 + mode "640" variables :standby_mode => standby_mode, :primary_conninfo => primary_conninfo, :restore_command => restore_command, diff --git a/cookbooks/rsyncd/recipes/default.rb b/cookbooks/rsyncd/recipes/default.rb index 7a93fc021..29a9c879b 100644 --- a/cookbooks/rsyncd/recipes/default.rb +++ b/cookbooks/rsyncd/recipes/default.rb @@ -51,7 +51,7 @@ template "/etc/default/rsync" do source "rsync.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[rsync]" end @@ -59,7 +59,7 @@ template "/etc/rsyncd.conf" do source "rsyncd.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :hosts_allow => hosts_allow, :hosts_deny => hosts_deny end diff --git a/cookbooks/serverinfo/recipes/default.rb b/cookbooks/serverinfo/recipes/default.rb index 9a9e1b5a7..8d154c66a 100644 --- a/cookbooks/serverinfo/recipes/default.rb +++ b/cookbooks/serverinfo/recipes/default.rb @@ -49,7 +49,7 @@ roles = { :rows => search(:role, "*:*") } file "/srv/hardware.openstreetmap.org/_data/nodes.json" do content nodes.to_json - mode 0o644 + mode "644" owner "root" group "root" notifies :run, "execute[/srv/hardware.openstreetmap.org]" @@ -57,14 +57,14 @@ end file "/srv/hardware.openstreetmap.org/_data/roles.json" do content roles.to_json - mode 0o644 + mode "644" owner "root" group "root" notifies :run, "execute[/srv/hardware.openstreetmap.org]" end directory "/srv/hardware.openstreetmap.org/_site" do - mode 0o755 + mode "755" owner "nobody" group "nogroup" end @@ -72,7 +72,7 @@ end # Workaround https://github.com/jekyll/jekyll/issues/7804 # by creating a .jekyll-cache folder directory "/srv/hardware.openstreetmap.org/.jekyll-cache" do - mode 0o755 + mode "755" owner "nobody" group "nogroup" end diff --git a/cookbooks/snmpd/recipes/default.rb b/cookbooks/snmpd/recipes/default.rb index 10353914c..98e4c400b 100644 --- a/cookbooks/snmpd/recipes/default.rb +++ b/cookbooks/snmpd/recipes/default.rb @@ -32,7 +32,7 @@ template "/etc/snmp/snmpd.conf" do source "snmpd.conf.erb" owner "root" group "root" - mode 0o600 + mode "600" variables :communities => communities notifies :restart, "service[snmpd]" end diff --git a/cookbooks/spamassassin/recipes/default.rb b/cookbooks/spamassassin/recipes/default.rb index 49b15a583..d9af52bd1 100644 --- a/cookbooks/spamassassin/recipes/default.rb +++ b/cookbooks/spamassassin/recipes/default.rb @@ -27,14 +27,14 @@ end directory "/var/spool/spamassassin" do owner "debian-spamd" group "debian-spamd" - mode 0o755 + mode "755" end template "/etc/default/spamassassin" do source "spamassassin.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[spamassassin]" end @@ -52,7 +52,7 @@ template "/etc/spamassassin/local.cf" do source "local.cf.erb" owner "root" group "root" - mode 0o644 + mode "644" variables :trusted_networks => trusted_networks.sort notifies :restart, "service[spamassassin]" end diff --git a/cookbooks/squid/recipes/default.rb b/cookbooks/squid/recipes/default.rb index 78741e3e2..655832be2 100644 --- a/cookbooks/squid/recipes/default.rb +++ b/cookbooks/squid/recipes/default.rb @@ -56,13 +56,13 @@ template "/etc/squid/squid.conf" do source "squid.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" end directory "/etc/squid/squid.conf.d" do owner "root" group "root" - mode 0o755 + mode "755" end Array(node[:squid][:cache_dir]).each do |cache_dir| @@ -75,7 +75,7 @@ Array(node[:squid][:cache_dir]).each do |cache_dir| directory cache_dir do owner "proxy" group "proxy" - mode 0o750 + mode "750" recursive true notifies :restart, "service[squid]" end diff --git a/cookbooks/squid/resources/fragment.rb b/cookbooks/squid/resources/fragment.rb index 152a6d971..22c31ba47 100644 --- a/cookbooks/squid/resources/fragment.rb +++ b/cookbooks/squid/resources/fragment.rb @@ -28,7 +28,7 @@ action :create do source new_resource.template owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.variables end end diff --git a/cookbooks/ssl/recipes/default.rb b/cookbooks/ssl/recipes/default.rb index 674c8768d..4ec5e85c3 100644 --- a/cookbooks/ssl/recipes/default.rb +++ b/cookbooks/ssl/recipes/default.rb @@ -23,12 +23,12 @@ package "ssl-cert" cookbook_file "/etc/ssl/certs/letsencrypt.pem" do owner "root" group "root" - mode 0o444 + mode "444" backup false end openssl_dhparam "/etc/ssl/certs/dhparam.pem" do owner "root" group "root" - mode 0o444 + mode "444" end diff --git a/cookbooks/ssl/resources/certificate.rb b/cookbooks/ssl/resources/certificate.rb index fdbcf2b52..fd1bff0e4 100644 --- a/cookbooks/ssl/resources/certificate.rb +++ b/cookbooks/ssl/resources/certificate.rb @@ -36,7 +36,7 @@ action :create do file "/etc/ssl/certs/#{new_resource.certificate}.pem" do owner "root" group "root" - mode 0o444 + mode "444" content certificate backup false manage_symlink_source false @@ -46,7 +46,7 @@ action :create do file "/etc/ssl/private/#{new_resource.certificate}.key" do owner "root" group "ssl-cert" - mode 0o440 + mode "440" content key backup false manage_symlink_source false @@ -59,7 +59,7 @@ action :create do key_file "/etc/ssl/private/#{new_resource.certificate}.key" owner "root" group "ssl-cert" - mode 0o640 + mode "640" org "OpenStreetMap" email "operations@osmfoundation.org" common_name new_resource.domains.first diff --git a/cookbooks/stateofthemap/recipes/default.rb b/cookbooks/stateofthemap/recipes/default.rb index 05239f2e3..d0bdee0d5 100644 --- a/cookbooks/stateofthemap/recipes/default.rb +++ b/cookbooks/stateofthemap/recipes/default.rb @@ -45,7 +45,7 @@ end directory "/srv/2007.stateofthemap.org" do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end wordpress_site "2007.stateofthemap.org" do @@ -72,7 +72,7 @@ end directory "/srv/2008.stateofthemap.org" do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end wordpress_site "2008.stateofthemap.org" do @@ -99,7 +99,7 @@ end directory "/srv/2009.stateofthemap.org" do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end git "/srv/2009.stateofthemap.org" do @@ -137,7 +137,7 @@ end directory "/srv/2010.stateofthemap.org" do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end git "/srv/2010.stateofthemap.org" do @@ -180,7 +180,7 @@ end directory "/srv/2011.stateofthemap.org" do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end git "/srv/2011.stateofthemap.org" do @@ -223,7 +223,7 @@ end directory "/srv/2012.stateofthemap.org" do owner "wordpress" group "wordpress" - mode 0o755 + mode "755" end git "/srv/2012.stateofthemap.org" do @@ -323,7 +323,7 @@ end end directory "/srv/#{year}.stateofthemap.org/_site" do - mode 0o755 + mode "755" owner "nobody" group "nogroup" end @@ -331,7 +331,7 @@ end # Workaround https://github.com/jekyll/jekyll/issues/7804 # by creating a .jekyll-cache folder directory "/srv/#{year}.stateofthemap.org/.jekyll-cache" do - mode 0o755 + mode "755" owner "nobody" group "nogroup" end @@ -370,6 +370,6 @@ template "/etc/cron.daily/sotm-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o750 + mode "750" variables :passwords => passwords end diff --git a/cookbooks/subversion/recipes/default.rb b/cookbooks/subversion/recipes/default.rb index f5803e5ee..d7a33bf33 100644 --- a/cookbooks/subversion/recipes/default.rb +++ b/cookbooks/subversion/recipes/default.rb @@ -27,7 +27,7 @@ remote_directory "#{repository_directory}/hooks" do source "hooks" owner "www-data" group "www-data" - mode 0o755 + mode "755" files_owner "www-data" files_group "www-data" files_mode 0o755 @@ -65,5 +65,5 @@ template "/etc/cron.daily/svn-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end diff --git a/cookbooks/supybot/recipes/default.rb b/cookbooks/supybot/recipes/default.rb index 10119e056..68d8eb744 100644 --- a/cookbooks/supybot/recipes/default.rb +++ b/cookbooks/supybot/recipes/default.rb @@ -28,14 +28,14 @@ package "python3-git" directory "/etc/supybot" do owner "supybot" group "supybot" - mode 0o755 + mode "755" end template "/etc/supybot/supybot.conf" do source "supybot.conf.erb" owner "supybot" group "supybot" - mode 0o644 + mode "644" variables :passwords => passwords end @@ -43,78 +43,78 @@ template "/etc/supybot/channels.conf" do source "channels.conf.erb" owner "supybot" group "supybot" - mode 0o644 + mode "644" end template "/etc/supybot/git.conf" do source "git.conf.erb" owner "supybot" group "supybot" - mode 0o644 + mode "644" end template "/etc/supybot/ignores.conf" do source "ignores.conf.erb" owner "supybot" group "supybot" - mode 0o644 + mode "644" end template "/etc/supybot/userdata.conf" do source "userdata.conf.erb" owner "supybot" group "supybot" - mode 0o644 + mode "644" end template "/etc/supybot/users.conf" do source "users.conf.erb" owner "supybot" group "supybot" - mode 0o644 + mode "644" variables :passwords => users end directory "/var/lib/supybot" do owner "root" group "root" - mode 0o755 + mode "755" end directory "/var/lib/supybot/data" do owner "supybot" group "supybot" - mode 0o755 + mode "755" end directory "/var/lib/supybot/backup" do owner "supybot" group "supybot" - mode 0o755 + mode "755" end directory "/var/lib/supybot/git" do owner "supybot" group "supybot" - mode 0o755 + mode "755" end directory "/var/log/supybot" do owner "supybot" group "supybot" - mode 0o755 + mode "755" end directory "/usr/local/lib/supybot" do owner "root" group "root" - mode 0o755 + mode "755" end directory "/usr/local/lib/supybot/plugins" do owner "root" group "root" - mode 0o755 + mode "755" end git "/usr/local/lib/supybot/plugins/Git" do diff --git a/cookbooks/switch2osm/recipes/default.rb b/cookbooks/switch2osm/recipes/default.rb index 6f3d03933..c0a3da3cb 100644 --- a/cookbooks/switch2osm/recipes/default.rb +++ b/cookbooks/switch2osm/recipes/default.rb @@ -48,7 +48,7 @@ git "/srv/switch2osm.org" do end directory "/srv/switch2osm.org/_site" do - mode 0o755 + mode "755" owner "nobody" group "nogroup" end @@ -56,7 +56,7 @@ end # Workaround https://github.com/jekyll/jekyll/issues/7804 # by creating a .jekyll-cache folder directory "/srv/switch2osm.org/.jekyll-cache" do - mode 0o755 + mode "755" owner "nobody" group "nogroup" end diff --git a/cookbooks/sysfs/recipes/default.rb b/cookbooks/sysfs/recipes/default.rb index c0061b6e5..6e2dac1f5 100644 --- a/cookbooks/sysfs/recipes/default.rb +++ b/cookbooks/sysfs/recipes/default.rb @@ -34,7 +34,7 @@ else source "sysfs.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :restart, "service[sysfsutils]" end diff --git a/cookbooks/systemd/resources/path.rb b/cookbooks/systemd/resources/path.rb index 448a47cd6..918e5f801 100644 --- a/cookbooks/systemd/resources/path.rb +++ b/cookbooks/systemd/resources/path.rb @@ -40,7 +40,7 @@ action :create do source "path.erb" owner "root" group "root" - mode 0o644 + mode "644" variables path_variables end diff --git a/cookbooks/systemd/resources/service.rb b/cookbooks/systemd/resources/service.rb index 8098d51da..9db776470 100644 --- a/cookbooks/systemd/resources/service.rb +++ b/cookbooks/systemd/resources/service.rb @@ -81,7 +81,7 @@ action :create do source "environment.erb" owner "root" group "root" - mode 0o640 + mode "640" variables :environment => new_resource.environment_file end @@ -92,7 +92,7 @@ action :create do directory dropin_directory do owner "root" group "root" - mode 0o755 + mode "755" end end @@ -101,7 +101,7 @@ action :create do source "service.erb" owner "root" group "root" - mode 0o644 + mode "644" variables service_variables notifies :run, "execute[systemctl-reload]" end diff --git a/cookbooks/systemd/resources/timer.rb b/cookbooks/systemd/resources/timer.rb index 91de6e909..c18db64c8 100644 --- a/cookbooks/systemd/resources/timer.rb +++ b/cookbooks/systemd/resources/timer.rb @@ -44,7 +44,7 @@ action :create do source "timer.erb" owner "root" group "root" - mode 0o644 + mode "644" variables timer_variables end diff --git a/cookbooks/systemd/resources/tmpfile.rb b/cookbooks/systemd/resources/tmpfile.rb index 8c21b6b6f..2c294b5ba 100644 --- a/cookbooks/systemd/resources/tmpfile.rb +++ b/cookbooks/systemd/resources/tmpfile.rb @@ -33,7 +33,7 @@ action :create do source "tmpfile.erb" owner "root" group "root" - mode 0o644 + mode "644" variables new_resource.to_hash end diff --git a/cookbooks/taginfo/recipes/default.rb b/cookbooks/taginfo/recipes/default.rb index 567d81a0e..7972f380f 100644 --- a/cookbooks/taginfo/recipes/default.rb +++ b/cookbooks/taginfo/recipes/default.rb @@ -67,14 +67,14 @@ apache_module "headers" directory "/var/log/taginfo" do owner "taginfo" group "taginfo" - mode 0o755 + mode "755" end template "/etc/sudoers.d/taginfo" do source "sudoers.erb" owner "root" group "root" - mode 0o440 + mode "440" end node[:taginfo][:sites].each do |site| @@ -89,13 +89,13 @@ node[:taginfo][:sites].each do |site| directory "/var/log/taginfo/#{site_name}" do owner "taginfo" group "taginfo" - mode 0o755 + mode "755" end directory directory do owner "taginfo" group "taginfo" - mode 0o755 + mode "755" end git "#{directory}/taginfo" do @@ -131,7 +131,7 @@ node[:taginfo][:sites].each do |site| file "#{directory}/taginfo-config.json" do owner "taginfo" group "taginfo" - mode 0o644 + mode "644" content settings notifies :restart, "service[apache2]" end @@ -163,7 +163,7 @@ node[:taginfo][:sites].each do |site| directory "#{directory}/#{dir}" do owner "taginfo" group "taginfo" - mode 0o755 + mode "755" end end @@ -171,7 +171,7 @@ node[:taginfo][:sites].each do |site| source "update.erb" owner "taginfo" group "taginfo" - mode 0o755 + mode "755" variables :name => site_name, :directory => directory end @@ -195,6 +195,6 @@ template "/usr/local/bin/taginfo-update" do source "taginfo-update.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :sites => node[:taginfo][:sites] end diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index e9a569bd1..5a7a33af8 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -60,13 +60,13 @@ template "/etc/logrotate.d/apache2" do source "logrotate.apache.erb" owner "root" group "root" - mode 0o644 + mode "644" end directory "/srv/tile.openstreetmap.org" do owner "tile" group "tile" - mode 0o755 + mode "755" end package "renderd" @@ -96,14 +96,14 @@ end directory "/srv/tile.openstreetmap.org/tiles" do owner "tile" group "tile" - mode 0o755 + mode "755" end template "/etc/renderd.conf" do source "renderd.conf.erb" owner "root" group "root" - mode 0o644 + mode "644" notifies :reload, "service[apache2]" notifies :restart, "service[renderd]" end @@ -112,7 +112,7 @@ remote_directory "/srv/tile.openstreetmap.org/html" do source "html" owner "tile" group "tile" - mode 0o755 + mode "755" files_owner "tile" files_group "tile" files_mode 0o644 @@ -122,7 +122,7 @@ template "/srv/tile.openstreetmap.org/html/index.html" do source "index.html.erb" owner "tile" group "tile" - mode 0o644 + mode "644" end package %w[ @@ -149,21 +149,21 @@ package %w[ source "https://github.com/googlei18n/noto-fonts/raw/master/hinted/#{font}" owner "root" group "root" - mode 0o644 + mode "644" end end directory "/srv/tile.openstreetmap.org/cgi-bin" do owner "tile" group "tile" - mode 0o755 + mode "755" end template "/srv/tile.openstreetmap.org/cgi-bin/export" do source "export.erb" owner "tile" group "tile" - mode 0o755 + mode "755" variables :blocks => blocks, :totp_key => web_passwords["totp_key"] end @@ -171,20 +171,20 @@ template "/srv/tile.openstreetmap.org/cgi-bin/debug" do source "debug.erb" owner "tile" group "tile" - mode 0o755 + mode "755" end template "/etc/cron.hourly/export" do source "export.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end directory "/srv/tile.openstreetmap.org/data" do owner "tile" group "tile" - mode 0o755 + mode "755" end package "mapnik-utils" @@ -199,7 +199,7 @@ node[:tile][:data].each_value do |data| directory directory do owner "tile" group "tile" - mode 0o755 + mode "755" end else directory = "/srv/tile.openstreetmap.org/data" @@ -254,7 +254,7 @@ node[:tile][:data].each_value do |data| source url owner "tile" group "tile" - mode 0o644 + mode "644" backup false notifies :run, "execute[#{file}]", :immediately notifies :restart, "service[renderd]" @@ -279,7 +279,7 @@ end directory "/srv/tile.openstreetmap.org/styles" do owner "tile" group "tile" - mode 0o755 + mode "755" end node[:tile][:styles].each do |name, details| @@ -290,7 +290,7 @@ node[:tile][:styles].each do |name, details| source "update-lowzoom.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :style => name end @@ -302,21 +302,21 @@ node[:tile][:styles].each do |name, details| directory tile_directory do owner "tile" group "tile" - mode 0o755 + mode "755" end details[:tile_directories].each do |directory| directory directory[:name] do owner "www-data" group "www-data" - mode 0o755 + mode "755" end directory[:min_zoom].upto(directory[:max_zoom]) do |zoom| directory "#{directory[:name]}/#{zoom}" do owner "www-data" group "www-data" - mode 0o755 + mode "755" end link "#{tile_directory}/#{zoom}" do @@ -331,7 +331,7 @@ node[:tile][:styles].each do |name, details| action :create_if_missing owner "tile" group "tile" - mode 0o444 + mode "444" end git style_directory do @@ -425,20 +425,20 @@ end directory File.dirname(node[:tile][:database][:node_file]) do owner "root" group "root" - mode 0o755 + mode "755" recursive true end file node[:tile][:database][:node_file] do owner "tile" group "www-data" - mode 0o660 + mode "660" end directory "/var/log/tile" do owner "tile" group "tile" - mode 0o755 + mode "755" end package %w[ @@ -453,7 +453,7 @@ remote_directory "/usr/local/bin" do source "bin" owner "root" group "root" - mode 0o755 + mode "755" files_owner "root" files_group "root" files_mode 0o755 @@ -463,26 +463,26 @@ template "/usr/local/bin/expire-tiles" do source "expire-tiles.erb" owner "root" group "root" - mode 0o755 + mode "755" end directory "/var/lib/replicate" do owner "tile" group "tile" - mode 0o755 + mode "755" end directory "/var/lib/replicate/expire-queue" do owner "tile" group "www-data" - mode 0o775 + mode "775" end template "/usr/local/bin/replicate" do source "replicate.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :postgresql_version => postgresql_version.to_f end @@ -533,14 +533,14 @@ template "/etc/logrotate.d/replicate" do source "replicate.logrotate.erb" owner "root" group "root" - mode 0o644 + mode "644" end template "/usr/local/bin/render-lowzoom" do source "render-lowzoom.erb" owner "root" group "root" - mode 0o755 + mode "755" end systemd_service "render-lowzoom" do @@ -571,7 +571,7 @@ template "/usr/local/bin/cleanup-tiles" do source "cleanup-tiles.erb" owner "root" group "root" - mode 0o755 + mode "755" end tile_directories = node[:tile][:styles].collect do |_, style| diff --git a/cookbooks/tilecache/recipes/default.rb b/cookbooks/tilecache/recipes/default.rb index adc222685..d3f1dccfa 100644 --- a/cookbooks/tilecache/recipes/default.rb +++ b/cookbooks/tilecache/recipes/default.rb @@ -108,7 +108,7 @@ template "/etc/logrotate.d/squid" do source "logrotate.squid.erb" owner "root" group "root" - mode 0o644 + mode "644" end nginx_site "default" do @@ -119,7 +119,7 @@ template "/usr/local/bin/nginx_generate_tilecache_qos_map" do source "nginx_generate_tilecache_qos_map.erb" owner "root" group "root" - mode 0o750 + mode "750" variables :totp_key => web_passwords["totp_key"] end @@ -172,7 +172,7 @@ template "/etc/logrotate.d/nginx" do source "logrotate.nginx.erb" owner "root" group "root" - mode 0o644 + mode "644" end fail2ban_jail "squid" do @@ -190,27 +190,27 @@ end directory "/srv/tilecache" do owner "root" group "root" - mode 0o755 + mode "755" end directory "/srv/tilecache/data" do owner "www-data" group "www-data" - mode 0o755 + mode "755" end cookbook_file "/srv/tilecache/tilecache-curl-time.txt" do source "tilecache-curl-time.txt" owner "root" group "root" - mode 0o755 + mode "755" end template "/srv/tilecache/tilecache-curl-time" do source "tilecache-curl-time.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :caches => tilecaches, :renders => tilerenders end @@ -218,7 +218,7 @@ template "/srv/tilecache/tilecache-curl-time-cleanup" do source "tilecache-curl-time-cleanup.erb" owner "root" group "root" - mode 0o755 + mode "755" end ohai_plugin "tilecache" do diff --git a/cookbooks/tilelog/recipes/default.rb b/cookbooks/tilelog/recipes/default.rb index 4d3ddb512..8b4f91690 100644 --- a/cookbooks/tilelog/recipes/default.rb +++ b/cookbooks/tilelog/recipes/default.rb @@ -76,7 +76,7 @@ template "/usr/local/bin/tilelog" do source "tilelog.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :analyze_bin => "#{tilelog_source_directory}/openstreetmap-tile-analyze", :input_dir => tilelog_input_directory, :output_dir => tilelog_output_directory @@ -95,6 +95,6 @@ end directory tilelog_output_directory do user "www-data" group "www-data" - mode 0o755 + mode "755" recursive true end diff --git a/cookbooks/tools/recipes/default.rb b/cookbooks/tools/recipes/default.rb index 72df47773..ed0fe222a 100644 --- a/cookbooks/tools/recipes/default.rb +++ b/cookbooks/tools/recipes/default.rb @@ -80,5 +80,5 @@ template "/etc/default/motd-news" do source "motd-news.erb" owner "root" group "root" - mode 0o644 + mode "644" end diff --git a/cookbooks/trac/recipes/default.rb b/cookbooks/trac/recipes/default.rb index 347b41b9b..768dd4748 100644 --- a/cookbooks/trac/recipes/default.rb +++ b/cookbooks/trac/recipes/default.rb @@ -31,7 +31,7 @@ site_directory = "/srv/#{site_name}" directory "/var/lib/trac" do owner "trac" group "trac" - mode 0o755 + mode "755" end execute "trac-initenv-#{site_name}" do @@ -45,7 +45,7 @@ template "/var/lib/trac/conf/trac.ini" do source "trac.ini.erb" owner "trac" group "www-data" - mode 0o644 + mode "644" variables :name => site_name end @@ -53,7 +53,7 @@ remote_directory "/var/lib/trac/htdocs" do source "htdocs" owner "trac" group "trac" - mode 0o755 + mode "755" files_owner "trac" files_group "trac" files_mode 0o644 @@ -64,7 +64,7 @@ remote_directory "/var/lib/trac/templates" do source "templates" owner "trac" group "trac" - mode 0o755 + mode "755" files_owner "trac" files_group "trac" files_mode 0o644 @@ -81,7 +81,7 @@ end cookbook_file "/usr/local/bin/trac-authenticate" do owner "root" group "root" - mode 0o755 + mode "755" end apache_module "wsgi" @@ -105,12 +105,12 @@ template "/etc/sudoers.d/trac" do source "sudoers.erb" owner "root" group "root" - mode 0o440 + mode "440" end template "/etc/cron.daily/trac-backup" do source "backup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end diff --git a/cookbooks/web/recipes/base.rb b/cookbooks/web/recipes/base.rb index 450b35138..2c943c624 100644 --- a/cookbooks/web/recipes/base.rb +++ b/cookbooks/web/recipes/base.rb @@ -27,7 +27,7 @@ include_recipe "nfs" directory node[:web][:base_directory] do group "rails" - mode 0o2775 + mode "2775" end systemd_tmpfile node[:web][:pid_directory] do @@ -40,12 +40,12 @@ end directory node[:web][:log_directory] do owner "rails" group "rails" - mode 0o775 + mode "775" end template "/etc/logrotate.d/web" do source "logrotate.web.erb" owner "root" group "root" - mode 0o644 + mode "644" end diff --git a/cookbooks/web/recipes/cleanup.rb b/cookbooks/web/recipes/cleanup.rb index 7c3240152..91780994f 100644 --- a/cookbooks/web/recipes/cleanup.rb +++ b/cookbooks/web/recipes/cleanup.rb @@ -26,6 +26,6 @@ template "/etc/cron.daily/web-cleanup" do source "cleanup.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :ruby => ruby, :directory => rails_directory end diff --git a/cookbooks/web/recipes/frontend.rb b/cookbooks/web/recipes/frontend.rb index 947b7583b..58bff6090 100644 --- a/cookbooks/web/recipes/frontend.rb +++ b/cookbooks/web/recipes/frontend.rb @@ -46,7 +46,7 @@ template "/etc/logrotate.d/apache2" do source "logrotate.apache.erb" owner "root" group "root" - mode 0o644 + mode "644" end service "rails-jobs@mailers" do diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index 79debaa69..f9a061498 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -46,7 +46,7 @@ template "/etc/cron.hourly/passenger" do source "passenger.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" end ruby_version = node[:passenger][:ruby_version] @@ -136,7 +136,7 @@ template "/usr/local/bin/cleanup-rails-assets" do source "cleanup-assets.erb" owner "root" group "root" - mode 0o755 + mode "755" end gem_package "apachelogregex" @@ -146,7 +146,7 @@ template "/usr/local/bin/api-statistics" do source "api-statistics.erb" owner "root" group "root" - mode 0o755 + mode "755" end systemd_service "api-statistics" do diff --git a/cookbooks/web/recipes/statistics.rb b/cookbooks/web/recipes/statistics.rb index f725e108b..7f408ed79 100644 --- a/cookbooks/web/recipes/statistics.rb +++ b/cookbooks/web/recipes/statistics.rb @@ -26,7 +26,7 @@ template "/usr/local/bin/statistics" do source "statistics.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :ruby => ruby, :directory => rails_directory end diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index d5afc4872..8159d8710 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -123,7 +123,7 @@ action :create do declare_resource :directory, rails_directory do owner new_resource.user group new_resource.group - mode 0o2775 + mode "2775" end git rails_directory do @@ -155,7 +155,7 @@ action :create do source "database.yml.erb" owner new_resource.user group new_resource.group - mode 0o664 + mode "664" variables :host => new_resource.database_host, :port => new_resource.database_port, :name => new_resource.database_name, @@ -281,7 +281,7 @@ action :create do path "#{rails_directory}/config/application.yml" owner new_resource.user group new_resource.group - mode 0o664 + mode "664" content application_yml notifies :run, "execute[#{rails_directory}/public/assets]" only_if { ::File.exist?("#{rails_directory}/config/example.application.yml") } @@ -346,7 +346,7 @@ action :create do file "#{rails_directory}/config/settings.local.yml" do owner new_resource.user group new_resource.group - mode 0o664 + mode "664" content YAML.dump(settings) notifies :run, "execute[#{rails_directory}/public/assets]" only_if { ::File.exist?("#{rails_directory}/config/settings.yml") } @@ -362,7 +362,7 @@ action :create do file "#{rails_directory}/config/storage.yml" do owner new_resource.user group new_resource.group - mode 0o664 + mode "664" content YAML.dump(storage_configuration) notifies :run, "execute[#{rails_directory}/public/assets]" end @@ -371,7 +371,7 @@ action :create do file "#{rails_directory}/config/piwik.yml" do owner new_resource.user group new_resource.group - mode 0o664 + mode "664" content YAML.dump(new_resource.piwik_configuration) notifies :run, "execute[#{rails_directory}/public/assets]" end @@ -438,7 +438,7 @@ action :create do source "rails.cron.erb" owner "root" group "root" - mode 0o755 + mode "755" variables :directory => rails_directory end end diff --git a/cookbooks/wiki/recipes/default.rb b/cookbooks/wiki/recipes/default.rb index 287a645f6..4a13e3256 100644 --- a/cookbooks/wiki/recipes/default.rb +++ b/cookbooks/wiki/recipes/default.rb @@ -106,20 +106,20 @@ end cookbook_file "/srv/wiki.openstreetmap.org/osm_logo_wiki.png" do owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" end template "/srv/wiki.openstreetmap.org/robots.txt" do owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" source "robots.txt.erb" end cookbook_file "/srv/wiki.openstreetmap.org/favicon.ico" do owner node[:mediawiki][:user] group node[:mediawiki][:group] - mode 0o644 + mode "644" end directory "/srv/wiki.openstreetmap.org/dump" do diff --git a/cookbooks/wordpress/resources/plugin.rb b/cookbooks/wordpress/resources/plugin.rb index 72fd3973d..e2a57156b 100644 --- a/cookbooks/wordpress/resources/plugin.rb +++ b/cookbooks/wordpress/resources/plugin.rb @@ -34,7 +34,7 @@ action :create do source new_resource.source owner node[:wordpress][:user] group node[:wordpress][:group] - mode 0o755 + mode "755" files_owner node[:wordpress][:user] files_group node[:wordpress][:group] files_mode 0o755 diff --git a/cookbooks/wordpress/resources/site.rb b/cookbooks/wordpress/resources/site.rb index 1f4e67cc0..2105101fc 100644 --- a/cookbooks/wordpress/resources/site.rb +++ b/cookbooks/wordpress/resources/site.rb @@ -58,7 +58,7 @@ action :create do declare_resource :directory, site_directory do owner node[:wordpress][:user] group node[:wordpress][:group] - mode 0o755 + mode "755" end subversion site_directory do @@ -100,14 +100,14 @@ action :create do file "#{site_directory}/wp-config.php" do owner node[:wordpress][:user] group node[:wordpress][:group] - mode 0o644 + mode "644" content wp_config end declare_resource :directory, "#{site_directory}/wp-content/uploads" do owner "www-data" group "www-data" - mode 0o755 + mode "755" end file "#{site_directory}/sitemap.xml" do @@ -122,7 +122,7 @@ action :create do cookbook "wordpress" owner node[:wordpress][:user] group node[:wordpress][:group] - mode 0o644 + mode "644" backup false end diff --git a/cookbooks/wordpress/resources/theme.rb b/cookbooks/wordpress/resources/theme.rb index e4f232713..e0d8c399b 100644 --- a/cookbooks/wordpress/resources/theme.rb +++ b/cookbooks/wordpress/resources/theme.rb @@ -34,7 +34,7 @@ action :create do source new_resource.source owner node[:wordpress][:user] group node[:wordpress][:group] - mode 0o755 + mode "755" files_owner node[:wordpress][:user] files_group node[:wordpress][:group] files_mode 0o644 -- 2.39.5