From c314bcef6ea4412eac7dcdae23f3a6d76273055d Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Thu, 17 Jun 2021 10:12:23 +0200 Subject: [PATCH] create_config paramater addded It might be not useful in some cases to overwrite config --- manifests/init.pp | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index aa270da..d453ad9 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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: