Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mode for files #69

Closed
wants to merge 2 commits into from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions manifests/init.pp
Expand Up @@ -77,6 +77,12 @@
# [*wp_debug_display*]
# Specifies the `WP_DEBUG_DISPLAY` value that extends debugging to cause debug messages to be shown inline, in HTML pages. Default: 'false'
#
# [*wp_mode*]
# Specifies the mode of files and directories where this is set explicitly.
#
# [*wp_config_mode*]
# Specifies the mode of wp-config file.
#
# === Requires
#
# === Examples
Expand Down Expand Up @@ -105,6 +111,8 @@
$wp_debug = false,
$wp_debug_log = false,
$wp_debug_display = false,
$wp_config_mode = '0640',
$wp_mode = '0644'
) {
wordpress::instance { $install_dir:
install_dir => $install_dir,
Expand All @@ -130,5 +138,7 @@
wp_debug => $wp_debug,
wp_debug_log => $wp_debug_log,
wp_debug_display => $wp_debug_display,
wp_config_mode => $wp_config_mode,
wp_mode => $wp_mode
}
}
4 changes: 4 additions & 0 deletions manifests/instance.pp
Expand Up @@ -94,6 +94,8 @@
$wp_debug = false,
$wp_debug_log = false,
$wp_debug_display = false,
$wp_config_mode,
$wp_mode
) {
wordpress::instance::app { $install_dir:
install_dir => $install_dir,
Expand All @@ -117,6 +119,8 @@
wp_debug => $wp_debug,
wp_debug_log => $wp_debug_log,
wp_debug_display => $wp_debug_display,
$wp_config_mode,
$wp_mode
}

wordpress::instance::db { "${db_host}/${db_name}":
Expand Down
6 changes: 4 additions & 2 deletions manifests/instance/app.pp
Expand Up @@ -20,6 +20,8 @@
$wp_debug,
$wp_debug_log,
$wp_debug_display,
$wp_config_mode,
$wp_mode
) {
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)
Expand All @@ -45,7 +47,7 @@
File {
owner => $wp_owner,
group => $wp_group,
mode => '0644',
mode => $wp_mode,
}
Exec {
path => ['/bin','/sbin','/usr/bin','/usr/sbin'],
Expand Down Expand Up @@ -96,7 +98,7 @@
concat { "${install_dir}/wp-config.php":
owner => $wp_owner,
group => $wp_group,
mode => '0640',
mode => $wp_config_mode,
require => Exec["Extract wordpress ${install_dir}"],
}
if $wp_config_content {
Expand Down