Puppet Class: odoo::repo10
- Defined in:
- manifests/repo10.pp
Overview
Install a repository to install an Odoo 10 package from.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'manifests/repo10.pp', line 22
class odoo::repo10 (
$ensure = present,
$descr = 'Odoo Nightly repository',
$key_id = '5D134C924CB06330DCEFE2A1DEF2A2198183CBB5',
$key_url = 'https://nightly.odoo.com/odoo.key',
$pkg_url = undef,
$release = './',
$repos = '',
) {
case $::osfamily {
'RedHat': {
if $pkg_url != undef {
$baseurl = $pkg_url
} else {
$baseurl = 'http://nightly.odoo.com/10.0/nightly/rpm/'
}
yumrepo { 'odoo':
ensure => $ensure,
descr => $descr,
baseurl => $baseurl,
enabled => 1,
gpgcheck => 0,
}
}
'Debian': {
include apt
include apt::update
apt::key {'odookey':
ensure => $ensure,
id => $key_id,
source => $key_url,
before => Apt::Source['odoo'],
}
if $pkg_url != undef {
$location = $pkg_url
} else {
$location = 'http://nightly.odoo.com/10.0/nightly/deb/'
}
apt::source {'odoo':
ensure => $ensure,
location => $location,
comment => $descr,
release => $release,
repos => $repos,
include => {
'src' => false,
},
notify => Exec['update-odoo-repos'],
}
# Required to wrap apt_update
exec {'update-odoo-repos':
refreshonly => true,
command => '/bin/true',
require => Exec['apt_update'],
}
}
default: {
warning("OS family ${::osfamily} not supported")
}
}
}
|