Skip to content
Open
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
4 changes: 4 additions & 0 deletions manifests/app.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
$db_password,
$wp_owner,
$wp_group,
$tar_owner,
$tar_group,
$wp_lang,
$wp_config_content,
$wp_plugin_dir,
Expand All @@ -31,6 +33,8 @@
db_password => $db_password,
wp_owner => $wp_owner,
wp_group => $wp_group,
tar_owner => $tar_owner,
tar_group => $tar_group,
wp_lang => $wp_lang,
wp_plugin_dir => $wp_plugin_dir,
wp_additional_config => $wp_additional_config,
Expand Down
11 changes: 10 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@
# Specifies the group of the wordpress files. Default: 0 (*BSD/Darwin
# compatible GID)
#
# [*tar_owner*]
# Specifies the owner of the wordpress tarball to download and extract. Default: root
#
# [*tar_group*]
# Specifies the group of the wordpress tarball to download and extract. Default: 0 (*BSD/Darwin
#
# [*wp_lang*]
# WordPress Localized Language. Default: ''
#
#
# [*wp_plugin_dir*]
# WordPress Plugin Directory. Full path, no trailing slash. Default: WordPress Default
#
Expand Down Expand Up @@ -93,6 +98,8 @@
$db_password = 'password',
$wp_owner = 'root',
$wp_group = '0',
$tar_owner = 'root',
$tar_group = '0',
$wp_lang = '',
$wp_config_content = undef,
$wp_plugin_dir = 'DEFAULT',
Expand All @@ -118,6 +125,8 @@
db_password => $db_password,
wp_owner => $wp_owner,
wp_group => $wp_group,
tar_owner => $tar_owner,
tar_group => $tar_group,
wp_lang => $wp_lang,
wp_config_content => $wp_config_content,
wp_plugin_dir => $wp_plugin_dir,
Expand Down
15 changes: 13 additions & 2 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@
# Specifies the group of the wordpress files. Default: 0 (*BSD/Darwin
# compatible GID)
#
# [*tar_owner*]
# Specifies the owner of the wordpress tarball to download and extract. Default: root
#
# [*tar_group*]
# Specifies the group of the wordpress tarball to download and extract. Default: 0 (*BSD/Darwin
# compatible GID)
#
# [*wp_lang*]
# WordPress Localized Language. Default: ''
#
Expand Down Expand Up @@ -82,6 +89,8 @@
$db_password = 'password',
$wp_owner = 'root',
$wp_group = '0',
$tar_owner = 'root',
$tar_group = '0',
$wp_lang = '',
$wp_config_content = undef,
$wp_plugin_dir = 'DEFAULT',
Expand All @@ -105,6 +114,8 @@
db_password => $db_password,
wp_owner => $wp_owner,
wp_group => $wp_group,
tar_owner => $tar_owner,
tar_group => $tar_group,
wp_lang => $wp_lang,
wp_config_content => $wp_config_content,
wp_plugin_dir => $wp_plugin_dir,
Expand All @@ -119,12 +130,12 @@
wp_debug_display => $wp_debug_display,
}

wordpress::instance::db { "${db_host}/${db_name}":
wordpress::instance::db { "${db_host}/${db_name}":
create_db => $create_db,
create_db_user => $create_db_user,
db_name => $db_name,
db_host => $db_host,
db_user => $db_user,
db_password => $db_password,
}
}
}
14 changes: 8 additions & 6 deletions manifests/instance/app.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
$db_password,
$wp_owner,
$wp_group,
$tar_owner,
$tar_group,
$wp_lang,
$wp_config_content,
$wp_plugin_dir,
Expand Down Expand Up @@ -75,20 +77,20 @@
command => "wget ${install_url}/${install_file_name}",
creates => "${install_dir}/${install_file_name}",
require => File[$install_dir],
user => $wp_owner,
group => $wp_group,
user => $tar_owner,
group => $tar_group,
}
-> exec { "Extract wordpress ${install_dir}":
command => "tar zxvf ./${install_file_name} --strip-components=1",
creates => "${install_dir}/index.php",
user => $wp_owner,
group => $wp_group,
user => $tar_owner,
group => $tar_group,
}
~> exec { "Change ownership ${install_dir}":
command => "chown -R ${wp_owner}:${wp_group} ${install_dir}",
refreshonly => true,
user => $wp_owner,
group => $wp_group,
user => $tar_owner,
group => $tar_group,
}

## Configure wordpress
Expand Down