action :create do
version = new_resource.version || Chef::Wordpress.current_version
- node.set_unless[:wordpress][:sites][new_resource.name] = {}
+ node.normal_unless[:wordpress][:sites][new_resource.name] = {}
- node.set[:wordpress][:sites][new_resource.name][:directory] = site_directory
+ node.normal[:wordpress][:sites][new_resource.name][:directory] = site_directory
- node.set_unless[:wordpress][:sites][new_resource.name][:auth_key] = SecureRandom.base64(48)
- node.set_unless[:wordpress][:sites][new_resource.name][:secure_auth_key] = SecureRandom.base64(48)
- node.set_unless[:wordpress][:sites][new_resource.name][:logged_in_key] = SecureRandom.base64(48)
- node.set_unless[:wordpress][:sites][new_resource.name][:nonce_key] = SecureRandom.base64(48)
- node.set_unless[:wordpress][:sites][new_resource.name][:auth_salt] = SecureRandom.base64(48)
- node.set_unless[:wordpress][:sites][new_resource.name][:secure_auth_salt] = SecureRandom.base64(48)
- node.set_unless[:wordpress][:sites][new_resource.name][:logged_in_salt] = SecureRandom.base64(48)
- node.set_unless[:wordpress][:sites][new_resource.name][:nonce_salt] = SecureRandom.base64(48)
+ node.normal_unless[:wordpress][:sites][new_resource.name][:auth_key] = SecureRandom.base64(48)
+ node.normal_unless[:wordpress][:sites][new_resource.name][:secure_auth_key] = SecureRandom.base64(48)
+ node.normal_unless[:wordpress][:sites][new_resource.name][:logged_in_key] = SecureRandom.base64(48)
+ node.normal_unless[:wordpress][:sites][new_resource.name][:nonce_key] = SecureRandom.base64(48)
+ node.normal_unless[:wordpress][:sites][new_resource.name][:auth_salt] = SecureRandom.base64(48)
+ node.normal_unless[:wordpress][:sites][new_resource.name][:secure_auth_salt] = SecureRandom.base64(48)
+ node.normal_unless[:wordpress][:sites][new_resource.name][:logged_in_salt] = SecureRandom.base64(48)
+ node.normal_unless[:wordpress][:sites][new_resource.name][:nonce_salt] = SecureRandom.base64(48)
mysql_user "#{new_resource.database_user}@localhost" do
password new_resource.database_password
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
variables :aliases => Array(new_resource.aliases),
:urls => new_resource.urls,
:ssl_enabled => new_resource.ssl_enabled,
- :ssl_certificate => new_resource.ssl_certificate
+ :ssl_certificate => new_resource.ssl_certificate,
+ :ssl_certificate_chain => new_resource.ssl_certificate_chain
reload_apache false
end