diff --git a/manifests/app.pp b/manifests/app.pp index b9f42cc..bfa819f 100644 --- a/manifests/app.pp +++ b/manifests/app.pp @@ -8,6 +8,8 @@ $db_password, $wp_owner, $wp_group, + $tar_owner, + $tar_group, $wp_lang, $wp_config_content, $wp_plugin_dir, @@ -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, diff --git a/manifests/init.pp b/manifests/init.pp index 4ba78c1..d5326bf 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 # @@ -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', @@ -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, diff --git a/manifests/instance.pp b/manifests/instance.pp index bd4c0a8..9b3cd5c 100644 --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -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: '' # @@ -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', @@ -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, @@ -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, - } + } } diff --git a/manifests/instance/app.pp b/manifests/instance/app.pp index 467c800..86914af 100644 --- a/manifests/instance/app.pp +++ b/manifests/instance/app.pp @@ -8,6 +8,8 @@ $db_password, $wp_owner, $wp_group, + $tar_owner, + $tar_group, $wp_lang, $wp_config_content, $wp_plugin_dir, @@ -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