2020-12-08 06:50:20 +00:00
|
|
|
#
|
2020-12-02 17:25:36 +00:00
|
|
|
# Class: odoo
|
|
|
|
# ===========================
|
|
|
|
#
|
|
|
|
# Full description of class odoo here.
|
|
|
|
#
|
|
|
|
# Parameters
|
|
|
|
# ----------
|
|
|
|
#
|
|
|
|
# Document parameters here.
|
|
|
|
#
|
|
|
|
# * `sample parameter`
|
|
|
|
# Explanation of what this parameter affects and what it defaults to.
|
|
|
|
# e.g. "Specify one or more upstream ntp servers as an array."
|
|
|
|
#
|
|
|
|
# Variables
|
|
|
|
# ----------
|
|
|
|
#
|
|
|
|
# Here you should define a list of variables that this module would require.
|
|
|
|
#
|
|
|
|
# * `sample variable`
|
|
|
|
# Explanation of how this variable affects the function of this class and if
|
|
|
|
# it has a default. e.g. "The parameter enc_ntp_servers must be set by the
|
|
|
|
# External Node Classifier as a comma separated list of hostnames." (Note,
|
|
|
|
# global variables should be avoided in favor of class parameters as
|
|
|
|
# of Puppet 2.6.)
|
|
|
|
#
|
|
|
|
# Examples
|
|
|
|
# --------
|
|
|
|
#
|
|
|
|
# @example
|
|
|
|
# class { 'odoo':
|
|
|
|
# servers => [ 'pool.ntp.org', 'ntp.local.company.com' ],
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# Authors
|
|
|
|
# -------
|
|
|
|
#
|
|
|
|
# Author Name <author@domain.com>
|
|
|
|
#
|
|
|
|
# Copyright
|
|
|
|
# ---------
|
|
|
|
#
|
|
|
|
# Copyright 2018 Your name here, unless otherwise noted.
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class odoo(
|
2020-12-04 08:09:44 +00:00
|
|
|
$version = "wmde8.0",
|
|
|
|
$source = 'https://srcsrv.wikimedia.de/WMDE/odoo.git'
|
|
|
|
# $source = 'https://www.github.com/odoo/odoo.git'
|
|
|
|
|
2020-12-02 17:25:36 +00:00
|
|
|
)
|
|
|
|
inherits odoo::params {
|
|
|
|
|
|
|
|
file {"$logdir":
|
|
|
|
ensure => "directory"
|
|
|
|
}
|
|
|
|
|
|
|
|
file {"$logfile":
|
|
|
|
ensure => "present",
|
|
|
|
owner => "odoo",
|
|
|
|
group => "odoo",
|
|
|
|
}
|
|
|
|
|
|
|
|
file {"$conffile":
|
|
|
|
ensure => "present",
|
|
|
|
owner => "odoo",
|
|
|
|
group => "odoo",
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
file {"$homedirs":
|
|
|
|
ensure => 'directory'
|
|
|
|
}
|
|
|
|
user {"$odoo_user":
|
|
|
|
ensure => present,
|
2020-12-08 06:50:20 +00:00
|
|
|
home => "${odoo_user_homedir}",
|
2020-12-02 17:25:36 +00:00
|
|
|
require => File["$homedirs"],
|
2020-12-08 06:50:20 +00:00
|
|
|
managehome => true,
|
2020-12-02 17:25:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
package {$prepkg:
|
|
|
|
ensure => "installed"
|
|
|
|
}
|
|
|
|
|
|
|
|
vcsrepo { "$odoo_systemdir":
|
|
|
|
ensure => present,
|
|
|
|
provider => git,
|
2020-12-04 08:09:44 +00:00
|
|
|
source => $source,
|
2020-12-02 17:25:36 +00:00
|
|
|
revision => $version,
|
|
|
|
# submodules => false,
|
|
|
|
depth => 1,
|
2020-12-08 06:50:20 +00:00
|
|
|
require => Package[$prepkg],
|
|
|
|
user => $odoo_user,
|
2020-12-02 17:25:36 +00:00
|
|
|
}
|
|
|
|
|
2020-12-04 20:34:57 +00:00
|
|
|
|
|
|
|
file {"$reposdir":
|
|
|
|
ensure => directory
|
|
|
|
}
|
|
|
|
|
|
|
|
odoo::addon{"tictac":
|
|
|
|
source => "https://srcsrv.wikimedia.de/WMDE/tictac"
|
|
|
|
}
|
2020-12-08 06:50:20 +00:00
|
|
|
odoo::addon{"odoo_web_login":
|
|
|
|
source => "https://srcsrv.wikimedia.de/WMDE/odoo-module-odoo_web_login.git",
|
|
|
|
dstdir => "odoo_web_login",
|
|
|
|
}
|
|
|
|
odoo::addon{"colors_customization":
|
|
|
|
source => "https://srcsrv.wikimedia.de/WMDE/odoo-module-colors_customization.git",
|
|
|
|
dstdir => "colors_customization",
|
|
|
|
}
|
|
|
|
odoo::addon{"hr_employee_time_clock":
|
|
|
|
source => "https://srcsrv.wikimedia.de/WMDE/odoo-module-hr_employee_time_clock.git",
|
|
|
|
dstdir => "hr_employee_time_clock",
|
|
|
|
}
|
|
|
|
|
|
|
|
odoo::addon{"web_calendar_year":
|
|
|
|
source => "https://srcsrv.wikimedia.de/WMDE/odoo-module-web_calendar_year.git",
|
|
|
|
dstdir => "web_calendar_year",
|
|
|
|
}
|
|
|
|
|
2020-12-08 07:46:35 +00:00
|
|
|
odoo::addon{"web_widget_color":
|
|
|
|
source => "https://srcsrv.wikimedia.de/WMDE/odoo-module-web_widget_color.git",
|
|
|
|
dstdir => "web_widget_color",
|
|
|
|
}
|
|
|
|
|
2020-12-08 06:50:20 +00:00
|
|
|
|
2020-12-04 20:34:57 +00:00
|
|
|
|
2020-12-02 17:25:36 +00:00
|
|
|
exec {"install_pre":
|
|
|
|
command => "/bin/ls > /dev/null && $preenv && $pip_cmd install -r $odoo_systemdir/requirements.txt",
|
|
|
|
require => [
|
|
|
|
Vcsrepo["$odoo_systemdir"],
|
|
|
|
Package[$prepkg],
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-04 20:34:57 +00:00
|
|
|
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"],
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-02 17:25:36 +00:00
|
|
|
|
|
|
|
|