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: