Compare commits

...

3 Commits

3 changed files with 39 additions and 2 deletions

View File

@ -129,13 +129,13 @@ inherits odoo::params {
}
exec {"install_pre":
command => "/bin/ls > /dev/null && $preenv && $pip_cmd install -r $odoo_systemdir/requirements.txt",
require => [
Vcsrepo["$odoo_systemdir"],
Package[$prepkg],
]
],
timeout => 1800,
}
}

View File

@ -14,6 +14,13 @@ class odoo::params{
case $::osfamily {
'FreeBSD':{
$postgrespkgs = "postgresql96-server"
$postgresuser = "postgres"
$postgresdatadir = "/var/db/postgres/data96"
$postgresinitcmd = "/usr/local/bin/initdb -D $postgresdatadir"
$postgresusercreate = "/usr/local/bin/createuser -S odoo"
$postgresuserexists = "/usr/local/bin/psql -t -c '\du' | cut -d \| -f 1 | grep -qw odoo"
$prepkg = [
"cyrus-sasl",
"textproc/py-libxml2",

View File

@ -0,0 +1,30 @@
#
# install postgres
#
class odoo::postgres
(
)
inherits odoo::params
{
package {$postgrespkgs:
ensure => installed
} ->
exec {$postgresinitcmd:
user => $postgresuser,
creates => $postgresdatadir
} ->
service {"postgresql":
ensure => running
} ->
exec {$postgresusercreate:
user => $postgresuser,
unless => $postgresuserexists
}
}