Browse Source

Installs tictac modules

master
Tobias Herre 2 years ago
parent
commit
e2b18c487b
  1. 40
      wmde-odoo/manifests/init.pp
  2. 1
      wmde-odoo/manifests/params.pp

40
wmde-odoo/manifests/init.pp

@ -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"],
}
}

1
wmde-odoo/manifests/params.pp

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

Loading…
Cancel
Save