From fa1356512fc7e543c0892cac55cd478e658d44b1 Mon Sep 17 00:00:00 2001 From: Tobias Herre Date: Mon, 19 Apr 2021 13:13:58 +0200 Subject: [PATCH] creates config file only if masterpassword is given --- wmde-odoo/manifests/init.pp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/wmde-odoo/manifests/init.pp b/wmde-odoo/manifests/init.pp index c1ac791..3261332 100644 --- a/wmde-odoo/manifests/init.pp +++ b/wmde-odoo/manifests/init.pp @@ -50,7 +50,7 @@ class odoo( $version = "wmde8.0", $source = 'https://srcsrv.wikimedia.de/WMDE/odoo.git', # $source = 'https://www.github.com/odoo/odoo.git' - $masterpassword = "WMDEMPWD" + $masterpassword, ) inherits odoo::params { @@ -80,10 +80,13 @@ inherits odoo::params { home => "${odoo_user_homedir}", require => File["$homedirs"], managehome => true, - } -> - file {"${odoo_user_homedir}/.openerp_serverrc": - ensure => file, - content => template("odoo/dot_openerp_serverrc.erp"), + } + if $masterpassword { + file {"${odoo_user_homedir}/.openerp_serverrc": + ensure => file, + content => template("odoo/dot_openerp_serverrc.erp"), + require => User["$odoo_user"], + } }