Style/SelfAssignment:
Enabled: false
-# Offense count: 27
-# Cop supports --auto-correct.
-Style/SingleSpaceBeforeFirstArg:
- Enabled: false
-
-# Offense count: 410
-# Cop supports --auto-correct.
-Style/SpaceInsideBrackets:
- Enabled: false
-
-# Offense count: 6
-# Cop supports --auto-correct.
-Style/SpecialGlobalVars:
- Enabled: false
-
# Offense count: 6548
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
%w(event itk prefork worker).each do |mpm|
if mpm == node[:apache][:mpm]
apache_module "mpm_#{mpm}" do
- action [ :enable ]
+ action [:enable]
end
else
apache_module "mpm_#{mpm}" do
- action [ :disable ]
+ action [:disable]
end
end
end
end
service "apache2" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
end
apache_module "reqtimeout" do
- action [ :disable ]
+ action [:disable]
end
munin_plugin "apache_accesses"
certificate = node[:apache][:ssl][:certificate]
-node.default[:ssl][:certificates] = node[:ssl][:certificates] | [ certificate ]
+node.default[:ssl][:certificates] = node[:ssl][:certificates] | [certificate]
include_recipe "apache"
include_recipe "ssl"
package "bind9"
service "bind9" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
# Add the opscode APT source for chef
-default[:apt][:sources] = node[:apt][:sources] | [ "opscode" ]
+default[:apt][:sources] = node[:apt][:sources] | ["opscode"]
# Set the default server version
default[:chef][:server][:version] = "11.1.3-1"
# limitations under the License.
#
-define :ohai_plugin, :action => [ :create, :delete ] do
+define :ohai_plugin, :action => [:create, :delete] do
plugin_name = params[:name]
plugin_action = params[:action]
chef_server_url 'https://chef.openstreetmap.org'
cache_type 'BasicFile'
cache_options :path => '.chef/checksums'
-cookbook_path [ 'cookbooks' ]
+cookbook_path ['cookbooks']
cookbook_copyright 'OpenStreetMap Administrators'
cookbook_email 'admins@openstreetmap.org'
cookbook_license 'apachev2'
service "chef-client" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
subscribes :restart, "dpkg_package[chef]"
subscribes :restart, "template[/etc/init/chef-client.conf]"
service "chef-server-runsvdir" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
# limitations under the License.
#
-node.default[:ssl][:certificates] = node[:ssl][:certificates] | [ "crm.osmfoundation" ]
+node.default[:ssl][:certificates] = node[:ssl][:certificates] | ["crm.osmfoundation"]
include_recipe "wordpress"
include_recipe "mysql"
package "clamav-freshclam"
service "clamav-daemon" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true
end
service "clamav-freshclam" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true
end
service "php5-fpm" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
end
else
apache_site site_name do
- action [ :delete ]
+ action [:delete]
end
directory rails_directory do
end
service "isc-dhcp-server" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true
subscribes :restart, "template[/etc/dhcp/dhcpd.conf]"
end
-default[:apt][:sources] |= [ "elasticsearch" ]
+default[:apt][:sources] |= ["elasticsearch"]
end
service "elasticsearch" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true
end
-default[:exim][:local_domains] = [ "localhost", "@" ]
-default[:exim][:relay_to_domains] = [ ]
-default[:exim][:relay_from_hosts] = [ "127.0.0.1", "::1" ]
-default[:exim][:daemon_smtp_ports] = [ 25 ]
-default[:exim][:trusted_users] = [ ]
+default[:exim][:local_domains] = ["localhost", "@"]
+default[:exim][:relay_to_domains] = []
+default[:exim][:relay_from_hosts] = ["127.0.0.1", "::1"]
+default[:exim][:daemon_smtp_ports] = [25]
+default[:exim][:trusted_users] = []
default[:exim][:smarthost_name] = nil
default[:exim][:smarthost_via] = "mail.openstreetmap.org:26"
default[:exim][:routes] = {}
default[:exim][:aliases][:root] = "tomh"
-default[:exim][:rewrites] = [ ]
+default[:exim][:rewrites] = []
attribute "exim/local_domains",
:display_name => "Domains to Handle Locally",
:description => "List of domains we are prepared to accept mail for",
- :default => [ "@" ]
+ :default => ["@"]
attribute "exim/relay_to_domains",
:display_name => "Domains to Relay To",
:description => "List of domains we are prepared to relay to",
- :default => [ ]
+ :default => []
attribute "exim/relay_from_hosts",
:display_name => "Hosts to Relay From",
:description => "List of hosts we are prepared to relay from",
- :default => [ "127.0.0.1", "::1" ]
+ :default => ["127.0.0.1", "::1"]
attribute "exim/daemon_smtp_ports",
:display_name => "Ports to Listen On",
:description => "List of ports we will listen on",
- :default => [ 25 ]
+ :default => [25]
attribute "exim/trusted_users",
:display_name => "Trusted Users",
:description => "List of users we will trust",
- :default => [ ]
+ :default => []
attribute "exim/smarthost_name",
:display_name => "Smarthost Name",
end
service "exim4" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
subscribes :restart, "execute[/etc/ssl/certs/exim.pem]"
end
end
service "fail2ban" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :reload => true, :restart => true
subscribes :reload, "template[/etc/fail2ban/jail.local]"
end
apache_module "php5"
apache_site "default" do
- action [ :disable ]
+ action [:disable]
end
apache_site "forum.openstreetmap.org" do
passwords = data_bag_item("foundation", "passwords")
-mediawiki_site "board.osmfoundation.org" do
+mediawiki_site "board.osmfoundation.org" do
directory "/srv/board.osmfoundation.org"
database_name "board-wiki"
database_username "board-wikiuser"
passwords = data_bag_item("foundation", "passwords")
-mediawiki_site "wiki.osmfoundation.org" do
+mediawiki_site "wiki.osmfoundation.org" do
aliases "www.osmfoundation.org", "osmfoundation.org"
directory "/srv/wiki.osmfoundation.org"
database_name "osmf-wiki"
package "gdnsd"
service "gdnsd" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
end
service "gps-update" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true, :status => true
subscribes :restart, "git[/srv/gps-tile.openstreetmap.org/updater]"
end
if node[:dmi] && node[:dmi][:system]
case dmi.system.manufacturer
when "HP"
- default[:apt][:sources] |= [ "management-component-pack" ]
+ default[:apt][:sources] |= ["management-component-pack"]
case dmi.system.product_name
when "ProLiant DL360 G6", "ProLiant DL360 G7"
end
if Chef::Util.compare_versions(node[:kernel][:release], [3, 3]) < 0
- default[:hardware][:modules] |= [ "microcode" ]
+ default[:hardware][:modules] |= ["microcode"]
if node[:cpu]["0"][:vendor_id] == "GenuineIntel"
- default[:hardware][:modules] |= [ "coretemp" ]
+ default[:hardware][:modules] |= ["coretemp"]
end
end
raidmods = node[:kernel][:modules].keys & %w(cciss hpsa mptsas mpt2sas megaraid_mm megaraid_sas aacraid)
unless raidmods.empty?
- default[:apt][:sources] |= [ "hwraid" ]
+ default[:apt][:sources] |= ["hwraid"]
end
end
if node[:kernel][:modules].include?("ipmi_si")
- default[:hardware][:modules] |= [ "ipmi_devintf" ]
+ default[:hardware][:modules] |= ["ipmi_devintf"]
end
if File.exist?("/proc/xen")
service "ttyS#{unit}" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => false
subscribes :restart, "template[/etc/init/ttyS#{unit}.conf]"
end
end
service "irqbalance" do
- action [ :start, :enable ]
+ action [:start, :enable]
supports :status => false, :restart => true, :reload => false
subscribes :restart, "template[/etc/default/irqbalance]"
end
node[:block_device].each do |name, attributes|
if attributes[:vendor] == "HP" && attributes[:model] == "LOGICAL VOLUME"
if name =~ /^cciss!(c[0-9]+)d[0-9]+$/
- status_packages["cciss-vol-status"] |= [ "cciss/#{Regexp.last_match[1]}d0" ]
+ status_packages["cciss-vol-status"] |= ["cciss/#{Regexp.last_match[1]}d0"]
else
Dir.glob("/sys/block/#{name}/device/scsi_generic/*").each do |sg|
- status_packages["cciss-vol-status"] |= [ File.basename(sg) ]
+ status_packages["cciss-vol-status"] |= [File.basename(sg)]
end
end
end
end
service "#{status_package}d" do
- action [ :start, :enable ]
+ action [:start, :enable]
supports :status => false, :restart => true, :reload => false
subscribes :restart, "template[/etc/default/#{status_package}d]"
end
end
service "watchdog" do
- action [ :enable, :start ]
+ action [:enable, :start]
end
end
package "incron"
service "incron" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :reload => true, :restart => true
end
package "mailman"
service "mailman" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true, :reload => true
end
# limitations under the License.
#
-define :mediawiki_extension, :action => [ :enable ], :variables => {} do
+define :mediawiki_extension, :action => [:enable], :variables => {} do
name = params[:name]
site = params[:site]
mediawiki_directory = node[:mediawiki][:sites][site][:directory]
# limitations under the License.
#
-define :mediawiki_site, :action => [ :create, :enable ] do
+define :mediawiki_site, :action => [:create, :enable] do
name = params[:name]
# /etc/cron.d names cannot contain a dot
package "memcached"
service "memcached" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true
end
end
end
-server = $0.match("api_calls_(.*)")[1]
+server = $PROGRAM_NAME.match("api_calls_(.*)")[1]
if ARGV[0] == 'config'
puts "graph_title Active requests"
end
end
-server = $0.match("api_waits_(.*)")[1]
+server = $PROGRAM_NAME.match("api_waits_(.*)")[1]
if ARGV[0] == 'config'
puts "graph_title Wait times for active requests"
def output_values
status = `/usr/sbin/passenger-memory-stats | tail -1`
- unless $?.success?
+ unless $CHILD_STATUS.success?
$stderr.puts "failed executing passenger-memory-stats"
exit 1
end
def output_values
status = `/usr/sbin/passenger-status`
- unless $?.success?
+ unless $CHILD_STATUS.success?
$stderr.puts "failed executing passenger-status"
exit 1
end
def output_values
status = `/usr/sbin/passenger-status`
- unless $?.success?
+ unless $CHILD_STATUS.success?
$stderr.puts "failed executing passenger-status"
exit 1
end
def output_values
status = `/usr/sbin/passenger-status`
- unless $?.success?
+ unless $CHILD_STATUS.success?
$stderr.puts "failed executing passenger-status"
exit 1
end
if node[:lsb][:release].to_f >= 14.04
provider Chef::Provider::Service::Upstart
end
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
end
disks = node[:block_device].select do |_, attributes|
- [ "ATA", "FUJITSU", "SEAGATE", "DELL", "COMPAQ", "IBM-ESXS" ].include?(attributes[:vendor])
+ ["ATA", "FUJITSU", "SEAGATE", "DELL", "COMPAQ", "IBM-ESXS"].include?(attributes[:vendor])
end
if disks.empty?
end
service "rrdcached" do
- action [ :enable, :start ]
+ action [:enable, :start]
subscribes :restart, "template[/etc/default/rrdcached]"
end
package "mysql-client"
service "mysql" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
default[:networking][:interfaces] = {}
-default[:networking][:nameservers] = [ ]
-default[:networking][:search] = [ ]
+default[:networking][:nameservers] = []
+default[:networking][:search] = []
package "shorewall"
service "shorewall" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true
status_command "shorewall status"
end
package "shorewall6"
service "shorewall6" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true
status_command "shorewall6 status"
end
end
mount mountpoint do
- action [ :mount, :enable ]
+ action [:mount, :enable]
device "#{details[:host]}:#{details[:path]}"
fstype "nfs"
options mount_options
service "rpcbind" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
# limitations under the License.
#
-define :nginx_site, :action => [ :create ], :variables => {} do
+define :nginx_site, :action => [:create], :variables => {} do
name = params[:name]
directory = params[:directory] || "/var/www/#{name}"
site_action = params[:action]
end
service "nginx" do
- action [ :enable ]
+ action [:enable]
supports :status => true, :restart => true, :reload => true
subscribes :restart, "template[/etc/nginx/nginx.conf]"
end
service "php5-fpm" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
end
apache_site "default" do
- action [ :disable ]
+ action [:disable]
end
node[:nominatim][:fpm_pools].each do |name, data|
template "#{source_directory}/.git/hooks/post-merge" do
source "update_source.erb"
- owner "nominatim"
- group "nominatim"
- mode 0755
+ owner "nominatim"
+ group "nominatim"
+ mode 0755
variables :source_directory => source_directory
end
template "#{source_directory}/utils/nominatim-update" do
source "updater.erb"
- user "nominatim"
- group "nominatim"
- mode 0755
+ user "nominatim"
+ group "nominatim"
+ mode 0755
end
template "/etc/init.d/nominatim-update" do
source "updater.init.erb"
- user "nominatim"
- group "nominatim"
- mode 0755
+ user "nominatim"
+ group "nominatim"
+ mode 0755
variables :source_directory => source_directory
end
remote_file "#{source_directory}/data/wikipedia_article.sql.bin" do
action :create_if_missing
source "http://www.nominatim.org/data/wikipedia_article.sql.bin"
- owner "nominatim"
- group "nominatim"
- mode 0644
+ owner "nominatim"
+ group "nominatim"
+ mode 0644
end
remote_file "#{source_directory}/data/wikipedia_redirect.sql.bin" do
action :create_if_missing
source "http://www.nominatim.org/data/wikipedia_redirect.sql.bin"
- owner "nominatim"
- group "nominatim"
- mode 0644
+ owner "nominatim"
+ group "nominatim"
+ mode 0644
end
remote_file "#{source_directory}/data/gb_postcode_data.sql.gz" do
action :create_if_missing
source "http://www.nominatim.org/data/gb_postcode_data.sql.gz"
- owner "nominatim"
- group "nominatim"
- mode 0644
+ owner "nominatim"
+ group "nominatim"
+ mode 0644
end
template "/usr/local/bin/backup-nominatim" do
end
service "ntp" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true
end
if node[:lsb][:release].to_f >= 14.04
provider Chef::Provider::Service::Upstart
end
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
hosts = search(:node, "networking:interfaces").sort_by { |n| n[:hostname] }.collect do |node|
- names = [ node[:hostname] ]
+ names = [node[:hostname]]
node.interfaces(:role => :external).each do |interface|
- names |= [ "#{node[:hostname]}.openstreetmap.org" ]
- names |= [ "#{node[:hostname]}.#{interface[:zone]}.openstreetmap.org" ]
+ names |= ["#{node[:hostname]}.openstreetmap.org"]
+ names |= ["#{node[:hostname]}.#{interface[:zone]}.openstreetmap.org"]
end
unless node.interfaces(:role => :internal).empty?
- names |= [ "#{node[:hostname]}.#{node[:networking][:roles][:external][:zone]}.openstreetmap.org" ]
+ names |= ["#{node[:hostname]}.#{node[:networking][:roles][:external][:zone]}.openstreetmap.org"]
end
keys = {
package "openvpn"
service "openvpn" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
ignore_failure true
end
apache_site "owl.openstreetmap.org" do
template "apache.erb"
- variables :aliases => [ "owl.osm.org" ]
+ variables :aliases => ["owl.osm.org"]
end
-default[:apt][:sources] = node[:apt][:sources] | [ "brightbox-ruby-ng", "passenger" ]
+default[:apt][:sources] = node[:apt][:sources] | ["brightbox-ruby-ng", "passenger"]
default[:passenger][:ruby_version] = "1.9.1"
default[:passenger][:max_pool_size] = 6
mode 0755
end
-[ "streaming-replicator", "streaming-server" ].each do |name|
+["streaming-replicator", "streaming-server"].each do |name|
template "/etc/init.d/#{name}" do
source "streaming.init.erb"
owner "root"
end
service name do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true, :status => true
subscribes :restart, "template[/etc/init.d/#{name}]"
end
package "postgresql-common"
service "postgresql" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
-default[:rsyncd][:modules] = [ ]
+default[:rsyncd][:modules] = []
package "rsync"
service "rsync" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true
end
-default[:rsyncd][:modules] = [ ]
+default[:rsyncd][:modules] = []
package "snmpd"
service "snmpd" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true
end
package "spamassassin"
service "spamassassin" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
end
end
-trusted_networks = trusted_networks - [ "127.0.0.1", "::1" ]
+trusted_networks = trusted_networks - ["127.0.0.1", "::1"]
template "/etc/spamassassin/local.cf" do
source "local.cf.erb"
# limitations under the License.
#
-define :squid_fragment, :action => [ :create ], :variables => {} do
+define :squid_fragment, :action => [:create], :variables => {} do
name = params[:name]
site_action = params[:action]
service "squid" do
provider Chef::Provider::Service::Upstart
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
subscribes :reload, "template[/etc/squid/squid.conf]"
subscribes :restart, "template[/etc/default/squid]"
backup false
end
-[ "openstreetmap", "tile.openstreetmap", "crm.osmfoundation" ].each do |certificate|
+["openstreetmap", "tile.openstreetmap", "crm.osmfoundation"].each do |certificate|
if node[:ssl][:certificates].include?(certificate)
cookbook_file "/etc/ssl/certs/#{certificate}.pem" do
owner "root"
end
service "supybot" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true
subscribes :restart, "template[/etc/supybot/supybot.conf]"
subscribes :restart, "template[/etc/supybot/channels.conf]"
tilecaches = search(:node, "roles:tilecache").sort_by { |n| n[:hostname] }
apache_site "default" do
- action [ :disable ]
+ action [:disable]
end
apache_site "tile.openstreetmap.org" do
package "renderd"
service "renderd" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => false, :restart => true, :reload => false
end
end
service "replicate" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true
subscribes :restart, "template[/usr/local/bin/replicate]"
subscribes :restart, "template[/etc/init.d/replicate]"
require "ipaddr"
certificate = node[:tilecache][:ssl][:certificate]
-node.default[:ssl][:certificates] = node[:ssl][:certificates] | [ certificate ]
+node.default[:ssl][:certificates] = node[:ssl][:certificates] | [certificate]
include_recipe "ssl"
include_recipe "squid"
end
nginx_site "default" do
- action [ :delete ]
+ action [:delete]
end
resolvers = node[:networking][:nameservers].map do |resolver|
package "rsyslog"
service "rsyslog" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
require "yaml"
-define :rails_port, :action => [ :create, :enable ] do
+define :rails_port, :action => [:create, :enable] do
name = params[:name]
ruby_version = params[:ruby] || "1.9.1"
rails_directory = params[:directory] || "/srv/#{name}"
apache_module "proxy_fcgi"
apache_site "default" do
- action [ :disable ]
+ action [:disable]
end
apache_site "www.openstreetmap.org" do
end
else
service "cgimap" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true, :reload => true
subscribes :restart, "execute[cgimap-build]"
subscribes :restart, "file[/etc/init.d/cgimap]"
apache_module "rewrite"
apache_site "default" do
- action [ :disable ]
+ action [:disable]
end
apache_site "www.openstreetmap.org" do
end
else
service "gpx-import" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :restart => true, :reload => true
subscribes :restart, "execute[gpx-import-build]"
subscribes :restart, "template[/etc/init.d/gpx-import]"
passwords = data_bag_item("wiki", "passwords")
apache_site "default" do
- action [ :disable ]
+ action [:disable]
end
-mediawiki_site "wiki.openstreetmap.org" do
- aliases "wiki.osm.org", "wiki.openstreetmap.com", "wiki.openstreetmap.net", "wiki.openstreetmap.ca", "wiki.openstreetmap.eu", "wiki.openstreetmap.pro", "wiki.openstreetmaps.org"
- directory "/srv/wiki.openstreetmap.org"
+mediawiki_site "wiki.openstreetmap.org" do
+ aliases "wiki.osm.org", "wiki.openstreetmap.com", "wiki.openstreetmap.net", "wiki.openstreetmap.ca", "wiki.openstreetmap.eu", "wiki.openstreetmap.pro", "wiki.openstreetmaps.org"
+ directory "/srv/wiki.openstreetmap.org"
- enable_ssl TRUE
+ enable_ssl TRUE
database_name "wiki"
database_username "wiki-user"
admin_password passwords["admin"]
- logo "/osm_logo_wiki.png"
+ logo "/osm_logo_wiki.png"
email_contact "webmaster@openstreetmap.org"
- email_sender "wiki@openstreetmap.org"
+ email_sender "wiki@openstreetmap.org"
email_sender_name "OpenStreetMap Wiki"
metanamespace "OpenStreetMap"
end
apache_site "dump.wiki.openstreetmap.org" do
- template "apache_wiki_dump.erb"
+ template "apache_wiki_dump.erb"
directory "/srv/dump.wiki.openstreetmap.org"
variables :aliases => "dump.wiki.osm.org"
end
# limitations under the License.
#
-define :wordpress_plugin, :action => [ :enable ] do
+define :wordpress_plugin, :action => [:enable] do
name = params[:name]
site = params[:site]
site_directory = node[:wordpress][:sites][site][:directory]
# limitations under the License.
#
-define :wordpress_site, :action => [ :create, :enable ] do
+define :wordpress_site, :action => [:create, :enable] do
name = params[:name]
ssl_enabled = params[:ssl_enabled] || false
ssl_certificate = params[:ssl_certificate]
# limitations under the License.
#
-define :wordpress_theme, :action => [ :enable ] do
+define :wordpress_theme, :action => [:enable] do
name = params[:name]
site = params[:site]
site_directory = node[:wordpress][:sites][site][:directory]
package "xinetd"
service "xinetd" do
- action [ :enable, :start ]
+ action [:enable, :start]
supports :status => true, :reload => true, :restart => true
end
}
},
:apt => {
- :sources => [ "openstreetmap" ]
+ :sources => ["openstreetmap"]
},
:networking => {
:roles => {
:internal => { :metric => 200, :zone => "loc" },
:external => { :metric => 100 }
},
- :search => [ "openstreetmap.org" ]
+ :search => ["openstreetmap.org"]
},
:sysctl => {
:panic => {
override_attributes(
:ntp => {
- :servers => [ "0.nl.pool.ntp.org", "1.nl.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.nl.pool.ntp.org", "1.nl.pool.ntp.org", "europe.pool.ntp.org"]
}
)
override_attributes(
:ntp => {
- :servers => [ "0.no.pool.ntp.org", "1.no.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.no.pool.ntp.org", "1.no.pool.ntp.org", "europe.pool.ntp.org"]
}
)
}
},
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["8.8.8.8", "8.8.4.4"],
:roles => {
:external => {
:zone => "bx"
default_attributes(
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["8.8.8.8", "8.8.4.4"],
:roles => {
:external => {
:zone => "bh"
override_attributes(
:ntp => {
- :servers => [ "ntp.bluehost.com" ]
+ :servers => ["ntp.bluehost.com"]
}
)
default_attributes(
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844" ],
+ :nameservers => ["8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844"],
:roles => {
:external => {
:zone => "bm"
override_attributes(
:ntp => {
- :servers => [ "0.uk.pool.ntp.org", "1.uk.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.uk.pool.ntp.org", "1.uk.pool.ntp.org", "europe.pool.ntp.org"]
}
)
}
},
:munin => {
- :allow => [ "193.198.233.210" ]
+ :allow => ["193.198.233.210"]
},
:networking => {
:nameservers => [
override_attributes(
:ntp => {
- :servers => [ "0.hr.pool.ntp.org", "1.hr.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.hr.pool.ntp.org", "1.hr.pool.ntp.org", "europe.pool.ntp.org"]
}
)
default_attributes(
:exim => {
- :local_domains => [ "crm.osmfoundation.org" ],
+ :local_domains => ["crm.osmfoundation.org"],
:routes => {
:crm_return => {
:comment => "return@crm.osmfoundation.org",
- :domains => [ "crm.osmfoundation.org" ],
- :local_parts => [ "return" ],
+ :domains => ["crm.osmfoundation.org"],
+ :local_parts => ["return"],
:maildir => "/var/mail/crm-return",
:user => "www-data",
:group => "mail"
},
:crm_mail => {
:comment => "mail@crm.osmfoundation.org",
- :domains => [ "crm.osmfoundation.org" ],
- :local_parts => [ "mail" ],
+ :domains => ["crm.osmfoundation.org"],
+ :local_parts => ["mail"],
:maildir => "/var/mail/crm-mail",
:user => "www-data",
:group => "mail"
default_attributes(
:postgresql => {
- :versions => [ "9.1" ],
+ :versions => ["9.1"],
:settings => {
:defaults => {
:wal_level => "hot_standby",
:users => {
:rails => {
:status => :role,
- :members => [ :tomh, :grant ]
+ :members => [:tomh, :grant]
}
}
},
"/store/rails" => { :host => "ironbelly", :path => "/store/rails" }
},
:postgresql => {
- :versions => [ "9.1" ],
+ :versions => ["9.1"],
:settings => {
:defaults => {
:listen_addresses => "*",
default_attributes(
:networking => {
- :nameservers => [ "94.20.20.20", "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["94.20.20.20", "8.8.8.8", "8.8.4.4"],
:roles => {
:external => {
:zone => "dt"
override_attributes(
:ntp => {
- :servers => [ "0.az.pool.ntp.org", "1.az.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.az.pool.ntp.org", "1.az.pool.ntp.org", "europe.pool.ntp.org"]
}
)
:mhohmann => { :status => :user },
:ooc => {
:status => :role,
- :members => [ :tomh, :blackadder, :timsc, :ollie ]
+ :members => [:tomh, :blackadder, :timsc, :ollie]
},
:apis => {
:status => :role,
- :members => [ :tomh ]
+ :members => [:tomh]
},
:os => {
:status => :role,
- :members => [ :tomh, :grant, :ollie ]
+ :members => [:tomh, :grant, :ollie]
},
:gpsmid => {
:status => :role,
- :members => [ :apmon, :maba ]
+ :members => [:apmon, :maba]
}
}
},
:master => {
:repository => "git://git.openstreetmap.org/rails.git",
:revision => "master",
- :aliases => [ "api06.dev.openstreetmap.org" ]
+ :aliases => ["api06.dev.openstreetmap.org"]
},
:routing => {
:repository => "git://github.com/apmon/openstreetmap-website.git",
}
},
:postgresql => {
- :versions => [ "9.1", "9.3" ],
+ :versions => ["9.1", "9.3"],
:settings => {
:defaults => {
:shared_buffers => "1GB",
override_attributes(
:ntp => {
- :servers => [ "0.de.pool.ntp.org", "1.de.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.de.pool.ntp.org", "1.de.pool.ntp.org", "europe.pool.ntp.org"]
}
)
:uid => "nobody",
:gid => "nogroup",
:transfer_logging => false,
- :exclude => [ ".*" ],
+ :exclude => [".*"],
:max_connections => 10,
:ignore_errors => true,
:ignore_nonreadable => true,
:timeout => 3600,
- :refuse_options => [ "checksum" ]
+ :refuse_options => ["checksum"]
},
:agri_extra => {
:comment => "AGRI Extras Archive",
:uid => "nobody",
:gid => "nogroup",
:transfer_logging => false,
- :exclude => [ ".*" ],
+ :exclude => [".*"],
:max_connections => 10,
:ignore_errors => true,
:ignore_nonreadable => true,
:timeout => 3600,
- :refuse_options => [ "checksum" ]
+ :refuse_options => ["checksum"]
}
}
}
default_attributes(
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["8.8.8.8", "8.8.4.4"],
:roles => {
:internal => {
:inet => {
},
:forum => {
:status => :role,
- :members => [ :lambertus, :grant ]
+ :members => [:lambertus, :grant]
}
}
},
:keepalive => false
},
:apt => {
- :sources => [ "passenger" ]
+ :sources => ["passenger"]
},
:memcached => {
:memory_limit => 400,
}
},
:exim => {
- :relay_from_hosts => [ "10.0.0.0/8"]
+ :relay_from_hosts => ["10.0.0.0/8"]
}
)
},
:git => {
:status => :role,
- :members => [ :tomh, :grant, :matt, :lonvia, :yellowbkpk, :translatewiki ]
+ :members => [:tomh, :grant, :matt, :lonvia, :yellowbkpk, :translatewiki]
}
}
},
:enf => { :status => :administrator },
:gpstile => {
:status => :role,
- :members => [ :enf, :tomh ]
+ :members => [:enf, :tomh]
}
}
},
override_attributes(
:ntp => {
- :servers => [ "0.de.pool.ntp.org", "1.de.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.de.pool.ntp.org", "1.de.pool.ntp.org", "europe.pool.ntp.org"]
}
)
}
},
:networking => {
- :nameservers => [ "146.179.159.177" ],
+ :nameservers => ["146.179.159.177"],
:roles => {
:internal => {
:inet => {
override_attributes(
:networking => {
- :search => [ "ic.openstreetmap.org", "openstreetmap.org" ]
+ :search => ["ic.openstreetmap.org", "openstreetmap.org"]
},
:ntp => {
- :servers => [ "0.uk.pool.ntp.org", "1.uk.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.uk.pool.ntp.org", "1.uk.pool.ntp.org", "europe.pool.ntp.org"]
}
)
default_attributes(
:apt => {
- :sources => [ "ubuntugis-unstable" ]
+ :sources => ["ubuntugis-unstable"]
},
:git => {
:allowed_nodes => "*:*",
override_attributes(
:ntp => {
- :servers => [ "0.uk.pool.ntp.org", "1.uk.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.uk.pool.ntp.org", "1.uk.pool.ntp.org", "europe.pool.ntp.org"]
}
)
}
},
:networking => {
- :nameservers => [ "77.95.64.205", "77.95.64.206", "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["77.95.64.205", "77.95.64.206", "8.8.8.8", "8.8.4.4"],
:roles => {
:external => {
:zone => "ly"
}
},
:snmpd => {
- :clients => [ "77.95.64.0/24", "77.95.70.0/24" ],
+ :clients => ["77.95.64.0/24", "77.95.70.0/24"],
:community => "lyonix",
:location => "LYON",
:contact => "noc@lyonix.net"
override_attributes(
:ntp => {
- :servers => [ "0.fr.pool.ntp.org", "1.fr.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.fr.pool.ntp.org", "1.fr.pool.ntp.org", "europe.pool.ntp.org"]
}
)
"openstreetmap.co.uk",
"openstreetmap.org.uk"
],
- :daemon_smtp_ports => [ 25, 26 ],
+ :daemon_smtp_ports => [25, 26],
:smarthost_name => "mail.openstreetmap.org",
:smarthost_via => false,
- :dns_blacklists => [ "sbl-xbl.spamhaus.org" ],
+ :dns_blacklists => ["sbl-xbl.spamhaus.org"],
:routes => {
:messages => {
:comment => "messages.openstreetmap.org",
- :domains => [ "messages.openstreetmap.org" ],
- :host => [ "spike-01.openstreetmap.org", "spike-02.openstreetmap.org", "spike-03.openstreetmap.org" ]
+ :domains => ["messages.openstreetmap.org"],
+ :host => ["spike-01.openstreetmap.org", "spike-02.openstreetmap.org", "spike-03.openstreetmap.org"]
},
:otrs => {
:comment => "otrs.openstreetmap.org",
- :domains => [ "otrs.openstreetmap.org" ],
+ :domains => ["otrs.openstreetmap.org"],
:host => "ridley.ucl.openstreetmap.org"
},
:tickets => {
:comment => "tickets.openstreetmap.org",
- :domains => [ "tickets.openstreetmap.org" ],
+ :domains => ["tickets.openstreetmap.org"],
:host => "ridley.ucl.openstreetmap.org"
},
:crm => {
:comment => "crm.osmfoundation.org",
- :domains => [ "crm.osmfoundation.org" ],
+ :domains => ["crm.osmfoundation.org"],
:host => "ridley.ucl.openstreetmap.org"
}
},
}
},
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["8.8.8.8", "8.8.4.4"],
:roles => {
:external => {
:zone => "nc"
override_attributes(
:ntp => {
- :servers => [ "0.tw.pool.ntp.org", "1.tw.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.tw.pool.ntp.org", "1.tw.pool.ntp.org", "europe.pool.ntp.org"]
}
)
:twain => { :status => :administrator },
:nominatim => {
:status => :role,
- :members => [ :lonvia, :tomh, :twain ]
+ :members => [:lonvia, :tomh, :twain]
}
}
},
}
},
:postgresql => {
- :versions => [ "9.1" ],
+ :versions => ["9.1"],
:settings => {
:defaults => {
:shared_buffers => "8GB",
override_attributes(
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4" ]
+ :nameservers => ["8.8.8.8", "8.8.4.4"]
}
)
}
},
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["8.8.8.8", "8.8.4.4"],
:roles => {
:external => {
:zone => "ool",
override_attributes(
:ntp => {
- :servers => [ "ntp.osuosl.org" ]
+ :servers => ["ntp.osuosl.org"]
}
)
}
},
:exim => {
- :local_domains => [ "otrs.openstreetmap.org" ],
+ :local_domains => ["otrs.openstreetmap.org"],
:routes => {
:otrs_otrs => {
:comment => "otrs@otrs.openstreetmap.org",
- :domains => [ "otrs.openstreetmap.org" ],
- :local_parts => [ "otrs" ],
+ :domains => ["otrs.openstreetmap.org"],
+ :local_parts => ["otrs"],
:command => "/opt/otrs/bin/otrs.PostMaster.pl",
:user => "otrs",
:group => "www-data",
},
:otrs_data => {
:comment => "data@otrs.openstreetmap.org",
- :domains => [ "otrs.openstreetmap.org" ],
- :local_parts => [ "data" ],
+ :domains => ["otrs.openstreetmap.org"],
+ :local_parts => ["data"],
:command => "/opt/otrs/bin/otrs.PostMaster.pl -q 'Data Working Group'",
:user => "otrs",
:group => "www-data",
},
:otrs_support => {
:comment => "support@otrs.openstreetmap.org",
- :domains => [ "otrs.openstreetmap.org" ],
- :local_parts => [ "support" ],
+ :domains => ["otrs.openstreetmap.org"],
+ :local_parts => ["support"],
:command => "/opt/otrs/bin/otrs.PostMaster.pl -q 'Technical Support'",
:user => "otrs",
:group => "www-data",
override_attributes(
:ntp => {
- :servers => [ "0.ca.pool.ntp.org", "1.ca.pool.ntp.org", "north-america.pool.ntp.org" ]
+ :servers => ["0.ca.pool.ntp.org", "1.ca.pool.ntp.org", "north-america.pool.ntp.org"]
}
)
default_attributes(
:networking => {
- :nameservers => [ "8.8.4.4", "213.186.33.99", "8.8.8.8" ],
+ :nameservers => ["8.8.4.4", "213.186.33.99", "8.8.8.8"],
:roles => {
:external => {
:zone => "ov"
:ppawel => { :status => :user },
:owl => {
:status => :role,
- :members => [ :yellowbkpk, :ppawel ]
+ :members => [:yellowbkpk, :ppawel]
}
},
:groups => {
:adm => {
- :members => [ :yellowbkpk, :ppawel ]
+ :members => [:yellowbkpk, :ppawel]
}
}
},
:mpm => "event"
},
:apt => {
- :sources => [ "brightbox-ruby-ng", "ubuntugis-stable", "ubuntugis-unstable" ]
+ :sources => ["brightbox-ruby-ng", "ubuntugis-stable", "ubuntugis-unstable"]
},
:postgresql => {
- :versions => [ "9.1" ],
+ :versions => ["9.1"],
:settings => {
:defaults => {
:fsync => "off",
}
},
:munin => {
- :allow => [ "10.64.1.11" ]
+ :allow => ["10.64.1.11"]
},
:networking => {
- :nameservers => [ "10.64.1.42", "194.167.156.13", "10.64.1.3" ],
+ :nameservers => ["10.64.1.42", "194.167.156.13", "10.64.1.3"],
:roles => {
:external => {
:zone => "pa"
override_attributes(
:ntp => {
- :servers => [ "cannelle.paulla.asso.fr" ]
+ :servers => ["cannelle.paulla.asso.fr"]
}
)
:bretth => { :status => :user },
:planet => {
:status => :administrator,
- :members => [ :bretth ]
+ :members => [:bretth]
}
}
},
:uid => "nobody",
:gid => "nogroup",
:transfer_logging => false,
- :exclude => [ ".*" ],
+ :exclude => [".*"],
:max_connections => 10,
:ignore_errors => true,
:ignore_nonreadable => true,
:timeout => 3600,
- :refuse_options => [ "checksum" ]
+ :refuse_options => ["checksum"]
}
}
},
}
},
:postgresql => {
- :versions => [ "9.3" ],
+ :versions => ["9.3"],
:settings => {
:defaults => {
:shared_buffers => "10GB",
default_attributes(
:networking => {
- :nameservers => [ "8.8.4.4", "65.19.174.2", "65.19.175.2" ],
+ :nameservers => ["8.8.4.4", "65.19.174.2", "65.19.175.2"],
:roles => {
:external => {
:zone => "pr"
override_attributes(
:ntp => {
- :servers => [ "0.us.pool.ntp.org", "1.us.pool.ntp.org", "2.us.pool.ntp.org" ]
+ :servers => ["0.us.pool.ntp.org", "1.us.pool.ntp.org", "2.us.pool.ntp.org"]
}
)
}
},
:postgresql => {
- :versions => [ "9.3" ],
+ :versions => ["9.3"],
:settings => {
:defaults => {
:shared_buffers => "10GB",
:category => "Ups",
:values => {
:load => {
- :sum => [ "apcpdu_apc1.load", "apcpdu_apc2.load", "apcpdu_apc3.load" ],
+ :sum => ["apcpdu_apc1.load", "apcpdu_apc2.load", "apcpdu_apc3.load"],
:label => "Load"
}
}
}
},
:apt => {
- :sources => [ "brightbox-ruby-ng" ]
+ :sources => ["brightbox-ruby-ng"]
},
:db => {
:cluster => "9.1/main"
},
:taginfo => {
:status => :role,
- :members => [ :jochen, :tomh ]
+ :members => [:jochen, :tomh]
}
}
},
default_attributes(
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["8.8.8.8", "8.8.4.4"],
:roles => {
:external => {
:zone => "ts"
override_attributes(
:ntp => {
- :servers => [ "0.se.pool.ntp.org", "1.se.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.se.pool.ntp.org", "1.se.pool.ntp.org", "europe.pool.ntp.org"]
}
)
:users => {
:tile => {
:status => :role,
- :members => [ :jburgess, :tomh ]
+ :members => [:jburgess, :tomh]
}
}
},
}
},
:apt => {
- :sources => [ "ubuntugis-stable" ]
+ :sources => ["ubuntugis-stable"]
},
:postgresql => {
- :versions => [ "9.1" ],
+ :versions => ["9.1"],
:settings => {
:defaults => {
:temp_buffers => "32MB",
default_attributes(
:apt => {
- :sources => [ "nginx" ]
+ :sources => ["nginx"]
},
:sysctl => {
:network_conntrack_time_wait => {
override_attributes(
:networking => {
- :nameservers => [ "10.0.0.3", "8.8.8.8", "8.8.4.4" ],
- :search => [ "ucl.openstreetmap.org", "openstreetmap.org" ]
+ :nameservers => ["10.0.0.3", "8.8.8.8", "8.8.4.4"],
+ :search => ["ucl.openstreetmap.org", "openstreetmap.org"]
}
)
override_attributes(
:networking => {
- :nameservers => [ "10.0.0.3", "8.8.8.8", "8.8.4.4" ],
- :search => [ "ucl.openstreetmap.org", "openstreetmap.org" ]
+ :nameservers => ["10.0.0.3", "8.8.8.8", "8.8.4.4"],
+ :search => ["ucl.openstreetmap.org", "openstreetmap.org"]
}
)
default_attributes(
:bind => {
- :forwarders => [ "144.82.100.1", "144.82.100.41" ]
+ :forwarders => ["144.82.100.1", "144.82.100.41"]
}
)
override_attributes(
:ntp => {
- :servers => [ "ntp1.ucl.ac.uk", "ntp2.ucl.ac.uk" ]
+ :servers => ["ntp1.ucl.ac.uk", "ntp2.ucl.ac.uk"]
}
)
:rails_hard_memory_limit => 1024
},
:exim => {
- :local_domains => [ "messages.openstreetmap.org" ],
- :trusted_users => [ "rails" ],
+ :local_domains => ["messages.openstreetmap.org"],
+ :trusted_users => ["rails"],
:routes => {
:messages => {
:comment => "messages.openstreetmap.org",
- :domains => [ "messages.openstreetmap.org" ],
+ :domains => ["messages.openstreetmap.org"],
:command => "/srv/www.openstreetmap.org/rails/script/deliver-message $local_part",
:user => "rails",
:group => "rails",
:users => {
:rails => {
:status => :role,
- :members => [ :tomh, :grant ]
+ :members => [:tomh, :grant]
}
}
},
}
},
:exim => {
- :trusted_users => [ "www-data" ],
+ :trusted_users => ["www-data"],
:aliases => {
:root => "grant"
},
default_attributes(
:networking => {
- :nameservers => [ "8.8.8.8", "8.8.4.4" ],
+ :nameservers => ["8.8.8.8", "8.8.4.4"],
:roles => {
:external => {
:zone => "yx"
override_attributes(
:ntp => {
- :servers => [ "0.ru.pool.ntp.org", "1.ru.pool.ntp.org", "europe.pool.ntp.org" ]
+ :servers => ["0.ru.pool.ntp.org", "1.ru.pool.ntp.org", "europe.pool.ntp.org"]
}
)
}
},
:postgresql => {
- :versions => [ "9.1" ],
+ :versions => ["9.1"],
:settings => {
:defaults => {
:shared_buffers => "3GB",