Installs tictac modules

This commit is contained in:
Tobias Herre 2020-12-04 21:34:57 +01:00
parent 52cb845936
commit e2b18c487b
2 changed files with 41 additions and 0 deletions

View File

@ -94,6 +94,15 @@ inherits odoo::params {
require => Package[$prepkg]
}
file {"$reposdir":
ensure => directory
}
odoo::addon{"tictac":
source => "https://srcsrv.wikimedia.de/WMDE/tictac"
}
exec {"install_pre":
command => "/bin/ls > /dev/null && $preenv && $pip_cmd install -r $odoo_systemdir/requirements.txt",
require => [
@ -104,5 +113,36 @@ inherits odoo::params {
}
define odoo::addon (
$source ,
$dstdir = "",
)
{
$installdir = "${::odoo::params::odoo_systemdir}/openerp/addons/$dstdir"
$reposdir = $::odoo::reposdir
vcsrepo { "$reposdir/$title":
ensure => present,
provider => git,
source => $source,
depth => 1,
require => [
Vcsrepo[$::odoo::odoo_systemdir],
File[$reposdir],
]
} ->
file {$installdir:
ensure => directory
} ->
exec{"/bin/cp -R $reposdir/$title/* $installdir":
refreshonly => true,
subscribe => Vcsrepo["$reposdir/$title"],
}
}

View File

@ -10,6 +10,7 @@ class odoo::params{
$logdir = "/var/log/odoo"
$logfile = "/var/log/odoo.log"
$reposdir = "/tmp/repos"
case $::osfamily {
'FreeBSD':{