Compare commits
3 Commits
e7ff039400
...
077611de70
Author | SHA1 | Date |
---|---|---|
Tobias Herre | 077611de70 | |
Tobias Herre | a320df4b1b | |
Tobias Herre | 4bc4d68d5d |
|
@ -129,13 +129,13 @@ inherits odoo::params {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
exec {"install_pre":
|
exec {"install_pre":
|
||||||
command => "/bin/ls > /dev/null && $preenv && $pip_cmd install -r $odoo_systemdir/requirements.txt",
|
command => "/bin/ls > /dev/null && $preenv && $pip_cmd install -r $odoo_systemdir/requirements.txt",
|
||||||
require => [
|
require => [
|
||||||
Vcsrepo["$odoo_systemdir"],
|
Vcsrepo["$odoo_systemdir"],
|
||||||
Package[$prepkg],
|
Package[$prepkg],
|
||||||
]
|
],
|
||||||
|
timeout => 1800,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,13 @@ class odoo::params{
|
||||||
|
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'FreeBSD':{
|
'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 = [
|
$prepkg = [
|
||||||
"cyrus-sasl",
|
"cyrus-sasl",
|
||||||
"textproc/py-libxml2",
|
"textproc/py-libxml2",
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue