Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ This will set up one or more installations of Wordpress 3.8 on Debian and Redhat
WordPress Plugin Directory. Full path, no trailing slash. Default: WordPress Default

* `wp_additional_config`<br />
Specifies a template to include near the end of the wp-config.php file to add additional options. Default: ''
Specifies a template to include near the end of the wp-config.php file to add additional options. As PHP does not allow Defines to be redefined this can not be used to redefine values already defined. Default: ''

* `wp_config_content`<br />
Specifies the entire content for wp-config.php. This causes many of the other parameters to be ignored and allows an entirely custom config to be passed. It is recommended to use `wp_additional_config` instead of this parameter when possible.
Expand All @@ -80,8 +80,14 @@ This will set up one or more installations of Wordpress 3.8 on Debian and Redhat
* `wp_multisite`<br />
Specifies whether to enable the multisite feature. Requires `wp_site_domain` to also be passed. Default: `false`

* `wp_subdomain_install`<br />
Specifies the `SUBDOMAIN_INSTALL` value that will be used when configuring multisite. This states whether blogs created will be blogname.domain.com. Default: `false`

* `wp_site_domain`<br />
Specifies the `DOMAIN_CURRENT_SITE` value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''
Specifies the `DOMAIN_CURRENT_SITE` value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''

* `wp_path_current_site`<br />
Specifies the `PATH_CURRENT_SITE` value that will be used when configuring multisite. If all sites are to be under a url location that is not the toplevel / set this value /path/. wp-admin will then be at /path/wp-admin and additional blogs will be under /path/blogname. Default: '/'

* `wp_debug`<br />
Specifies the `WP_DEBUG` value that will control debugging. This must be true if you use the next two debug extensions. Default: 'false'
Expand Down
4 changes: 4 additions & 0 deletions manifests/app.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
$wp_proxy_host,
$wp_proxy_port,
$wp_multisite,
$wp_subdomain_install,
$wp_site_domain,
$wp_path_current_site,
$wp_debug,
$wp_debug_log,
$wp_debug_display,
Expand All @@ -38,7 +40,9 @@
wp_proxy_host => $wp_proxy_host,
wp_proxy_port => $wp_proxy_port,
wp_multisite => $wp_multisite,
wp_subdomain_install => $wp_subdomain_install,
wp_site_domain => $wp_site_domain,
wp_path_current_site => $wp_path_current_site,
wp_debug => $wp_debug,
wp_debug_log => $wp_debug_log,
wp_debug_display => $wp_debug_display,
Expand Down
12 changes: 11 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,20 @@
# Specifies a Hostname or IP of a proxy server for Wordpress to use to install updates, plugins, etc. Default: ''
#
# [*wp_proxy_port*]
# Specifies the port to use with the proxy host. Default: ''
# Specifies the port to use with the proxy host. Default: ''
#
# [*wp_multisite*]
# Specifies whether to enable the multisite feature. Requires `wp_site_domain` to also be passed. Default: `false`
#
# [*wp_subdomain_install*]
# Specifies the `SUBDOMAIN_INSTALL` value that will be used when configuring multisite. This states whether blogs created will be blogname.domain
#
# [*wp_site_domain*]
# Specifies the `DOMAIN_CURRENT_SITE` value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''
#
# [*wp_path_current_site*]
# Specifies the `PATH_CURRENT_SITE` value that will be used when configuring multisite. If all sites are to be under a url location that is not t
#
# [*wp_debug*]
# Specifies the `WP_DEBUG` value that will control debugging. This must be true if you use the next two debug extensions. Default: 'false'
#
Expand Down Expand Up @@ -101,7 +107,9 @@
$wp_proxy_host = '',
$wp_proxy_port = '',
$wp_multisite = false,
$wp_subdomain_install = false,
$wp_site_domain = '',
$wp_path_current_site = '/',
$wp_debug = false,
$wp_debug_log = false,
$wp_debug_display = false,
Expand All @@ -126,7 +134,9 @@
wp_proxy_host => $wp_proxy_host,
wp_proxy_port => $wp_proxy_port,
wp_multisite => $wp_multisite,
wp_subdomain_install => $wp_subdomain_install,
wp_site_domain => $wp_site_domain,
wp_path_current_site => $wp_path_current_site,
wp_debug => $wp_debug,
wp_debug_log => $wp_debug_log,
wp_debug_display => $wp_debug_display,
Expand Down
10 changes: 10 additions & 0 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@
# [*wp_multisite*]
# Specifies whether to enable the multisite feature. Requires `wp_site_domain` to also be passed. Default: `false`
#
# [*wp_subdomain_install*]
# Specifies the `SUBDOMAIN_INSTALL` value that will be used when configuring multisite. This states whether blogs created will be blogname.domain
#
# [*wp_site_domain*]
# Specifies the `DOMAIN_CURRENT_SITE` value that will be used when configuring multisite. Typically this is the address of the main wordpress instance. Default: ''
#
# [*wp_path_current_site*]
# Specifies the `PATH_CURRENT_SITE` value that will be used when configuring multisite. If all sites are to be under a url location that is not t
#
# === Requires
#
# === Examples
Expand All @@ -90,7 +96,9 @@
$wp_proxy_host = '',
$wp_proxy_port = '',
$wp_multisite = false,
$wp_subdomain_install = false,
$wp_site_domain = '',
$wp_path_current_site = '/',
$wp_debug = false,
$wp_debug_log = false,
$wp_debug_display = false,
Expand All @@ -113,7 +121,9 @@
wp_proxy_host => $wp_proxy_host,
wp_proxy_port => $wp_proxy_port,
wp_multisite => $wp_multisite,
wp_subdomain_install => $wp_subdomain_install,
wp_site_domain => $wp_site_domain,
wp_path_current_site => $wp_path_current_site,
wp_debug => $wp_debug,
wp_debug_log => $wp_debug_log,
wp_debug_display => $wp_debug_display,
Expand Down
10 changes: 7 additions & 3 deletions manifests/instance/app.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
$wp_proxy_host,
$wp_proxy_port,
$wp_multisite,
$wp_subdomain_install,
$wp_site_domain,
$wp_path_current_site,
$wp_debug,
$wp_debug_log,
$wp_debug_display,
) {
validate_string($install_dir,$install_url,$version,$db_name,$db_host,$db_user,$db_password,$wp_owner,$wp_group, $wp_lang, $wp_plugin_dir,$wp_additional_config,$wp_table_prefix,$wp_proxy_host,$wp_proxy_port,$wp_site_domain)
validate_bool($wp_multisite, $wp_debug, $wp_debug_log, $wp_debug_display)
validate_string($install_dir,$install_url,$version,$db_name,$db_host,$db_user,$db_password,$wp_owner,$wp_group, $wp_lang, $wp_plugin_dir,$wp_additional_config,$wp_table_prefix,$wp_proxy_host,$wp_proxy_port,$wp_site_domain,$wp_path_current_site)
validate_bool($wp_multisite, $wp_subdomain_install, $wp_debug, $wp_debug_log, $wp_debug_display)
validate_absolute_path($install_dir)

if $wp_config_content and ($wp_lang or $wp_debug or $wp_debug_log or $wp_debug_display or $wp_proxy_host or $wp_proxy_port or $wp_multisite or $wp_site_domain) {
Expand All @@ -45,7 +47,7 @@
File {
owner => $wp_owner,
group => $wp_group,
mode => '0644',
mode => '0664',
}
Exec {
path => ['/bin','/sbin','/usr/bin','/usr/sbin'],
Expand Down Expand Up @@ -130,7 +132,9 @@
# - $wp_proxy_host
# - $wp_proxy_port
# - $wp_multisite
# - $wp_subdomain_install
# - $wp_site_domain
# - $wp_path_current_site
# - $wp_additional_config
# - $wp_debug
# - $wp_debug_log
Expand Down
4 changes: 2 additions & 2 deletions templates/wp-config.php.erb
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ define('WP_PROXY_PORT', '<%= @wp_proxy_port %>');
/* Multisite */
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('SUBDOMAIN_INSTALL', <%= @wp_subdomain_install %>);
define('DOMAIN_CURRENT_SITE', '<%= @wp_site_domain %>');
define('PATH_CURRENT_SITE', '/');
define('PATH_CURRENT_SITE', '<%= @wp_path_current_site %>');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
<% end %>
Expand Down