create_config paramater addded

It might be not useful in some cases to overwrite config
This commit is contained in:
7u83 2021-06-17 10:12:23 +02:00
parent 3c427b8bd3
commit c314bcef6e
1 changed files with 14 additions and 6 deletions

View File

@ -29,7 +29,9 @@ class wmdeit_nextcloud(
$nc_user = "www-data",
$nc_group = "www-data",
$php_version = "7.2"
$php_version = "7.2",
$php_manage_repos = true,
$create_config = false
)
{
@ -80,13 +82,19 @@ class wmdeit_nextcloud(
command => "/bin/chown -R www-data:www-data $install_dir",
subscribe => Archive["/tmp/$distfile"],
require => Class["apache"]
} ->
file { "$install_dir/config/config.php":
ensure => file,
content => template("wmdeit_nextcloud/config.php.erb")
} ->
}
if $create_config
{
file { "$install_dir/config/config.php":
require => Exec['ncperms'],
ensure => file,
content => template("wmdeit_nextcloud/config.php.erb")
}
}
exec {"/bin/mkdir -p $data_dir":
require => Exec['ncperms'],
creates => $data_dir
} ->
file {$data_dir: