source name.to_s
owner name.to_s
group name.to_s
- mode 0755
+ mode 0o755
files_owner name.to_s
files_group name.to_s
- files_mode 0644
+ files_mode 0o644
only_if do
begin
cookbook = run_context.cookbook_collection[cookbook_name]
source new_resource.template
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.variables
end
end
source new_resource.conf
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.variables
end
end
source new_resource.template
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.variables.merge(:name => new_resource.name, :directory => site_directory)
end
end
source "ports.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
service "apache2" do
source new_resource.template
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :url => new_resource.url
end
end
source "sources.list.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :run, "execute[apt-update]", :immediately
end
file "/etc/apt/apt.conf.d/20auto-upgrades" do
user "root"
group "root"
- mode 0644
+ mode 0o644
content auto_upgrades
end
source "apt.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/store/backup" do
owner "osmbackup"
group "osmbackup"
- mode 02755
+ mode 0o2755
end
cookbook_file "/usr/local/bin/expire-backups" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/cron.daily/expire-backups" do
source "expire.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
source "named.local.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[bind9]"
end
source "named.options.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[bind9]"
end
source "db.10.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :reload, "service[bind9]"
end
directory "/srv/blog.openstreetmap.org" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
wordpress_site "blog.openstreetmap.org" do
source "backup.cron.erb"
owner "root"
group "root"
- mode 0750
+ mode 0o750
variables :passwords => passwords
end
source "cgiirc.config.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
template "/etc/cgiirc/ipaccess" do
source "ipaccess.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :blocks => blocks["addresses"]
end
directory "/var/cache/chef" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
Dir.glob("/var/cache/chef/chef_*.deb").each do |deb|
source "https://packages.chef.io/stable/ubuntu/10.04/#{chef_package}"
owner "root"
group "root"
- mode 0644
+ mode 0o644
backup false
ignore_failure true
end
directory "/etc/chef" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/chef/client.rb" do
source "client.rb.erb"
owner "root"
group "root"
- mode 0640
+ mode 0o640
end
file "/etc/chef/client.pem" do
owner "root"
group "root"
- mode 0400
+ mode 0o400
end
template "/etc/chef/report.rb" do
source "report.rb.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
template "/etc/logrotate.d/chef" do
source "logrotate.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/etc/chef/trusted_certs" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/chef/trusted_certs/verisign.pem" do
source "verisign.pem.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory node[:ohai][:plugin_dir] do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
directory "/var/log/chef" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
if node[:lsb][:release].to_f >= 15.10
source "chef-client.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
service "chef-client" do
directory "/var/lib/chef" do
owner "chefrepo"
group "chefrepo"
- mode 02775
+ mode 0o2775
end
git "/var/lib/chef" do
directory "/var/lib/chef/.chef" do
owner "chefrepo"
group "chefrepo"
- mode 02775
+ mode 0o2775
end
file "/var/lib/chef/.chef/client.pem" do
content keys["git"].join("\n")
owner "chefrepo"
group "chefrepo"
- mode 0660
+ mode 0o660
end
cookbook_file "/var/lib/chef/.chef/knife.rb" do
source "knife.rb"
owner "chefrepo"
group "chefrepo"
- mode 0660
+ mode 0o660
end
template "#{node[:chef][:repository]}/hooks/post-receive" do
source "post-receive.erb"
owner "chefrepo"
group "chefrepo"
- mode 0750
+ mode 0o750
end
template "/etc/cron.daily/chef-repository-backup" do
source "repository-backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
source "server.rb.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :run, "execute[chef-server-reconfigure]"
end
source "server-backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/logrotate.d/chef-server" do
source "logrotate.server.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
munin_plugin "chef_status"
directory "/opt/civicrm-#{civicrm_version}" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
remote_file "/var/cache/chef/civicrm-#{civicrm_version}-wordpress.zip" do
source "https://download.civicrm.org/civicrm-#{civicrm_version}-wordpress.zip"
owner "wordpress"
group "wordpress"
- mode 0644
+ mode 0o644
backup false
end
source "https://download.civicrm.org/civicrm-#{civicrm_version}-l10n.tar.gz"
owner "wordpress"
group "wordpress"
- mode 0644
+ mode 0o644
backup false
end
directory "/srv/join.osmfoundation.org/wp-content/plugins/files" do
owner "www-data"
group "www-data"
- mode 0755
+ mode 0o755
end
extensions_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm-extensions"
directory extensions_directory do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
node[:civicrm][:extensions].each do |_, details|
file "#{civicrm_directory}/civicrm.settings.php" do
owner "wordpress"
group "wordpress"
- mode 0644
+ mode 0o644
content settings
end
source "cron.erb"
owner "root"
group "root"
- mode 0600
+ mode 0o600
variables :directory => civicrm_directory, :passwords => passwords
end
source "backup.cron.erb"
owner "root"
group "root"
- mode 0750
+ mode 0o750
variables :passwords => passwords
end
source "backup-db.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/cron.d/backup-db" do
source "backup.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/srv/www.openstreetmap.org" do
group "rails"
- mode 02775
+ mode 0o2775
end
rails_port "www.openstreetmap.org" do
source "cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
source "fpm-default.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :reload, "service[php5-fpm]"
end
source "phppgadmin.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
file "/etc/apache2/conf.d/phppgadmin" do
source "fpm.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :user => name, :port => port
notifies :reload, "service[php5-fpm]"
end
source "sudoers.user.erb"
owner "root"
group "root"
- mode 0440
+ mode 0o440
variables :user => name
end
end
source "cleanup-assets.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
node[:dev][:rails].each do |name, details|
source "rails.setup.rb.erb"
owner "apis"
group "apis"
- mode 0644
+ mode 0o644
variables :site => site_name
notifies :run, "execute[#{rails_directory}]"
end
directory "/srv/apis.dev.openstreetmap.org" do
owner "apis"
group "apis"
- mode 0755
+ mode 0o755
end
template "/srv/apis.dev.openstreetmap.org/index.html" do
source "apis.html.erb"
owner "apis"
group "apis"
- mode 0644
+ mode 0o644
end
apache_site "apis.dev.openstreetmap.org" do
source "udev.rules.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :run, "execute[udevadm-trigger]"
end
source "dhcpd.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :domain => domain
end
directory "/srv/dns.openstreetmap.org" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
remote_directory "/srv/dns.openstreetmap.org/html" do
source "html"
owner "root"
group "root"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "root"
- files_mode 0644
+ files_mode 0o644
end
zones = []
source "zone.html.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :zone => zone
end
source "index.html.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :zones => zones
end
source "dns-update.erb"
owner "root"
group "git"
- mode 0750
+ mode 0o750
variables :passwords => passwords
end
directory "/var/lib/dns" do
owner "git"
group "git"
- mode 02775
+ mode 0o2775
notifies :run, "execute[dns-update]"
end
source "post-receive"
owner "git"
group "git"
- mode 0750
+ mode 0o750
end
template "/usr/local/bin/dns-check" do
source "dns-check.erb"
owner "root"
group "git"
- mode 0750
+ mode 0o750
variables :passwords => passwords
end
source "cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
source "elasticsearch.yml.erb"
user "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[elasticsearch]"
end
source "ssl.cnf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
not_if do
File.exist?("/etc/ssl/certs/exim.pem") && File.exist?("/etc/ssl/private/exim.key")
end
source "exim4.conf.erb"
owner "root"
group "Debian-exim"
- mode 0644
+ mode 0o644
variables :relay_to_domains => relay_to_domains.sort,
:relay_from_hosts => relay_from_hosts.sort
notifies :restart, "service[exim4]"
source "aliases.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
remote_directory "/etc/exim4/noreply" do
source "noreply"
owner "root"
group "Debian-exim"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "Debian-exim"
- files_mode 0755
+ files_mode 0o755
purge true
end
source new_resource.source
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
else
template "/etc/fail2ban/filter.d/#{new_resource.name}.conf" do
source "filter.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :failregex => new_resource.failregex,
:ignoreregex => new_resource.ignoreregex
end
source "jail.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :name => new_resource.name,
:filter => new_resource.filter,
:logpath => new_resource.logpath,
directory "/etc/fail2ban/jail.d" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/fail2ban/jail.local" do
source "jail.local.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
subscribes :create, "template[/etc/fail2ban/jail.d/00-default.conf]"
notifies :reload, "service[fail2ban]"
end
source "jail.default.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :reload, "service[fail2ban]"
end
directory "/srv/forum.openstreetmap.org" do
owner "forum"
group "forum"
- mode 0755
+ mode 0o755
end
git "/srv/forum.openstreetmap.org/html/" do
directory "/srv/forum.openstreetmap.org/html/cache/" do
owner "www-data"
group "www-data"
- mode 0755
+ mode 0o755
end
directory "/srv/forum.openstreetmap.org/html/img/avatars/" do
owner "www-data"
group "www-data"
- mode 0755
+ mode 0o755
end
mysql_user "forum@localhost" do
source "backup.cron.erb"
owner "root"
group "root"
- mode 0750
+ mode 0o750
variables :passwords => passwords
end
cookbook_file "/srv/board.osmfoundation.org/Wiki.png" do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
end
cookbook_file "/srv/wiki.osmfoundation.org/Wiki.png" do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
end
source "config.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[gdnsd]"
end
source "geo.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[gdnsd]"
end
directory git_directory do
owner node[:git][:user]
group node[:git][:group]
- mode 02775
+ mode 0o2775
end
if node[:git][:allowed_nodes]
source "post-update.erb"
owner "root"
group node[:git][:group]
- mode 0755
+ mode 0o755
end
next unless node[:recipes].include?("trac") && repository != "dns.git"
source "post-receive.erb"
owner "root"
group node[:git][:group]
- mode 0755
+ mode 0o755
variables :repository => "#{git_directory}/#{repository}"
end
end
source "backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/xinetd.d/git" do
source "xinetd.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :reload, "service[xinetd]"
end
source "gitweb.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
apache_site node[:git][:host] do
source "robots.txt.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/srv/gps-tile.openstreetmap.org" do
owner "gpstile"
group "gpstile"
- mode 0755
+ mode 0o755
end
git "/srv/gps-tile.openstreetmap.org/import" do
source "update.init.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
service "gps-update" do
source "html"
owner "gpstile"
group "gpstile"
- mode 0755
+ mode 0o755
files_owner "gpstile"
files_group "gpstile"
- files_mode 0644
+ files_mode 0o644
end
apache_module "headers"
source "tty.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :unit => unit
end
source "grub.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :units => units, :entry => grub_entry
notifies :run, "execute[update-grub]"
end
source "initramfs-mdadm.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :run, "execute[update-initramfs]"
end
source "irqbalance.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
service "irqbalance" do
source "raid.default.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :devices => status_packages[status_package]
end
source "smartd-mailer.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/smartd.conf" do
source "smartd.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :disks => disks
notifies :reload, "service[smartmontools]"
end
source "smartmontools.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[smartmontools]"
end
file "/etc/mdadm/mdadm.conf" do
owner "root"
group "root"
- mode 0644
+ mode 0o644
content mdadm_conf
end
source "modules.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
if node[:lsb][:release].to_f <= 12.10
source "watchdog.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :module => node[:hardware][:watchdog]
end
source "sensors.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :run, "execute[/etc/sensors.d/chef.conf]"
end
end
directory "/srv/imagery/mapserver" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
recursive true
end
directory "/srv/imagery/common" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
recursive true
end
directory "/srv/imagery/common/ostn02-ntv2-data" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
remote_file "#{Chef::Config[:file_cache_path]}/ostn02-ntv2-data.zip" do
file "/srv/imagery/layers/#{site}/#{layer}.yml" do
owner "root"
group "root"
- mode 0644
+ mode 0o644
content YAML.dump(:name => layer,
:title => title || layer,
:url => "http://{s}.#{site}/layer/#{layer}/{z}/{x}/{y}.png",
source "mapserver.map.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.to_hash
end
directory "/srv/imagery/nginx/#{site}" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
recursive true
end
source "nginx_imagery_layer_fragment.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.to_hash
end
end
directory "/srv/#{name}" do
user "root"
group "root"
- mode 0755
+ mode 0o755
end
directory "/srv/imagery/layers/#{name}" do
user "root"
group "root"
- mode 0755
+ mode 0o755
recursive true
end
directory "/srv/imagery/overlays/#{name}" do
user "root"
group "root"
- mode 0755
+ mode 0o755
recursive true
end
source "index.html.erb"
user "root"
group "root"
- mode 0644
+ mode 0o644
variables :title => title
end
source "imagery.css"
user "root"
group "root"
- mode 0644
+ mode 0o644
end
cookbook_file "/srv/#{name}/clientaccesspolicy.xml" do
source "clientaccesspolicy.xml"
user "root"
group "root"
- mode 0644
+ mode 0o644
end
cookbook_file "/srv/#{name}/crossdomain.xml" do
source "crossdomain.xml"
user "root"
group "root"
- mode 0644
+ mode 0o644
end
layers = Dir.glob("/srv/imagery/layers/#{name}/*.yml").collect do |path|
source "imagery.js.erb"
user "root"
group "root"
- mode 0644
+ mode 0o644
variables :bbox => bbox, :layers => layers
end
file "/var/spool/incron/#{user}" do
owner user
group "incron"
- mode 0600
+ mode 0o600
content lines.join("\n")
end
end
directory "/opt/kibana-#{version}" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
execute "unzip-kibana-#{version}" do
directory "/etc/kibana" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
directory "/var/run/kibana" do
owner "kibana"
group "kibana"
- mode 0755
+ mode 0o755
end
directory "/var/log/kibana" do
owner "kibana"
group "kibana"
- mode 0755
+ mode 0o755
end
systemd_service "kibana@" do
))
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[kibana@#{name}]"
end
source "lumberjack.crt"
user "root"
group "logstash"
- mode 0644
+ mode 0o644
notifies :restart, "service[logstash]"
end
content keys["lumberjack"].join("\n")
user "root"
group "logstash"
- mode 0640
+ mode 0o640
notifies :restart, "service[logstash]"
end
source "logstash.conf.erb"
user "root"
group "root"
- mode 0644
+ mode 0o644
notifies :reload, "service[logstash]"
end
file "/etc/logrotate.d/logstash" do
- mode 0644
+ mode 0o644
end
service "logstash" do
source "expire.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
forwarders = search(:node, "recipes:logstash\\:\\:forwarder") # ~FC010
source "lumberjack.crt"
user "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[logstash-forwarder]"
end
content JSON.pretty_generate(node[:logstash][:forwarder])
user "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[logstash-forwarder]"
end
source "mm_cfg.py.erb"
user "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[mailman]"
end
source "backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
source new_resource.source
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0755
+ mode 0o755
files_owner node[:mediawiki][:user]
files_group node[:mediawiki][:group]
- files_mode 0755
+ files_mode 0o755
end
else
extension_repository = new_resource.repository || default_repository
source new_resource.template
user node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0664
+ mode 0o664
variables new_resource.variables
end
else
content "<?php wfLoadExtension( '#{new_resource.name}' );\n"
user node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0664
+ mode 0o664
only_if { ::File.exist?(extension_script) }
end
end
directory site_directory do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
directory mediawiki_directory do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
mediawiki_reference = "REL#{new_resource.version}".tr(".", "_")
directory "#{mediawiki_directory}/images" do
owner "www-data"
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
directory "#{mediawiki_directory}/cache" do
owner "www-data"
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
directory "#{mediawiki_directory}/LocalSettings.d" do
user node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0775
+ mode 0o775
end
template "#{mediawiki_directory}/LocalSettings.php" do
source "LocalSettings.php.erb"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0664
+ mode 0o664
variables :name => new_resource.name,
:directory => mediawiki_directory,
:database_params => new_resource.database_params,
source "mediawiki.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :name => new_resource.name, :directory => site_directory,
:user => node[:mediawiki][:user]
end
source "mediawiki-backup.cron.erb"
owner "root"
group "root"
- mode 0700
+ mode 0o700
variables :name => new_resource.name, :directory => site_directory,
:database_params => new_resource.database_params
end
cookbook "mediawiki"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
backup false
end
cookbook "mediawiki"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
backup false
end
cookbook "mediawiki"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
backup false
end
source "LocalSettings.php.erb"
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0664
+ mode 0o664
variables :name => new_resource.name,
:directory => mediawiki_directory,
:database_params => new_resource.database_params,
source new_resource.source
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0755
+ mode 0o755
files_owner node[:mediawiki][:user]
files_group node[:mediawiki][:group]
- files_mode 0755
+ files_mode 0o755
end
else
skin_repository = new_resource.repository || default_repository
source new_resource.template
user node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0664
+ mode 0o664
variables new_resource.variables
end
else
content "<?php require_once('#{skin_script}');\n"
user node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0664
+ mode 0o664
only_if { ::File.exist?(skin_script) }
end
end
source "parsoid-settings.js.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
service "parsoid" do
source "memcached.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[memcached]"
end
end
def target_path
- case
- when ::File.exist?(target)
+ if ::File.exist?(target)
target
- when ::File.exist?("/usr/local/share/munin/plugins/#{target}")
+ elsif ::File.exist?("/usr/local/share/munin/plugins/#{target}")
"/usr/local/share/munin/plugins/#{target}"
- when ::File.exist?("/usr/share/munin/plugins/#{target}")
+ elsif ::File.exist?("/usr/share/munin/plugins/#{target}")
"/usr/share/munin/plugins/#{target}"
end
end
source new_resource.template
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.variables.merge(:name => new_resource.name)
end
end
source "munin-node.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :servers => servers
notifies :restart, "service[munin-node]"
end
source "plugins"
owner "root"
group "root"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "root"
- files_mode 0755
+ files_mode 0o755
purge true
end
source "plugin-conf.d"
owner "root"
group "munin"
- mode 0750
+ mode 0o750
files_owner "root"
files_group "root"
- files_mode 0644
+ files_mode 0o644
purge false
notifies :restart, "service[munin-node]"
end
source "rrdcached.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/var/lib/munin/rrdcached" do
owner "munin"
group "munin"
- mode 0755
+ mode 0o755
end
service "rrdcached" do
source "munin.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :expiry_time => expiry_time, :clients => clients,
:frontends => frontends, :backends => backends,
:tilecaches => tilecaches, :renderers => renderers,
source "www"
owner "root"
group "root"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "root"
- files_mode 0644
+ files_mode 0o644
purge true
end
source "backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
munin_plugin "munin_stats"
source "my.cnf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :reload, "service[mysql]"
end
source "interfaces.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
execute "hostname" do
source "hostname.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :run, "execute[hostname]"
end
source "hosts.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
link "/etc/resolv.conf" do
source "resolv.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
node.interfaces(:role => :internal) do |interface|
source "shorewall-default.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall]"
end
source "shorewall.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall]"
end
source "shorewall-zones.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :type => "ipv4"
notifies :restart, "service[shorewall]"
end
source "shorewall-interfaces.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall]"
end
source "shorewall-hosts.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :zones => zones
notifies :restart, "service[shorewall]"
end
source "shorewall-policy.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall]"
end
source "shorewall-rules.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :rules => []
notifies :restart, "service[shorewall]"
end
source "logrotate.shorewall.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :name => "shorewall"
end
source "shorewall-masq.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall]"
end
else
source "shorewall-default.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall6]"
end
source "shorewall6.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall6]"
end
source "shorewall-zones.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :type => "ipv6"
notifies :restart, "service[shorewall6]"
end
source "shorewall6-interfaces.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall6]"
end
source "shorewall6-hosts.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :zones => zones
notifies :restart, "service[shorewall6]"
end
source "shorewall-policy.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[shorewall6]"
end
source "shorewall-rules.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :rules => []
notifies :restart, "service[shorewall6]"
end
source "logrotate.shorewall.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :name => "shorewall6"
end
directory mountpoint do
owner "root"
group "root"
- mode 0755
+ mode 0o755
recursive true
not_if { File.exist?(mountpoint) }
end
source "exports.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :exports => exports
notifies :run, "execute[exportfs]"
end
source new_resource.template
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.variables.merge(:name => new_resource.name, :directory => directory)
end
end
source "nginx.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/var/cache/nginx/fastcgi-cache" do
owner "www-data"
group "root"
- mode 0755
+ mode 0o755
only_if { node[:nginx][:cache][:fastcgi][:enable] }
end
directory "/var/cache/nginx/proxy-cache" do
owner "www-data"
group "root"
- mode 0755
+ mode 0o755
only_if { node[:nginx][:cache][:proxy][:enable] }
end
source "fpm.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables data.merge(:name => name, :port => data[:port])
notifies :reload, "service[php5-fpm]"
end
directory node[:nominatim][:logdir] do
owner "nominatim"
group "nominatim"
- mode 0755
+ mode 0o755
recursive true
end
action :create_if_missing
owner "www-data"
group "adm"
- mode 0664
+ mode 0o664
end
file "#{node[:nominatim][:logdir]}/update.log" do
action :create_if_missing
owner "nominatim"
group "adm"
- mode 0664
+ mode 0o664
end
directory "#{home_directory}/status" do
owner "nominatim"
group "postgres"
- mode 0775
+ mode 0o775
end
template "/etc/logrotate.d/nominatim" do
source "logrotate.nominatim.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
template "/etc/logrotate.d/apache2" do
source "logrotate.apache.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
package "osmosis"
source "update_source.erb"
owner "nominatim"
group "nominatim"
- mode 0755
+ mode 0o755
variables :source_directory => source_directory
end
source "nominatim.erb"
owner "nominatim"
group "nominatim"
- mode 0664
+ mode 0o664
variables :postgres_version => database_version
end
source "ipblocks.erb"
owner "nominatim"
group "nominatim"
- mode 0664
+ mode 0o664
end
file "#{source_directory}/settings/apache_blocks.conf" do
action :create_if_missing
owner "nominatim"
group "nominatim"
- mode 0664
+ mode 0o664
end
file "#{source_directory}/settings/ip_blocks.map" do
action :create_if_missing
owner "nominatim"
group "nominatim"
- mode 0664
+ mode 0o664
end
cron_action = if node[:nominatim][:enabled]
source "updater.erb"
user "nominatim"
group "nominatim"
- mode 0755
+ mode 0o755
end
template "/etc/init.d/nominatim-update" do
source "updater.init.erb"
user "nominatim"
group "nominatim"
- mode 0755
+ mode 0o755
variables :source_directory => source_directory
end
source "http://www.nominatim.org/data/#{fname}"
owner "nominatim"
group "nominatim"
- mode 0644
+ mode 0o644
end
end
source "#{fname}.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
end
directory File.dirname(node[:nominatim][:flatnode_file]) do
owner "nominatim"
group "nominatim"
- mode 0755
+ mode 0o755
recursive true
end
directory wal_archives do
owner "postgres"
group "postgres"
- mode 0700
+ mode 0o700
only_if { node[:postgresql][:settings][:defaults][:archive_mode] == "on" }
end
source "clean-db-nominatim.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :archive_dir => wal_archives,
:update_stop_file => "#{home_directory}/status/updates_disabled",
:streaming_clients => slaves
file "/etc/timezone" do
owner "root"
group "root"
- mode 0644
+ mode 0o644
content "#{node[:tz]}\n"
notifies :run, "execute[dpkg-reconfigure-tzdata]", :immediately
end
source "ntp.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[ntp]"
end
source new_resource.template
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :reload, "ohai[#{new_resource.name}]"
end
end
template "/etc/ssh/ssh_config" do
source "ssh_config.erb"
- mode 0644
+ mode 0o644
owner "root"
group "root"
end
template "/etc/ssh/ssh_known_hosts" do
source "ssh_known_hosts.erb"
- mode 0444
+ mode 0o444
owner "root"
group "root"
backup false
file "/etc/openvpn/#{name}.key" do
owner "root"
group "root"
- mode 0600
+ mode 0o600
content peer[:openvpn][:keys][name]
end
end
source "tunnel.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :name => name,
:address => node[:openvpn][:address],
:port => node[:openvpn][:tunnels][name][:port],
directory osmosis_directory do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
execute "/var/cache/chef/#{osmosis_package}" do
source "http://bretth.dev.openstreetmap.org/osmosis-build/#{osmosis_package}"
owner "root"
group "root"
- mode 0644
+ mode 0o644
backup false
notifies :run, "execute[/var/cache/chef/#{osmosis_package}]"
end
directory directory do
owner site_user
group site_group
- mode 0755
+ mode 0o755
end
execute "osqa-migrate" do
directory "#{directory}/upfiles" do
user site_user
group site_group
- mode 0755
+ mode 0o755
end
template "#{directory}/osqa/osqa.wsgi" do
source "osqa.wsgi.erb"
owner site_user
group site_group
- mode 0644
+ mode 0o644
variables :directory => directory
notifies :reload, "service[apache2]"
end
file "#{directory}/osqa/settings_local.py" do
owner site_user
group site_group
- mode 0644
+ mode 0o644
content settings
notifies :reload, "service[apache2]"
end
source "backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :name => backup_name, :directory => directory, :user => site_user, :database => database_name
end
end
file "/opt/otrs-#{version}/Kernel/Config.pm" do
owner user
group "www-data"
- mode 0664
+ mode 0o664
content config
end
file "/opt/otrs-#{version}/Kernel/Config/GenericAgent.pm" do
owner user
group "www-data"
- mode 0664
+ mode 0o664
content generic_agent
end
file name do
owner "otrs"
group "www-data"
- mode 0664
+ mode 0o664
content IO.read(distname)
notifies :run, "execute[/opt/otrs/bin/Cron.sh]"
end
source "sudoers.erb"
owner "root"
group "root"
- mode 0440
+ mode 0o440
end
template "/etc/cron.daily/otrs-backup" do
source "backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
directory "/srv/owl.openstreetmap.org" do
owner "owl"
group "owl"
- mode 02775
+ mode 0o2775
end
file "/srv/owl.openstreetmap.org/openstreetmap-watch-list/rails/tmp/restart.txt" do
source "database.yml.erb"
owner "owl"
group "owl"
- mode 0664
+ mode 0o664
notifies :run, "execute[/srv/owl.openstreetmap.org/openstreetmap-watch-list/rails/Gemfile]"
only_if { node[:postgresql][:clusters][:"9.1/main"] }
end
source "ruby.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
notifies :reload, "service[apache2]"
end
mode "0755"
files_owner "root"
files_group "root"
- files_mode 0644
+ files_mode 0o644
end
remote_directory "/store/planet" do
source "cgi"
owner "root"
group "root"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "root"
- files_mode 0755
+ files_mode 0o755
end
remote_directory node[:planet][:dump][:xml_history_directory] do
source "history_cgi"
owner "www-data"
group "planet"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "root"
- files_mode 0755
+ files_mode 0o755
end
[:xml_directory, :xml_history_directory,
directory node[:planet][:dump][dir] do
owner "www-data"
group "planet"
- mode 0775
+ mode 0o775
end
end
directory "/store/planet/notes" do
owner "www-data"
group "planet"
- mode 0775
+ mode 0o775
end
template "/usr/local/bin/apache-latest-planet-filename" do
source "apache-latest-planet-filename.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
apache_module "cgid"
source "logrotate.apache.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
munin_plugin "planet_age"
directory "/opt/planet-dump-ng" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
git "/opt/planet-dump-ng" do
directory "/store/planetdump" do
owner "www-data"
group "www-data"
- mode 0755
+ mode 0o755
end
["planetdump", "planet-mirror-redirect-update", "apache-latest-planet-filename"].each do |program|
source "#{program}.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
end
source "planet-dump-mirror-cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/opt/planet-notes-dump" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
git "/opt/planet-notes-dump" do
source "planet-notes-dump.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :password => db_passwords["planetdump"]
end
source "planet-notes-dump.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
source "replication-bin"
owner "root"
group "root"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "root"
- files_mode 0755
+ files_mode 0o755
end
template "/usr/local/bin/users-agreed" do
source "users-agreed.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
remote_directory "/store/planet/replication" do
source "replication-cgi"
owner "root"
group "root"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "root"
- files_mode 0755
+ files_mode 0o755
end
directory "/store/planet/replication/changesets" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
directory "/store/planet/replication/day" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
directory "/store/planet/replication/hour" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
directory "/store/planet/replication/minute" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
directory "/etc/replication" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/replication/auth.conf" do
source "replication.auth.erb"
user "root"
group "planet"
- mode 0640
+ mode 0o640
variables :password => db_passwords["planetdiff"]
end
source "changesets.conf.erb"
user "root"
group "planet"
- mode 0640
+ mode 0o640
variables :password => db_passwords["planetdiff"]
end
source "users-agreed.conf.erb"
user "planet"
group "planet"
- mode 0600
+ mode 0o600
variables :password => db_passwords["planetdiff"]
end
directory "/var/lib/replication" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
directory "/var/lib/replication/hour" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
template "/var/lib/replication/hour/configuration.txt" do
source "replication.config.erb"
owner "planet"
group "planet"
- mode 0644
+ mode 0o644
variables :base => "minute", :interval => 3600
end
directory "/var/lib/replication/day" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
template "/var/lib/replication/day/configuration.txt" do
source "replication.config.erb"
owner "planet"
group "planet"
- mode 0644
+ mode 0o644
variables :base => "hour", :interval => 86400
end
source "replication.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
else
file "/etc/cron.d/replication" do
directory "/var/lib/replication/streaming" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
directory "/var/log/replication" do
owner "planet"
group "planet"
- mode 0755
+ mode 0o755
end
["streaming-replicator", "streaming-server"].each do |name|
source "streaming.init.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :service => name
end
source "postgresql.conf.erb"
owner "postgres"
group "postgres"
- mode 0644
+ mode 0o644
variables :version => version, :defaults => defaults, :settings => settings
notifies :reload, "service[postgresql]"
end
source "pg_hba.conf.erb"
owner "postgres"
group "postgres"
- mode 0640
+ mode 0o640
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]"
source "pg_ident.conf.erb"
owner "postgres"
group "postgres"
- mode 0640
+ mode 0o640
variables :maps => settings[:user_name_maps] || defaults[:user_name_maps]
notifies :reload, "service[postgresql]"
end
source "recovery.conf.erb"
owner "postgres"
group "postgres"
- mode 0640
+ mode 0o640
variables :standby_mode => standby_mode,
:primary_conninfo => primary_conninfo,
:restore_command => restore_command,
source "rsync.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[rsync]"
end
source "rsyncd.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :hosts_allow => hosts_allow, :hosts_deny => hosts_deny
end
file "/srv/hardware.openstreetmap.org/_data/nodes.json" do
content nodes.to_json
- mode 0644
+ mode 0o644
owner "root"
group "root"
notifies :run, "execute[/srv/hardware.openstreetmap.org]"
file "/srv/hardware.openstreetmap.org/_data/roles.json" do
content roles.to_json
- mode 0644
+ mode 0o644
owner "root"
group "root"
notifies :run, "execute[/srv/hardware.openstreetmap.org]"
end
directory "/srv/hardware.openstreetmap.org/_site" do
- mode 0755
+ mode 0o755
owner "nobody"
group "nogroup"
end
source "snmpd.conf.erb"
owner "root"
group "root"
- mode 0600
+ mode 0o600
variables :communities => communities
notifies :restart, "service[snmpd]"
end
directory "/var/spool/spamassassin" do
owner "debian-spamd"
group "debian-spamd"
- mode 0755
+ mode 0o755
end
template "/etc/default/spamassassin" do
source "spamassassin.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[spamassassin]"
end
source "local.cf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :trusted_networks => trusted_networks.sort
notifies :restart, "service[spamassassin]"
end
source new_resource.template
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.variables
end
end
source "squid.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
template "/etc/default/squid" do
source "squid.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/etc/squid/squid.conf.d" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
if node[:lsb][:release].to_f >= 15.10
cookbook_file "/etc/ssl/certs/#{certificate}.pem" do
owner "root"
group "root"
- mode 0444
+ mode 0o444
backup false
end
end
cookbook_file "/etc/ssl/certs/#{certificate}.pem" do
owner "root"
group "root"
- mode 0444
+ mode 0o444
backup false
end
file "/etc/ssl/private/#{certificate}.key" do
owner "root"
group "ssl-cert"
- mode 0440
+ mode 0o440
content keys[certificate].join("\n")
backup false
end
directory "/srv/2007.stateofthemap.org" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
wordpress_site "2007.stateofthemap.org" do
directory "/srv/2008.stateofthemap.org" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
wordpress_site "2008.stateofthemap.org" do
directory "/srv/2009.stateofthemap.org" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
git "/srv/2009.stateofthemap.org" do
directory "/srv/2010.stateofthemap.org" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
git "/srv/2010.stateofthemap.org" do
directory "/srv/2011.stateofthemap.org" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
git "/srv/2011.stateofthemap.org" do
directory "/srv/2012.stateofthemap.org" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
git "/srv/2012.stateofthemap.org" do
directory "/srv/2016.stateofthemap.org" do
owner "wordpress"
group "wordpress"
- mode 0755
+ mode 0o755
end
wordpress_site "2016.stateofthemap.org" do
source "backup.cron.erb"
owner "root"
group "root"
- mode 0750
+ mode 0o750
variables :passwords => passwords
end
source "awstats.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :site => site
end
end
source "awstats.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :sites => node[:stats][:sites]
end
cookbook_file "/usr/local/bin/repack-archived-logs" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/cron.d/repack-archived-logs" do
source "repack.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/srv/stats.openstreetmap.org" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/srv/stats.openstreetmap.org/index.html" do
source "index.html.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :sites => node[:stats][:sites]
end
cookbook_file "/srv/stats.openstreetmap.org/robots.txt" do
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
apache_site "stats.openstreetmap.org" do
source "hooks"
owner "www-data"
group "www-data"
- mode 0755
+ mode 0o755
files_owner "www-data"
files_group "www-data"
- files_mode 0755
+ files_mode 0o755
purge false
end
source "backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
directory "/etc/supybot" do
owner "supybot"
group "supybot"
- mode 0755
+ mode 0o755
end
template "/etc/supybot/supybot.conf" do
source "supybot.conf.erb"
owner "supybot"
group "supybot"
- mode 0644
+ mode 0o644
variables :passwords => passwords
end
source "channels.conf.erb"
owner "supybot"
group "supybot"
- mode 0644
+ mode 0o644
end
template "/etc/supybot/git.conf" do
source "git.conf.erb"
owner "supybot"
group "supybot"
- mode 0644
+ mode 0o644
end
template "/etc/supybot/ignores.conf" do
source "ignores.conf.erb"
owner "supybot"
group "supybot"
- mode 0644
+ mode 0o644
end
template "/etc/supybot/userdata.conf" do
source "userdata.conf.erb"
owner "supybot"
group "supybot"
- mode 0644
+ mode 0o644
end
template "/etc/supybot/users.conf" do
source "users.conf.erb"
owner "supybot"
group "supybot"
- mode 0644
+ mode 0o644
variables :passwords => users
end
directory "/var/lib/supybot" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
directory "/var/lib/supybot/data" do
owner "supybot"
group "supybot"
- mode 0755
+ mode 0o755
end
directory "/var/lib/supybot/backup" do
owner "supybot"
group "supybot"
- mode 0755
+ mode 0o755
end
directory "/var/lib/supybot/git" do
owner "supybot"
group "supybot"
- mode 0755
+ mode 0o755
end
directory "/var/log/supybot" do
owner "supybot"
group "supybot"
- mode 0755
+ mode 0o755
end
directory "/usr/local/lib/supybot" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
directory "/usr/local/lib/supybot/plugins" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
git "/usr/local/lib/supybot/plugins/Git" do
source "supybot.init.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
service "supybot" do
source "backup.cron.erb"
owner "root"
group "root"
- mode 0750
+ mode 0o750
variables :passwords => passwords
end
directory "/etc/sysctl.d" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
execute "sysctl" do
source "chef.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :run, "execute[sysctl]"
end
source "sysfs.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[sysfsutils]"
end
source "service.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.to_hash
end
source "tmpfile.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables new_resource.to_hash
end
source "cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/var/log/taginfo" do
owner "taginfo"
group "taginfo"
- mode 0755
+ mode 0o755
end
file "/etc/logrotate.d/taginfo" do
source "sudoers.erb"
owner "root"
group "root"
- mode 0440
+ mode 0o440
end
node[:taginfo][:sites].each do |site|
directory "/var/log/taginfo/#{name}" do
owner "taginfo"
group "taginfo"
- mode 0755
+ mode 0o755
end
directory directory do
owner "taginfo"
group "taginfo"
- mode 0755
+ mode 0o755
end
git "#{directory}/libosmium" do
file "#{directory}/taginfo-config.json" do
owner "taginfo"
group "taginfo"
- mode 0644
+ mode 0o644
content settings
notifies :restart, "service[apache2]"
end
directory "#{directory}/#{dir}" do
owner "taginfo"
group "taginfo"
- mode 0755
+ mode 0o755
end
end
source "http://planet.openstreetmap.org/pbf/planet-latest.osm.pbf"
owner "taginfo"
group "taginfo"
- mode 0644
+ mode 0o644
end
template "#{directory}/planet/replication/configuration.txt" do
source "configuration.txt.erb"
owner "taginfo"
group "taginfo"
- mode 0644
+ mode 0o644
end
file "#{directory}/planet/replication/download.lock" do
owner "taginfo"
group "taginfo"
- mode 0644
+ mode 0o644
end
template "#{directory}/bin/update-planet" do
source "update-planet.erb"
owner "taginfo"
group "taginfo"
- mode 0755
+ mode 0o755
variables :directory => directory
end
source "update-taginfo.erb"
owner "taginfo"
group "taginfo"
- mode 0755
+ mode 0o755
variables :directory => directory
end
source "update.erb"
owner "taginfo"
group "taginfo"
- mode 0755
+ mode 0o755
variables :name => name, :directory => directory
end
file "/srv/thinkup.openstreetmap.org/webapp/config.inc.php" do
owner "root"
group "root"
- mode 0644
+ mode 0o644
content thinkup_config
notifies :reload, "service[apache2]"
end
file "/srv/thinkup.openstreetmap.org/extras/cron/config" do
owner "root"
group "thinkup"
- mode 0640
+ mode 0o640
content thinkup_cron
end
source "backup.cron.erb"
owner "root"
group "root"
- mode 0750
+ mode 0o750
variables :passwords => passwords
end
source "logrotate.apache.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
directory "/srv/tile.openstreetmap.org" do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
package "renderd"
directory "/srv/tile.openstreetmap.org/tiles" do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
template "/etc/renderd.conf" do
source "renderd.conf.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :reload, "service[apache2]"
notifies :restart, "service[renderd]"
end
source "html"
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
files_owner "tile"
files_group "tile"
- files_mode 0644
+ files_mode 0o644
end
template "/srv/tile.openstreetmap.org/html/index.html" do
source "index.html.erb"
owner "tile"
group "tile"
- mode 0644
+ mode 0o644
end
package "python-cairo"
directory "/srv/tile.openstreetmap.org/cgi-bin" do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
template "/srv/tile.openstreetmap.org/cgi-bin/export" do
source "export.erb"
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
variables :blocks => blocks
end
source "debug.erb"
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
template "/etc/cron.hourly/export" do
source "export.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
directory "/srv/tile.openstreetmap.org/data" do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
package "mapnik-utils"
directory directory do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
if file =~ /\.tgz$/
source url
owner "tile"
group "tile"
- mode 0644
+ mode 0o644
backup false
notifies :run, "execute[#{file}]", :immediately
notifies :restart, "service[renderd]"
directory "/srv/tile.openstreetmap.org/styles" do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
node[:tile][:styles].each do |name, details|
source "update-lowzoom.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :style => name
end
source "update-lowzoom.init.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :style => name
end
directory tile_directory do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
details[:tile_directories].each do |directory|
directory directory[:name] do
owner "www-data"
group "www-data"
- mode 0755
+ mode 0o755
end
directory[:min_zoom].upto(directory[:max_zoom]) do |zoom|
directory "#{directory[:name]}/#{zoom}" do
owner "www-data"
group "www-data"
- mode 0755
+ mode 0o755
end
link "#{tile_directory}/#{zoom}" do
action :create_if_missing
owner "tile"
group "tile"
- mode 0444
+ mode 0o444
end
git style_directory do
file node[:tile][:node_file] do
owner "tile"
group "www-data"
- mode 0640
+ mode 0o640
end
directory "/var/log/tile" do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
package "osm2pgsql"
source "ruby"
owner "root"
group "root"
- mode 0755
+ mode 0o755
files_owner "root"
files_group "root"
- files_mode 0644
+ files_mode 0o644
end
template "/usr/local/bin/expire-tiles" do
source "expire-tiles.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/sudoers.d/tile" do
source "sudoers.erb"
owner "root"
group "root"
- mode 0440
+ mode 0o440
end
directory "/var/lib/replicate" do
owner "tile"
group "tile"
- mode 0755
+ mode 0o755
end
template "/var/lib/replicate/configuration.txt" do
source "replicate.configuration.erb"
owner "tile"
group "tile"
- mode 0644
+ mode 0o644
end
template "/usr/local/bin/replicate" do
source "replicate.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/init.d/replicate" do
source "replicate.init.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
service "replicate" do
source "replicate.logrotate.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
template "/usr/local/bin/render-lowzoom" do
source "render-lowzoom.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/cron.d/render-lowzoom" do
source "render-lowzoom.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
template "/etc/rsyslog.d/20-renderd.conf" do
source "renderd.rsyslog.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
notifies :restart, "service[rsyslog]"
end
source "renderd.logrotate.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
package "liblockfile-simple-perl"
source "cleanup-tiles.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
tile_directories = node[:tile][:styles].collect do |_, style|
source "cleanup-tiles.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
variables :directories => tile_directories
end
source "logrotate.squid.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
nginx_site "default" do
source "logrotate.nginx.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
tilerenders.each do |render|
source "tilelog.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :analyze_bin => "#{tilelog_source_directory}/openstreetmap-tile-analyze",
:input_dir => tilelog_input_directory,
:output_dir => tilelog_output_directory
source "tilelog.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
# resources related to the output of the analysis and where it
action :create
user "www-data"
group "www-data"
- mode 0755
+ mode 0o755
end
source "trac.ini.erb"
owner "trac"
group "www-data"
- mode 0644
+ mode 0o644
variables :name => site_name
end
source "htdocs"
owner "trac"
group "trac"
- mode 0755
+ mode 0o755
files_owner "trac"
files_group "trac"
- files_mode 0644
+ files_mode 0o644
purge true
end
source "templates"
owner "trac"
group "trac"
- mode 0755
+ mode 0o755
files_owner "trac"
files_group "trac"
- files_mode 0644
+ files_mode 0o644
purge true
end
cookbook_file "/usr/local/bin/trac-authenticate" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
apache_module "wsgi"
source "sudoers.erb"
owner "root"
group "root"
- mode 0440
+ mode 0o440
end
template "/etc/cron.daily/trac-backup" do
source "backup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
directory rails_directory do
owner rails_user
group rails_group
- mode 02775
+ mode 0o2775
end
git rails_directory do
source "database.yml.erb"
owner rails_user
group rails_group
- mode 0664
+ mode 0o664
variables database_params
notifies :run, "execute[#{rails_directory}]"
end
file "#{rails_directory}/config/application.yml" do
owner rails_user
group rails_group
- mode 0664
+ mode 0o664
content application_yml
notifies :run, "execute[#{rails_directory}/public/assets]"
end
file "#{rails_directory}/config/piwik.yml" do
owner rails_user
group rails_group
- mode 0664
+ mode 0o664
content YAML.dump(params[:piwik_configuration])
notifies :run, "execute[#{rails_directory}/public/assets]"
end
source "rails.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :directory => rails_directory
end
end
directory node[:web][:base_directory] do
group "rails"
- mode 02775
+ mode 0o2775
end
directory node[:web][:pid_directory] do
owner "rails"
group "rails"
- mode 0775
+ mode 0o775
end
directory node[:web][:log_directory] do
owner "rails"
group "rails"
- mode 0775
+ mode 0o775
end
template "/etc/logrotate.d/web" do
source "logrotate.web.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
file "/etc/init.d/cgimap" do
owner "root"
group "root"
- mode 0755
+ mode 0o755
content cgimap_init
end
source "cleanup.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :ruby => ruby, :directory => rails_directory
end
source "logrotate.apache.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
source "init.gpx.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :gpx_directory => gpx_directory,
:pid_directory => pid_directory,
:log_directory => log_directory,
source "passenger.cron.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
rails_directory = "#{node[:web][:base_directory]}/rails"
source "cleanup-assets.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
gem_package "apachelogregex"
source "api-statistics.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
template "/etc/init.d/api-statistics" do
source "api-statistics.init.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
end
service "api-statistics" do
source "statistics.erb"
owner "root"
group "root"
- mode 0755
+ mode 0o755
variables :ruby => ruby, :directory => rails_directory
end
source "statistics.cron.erb"
owner "root"
group "root"
- mode 0644
+ mode 0o644
end
cookbook_file "/srv/wiki.openstreetmap.org/osm_logo_wiki.png" do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
end
template "/srv/wiki.openstreetmap.org/robots.txt" do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
source "robots.txt.erb"
end
cookbook_file "/srv/wiki.openstreetmap.org/favicon.ico" do
owner node[:mediawiki][:user]
group node[:mediawiki][:group]
- mode 0644
+ mode 0o644
end
directory "/srv/dump.wiki.openstreetmap.org" do
template "/etc/cron.d/wiki-osm-org-dump" do
owner "root"
group "root"
- mode 0644
+ mode 0o644
source "cron_wiki_dump.erb"
end
source new_resource.source
owner node[:wordpress][:user]
group node[:wordpress][:group]
- mode 0755
+ mode 0o755
files_owner node[:wordpress][:user]
files_group node[:wordpress][:group]
- files_mode 0755
+ files_mode 0o755
end
else
plugin_repository = new_resource.repository || default_repository
directory site_directory do
owner node[:wordpress][:user]
group node[:wordpress][:group]
- mode 0755
+ mode 0o755
end
subversion site_directory do
file "#{site_directory}/wp-config.php" do
owner node[:wordpress][:user]
group node[:wordpress][:group]
- mode 0644
+ mode 0o644
content wp_config
end
directory "#{site_directory}/wp-content/uploads" do
owner "www-data"
group "www-data"
- mode 0755
+ mode 0o755
end
file "#{site_directory}/sitemap.xml" do
cookbook "wordpress"
owner node[:wordpress][:user]
group node[:wordpress][:group]
- mode 0644
+ mode 0o644
backup false
end
source new_resource.source
owner node[:wordpress][:user]
group node[:wordpress][:group]
- mode 0755
+ mode 0o755
files_owner node[:wordpress][:user]
files_group node[:wordpress][:group]
- files_mode 0644
+ files_mode 0o644
end
else
theme_repository = new_resource.repository || default_repository