1 # == Class: opendaylight::repos
3 # Manages the installation of the OpenDaylight repositories for RedHat and
9 # The name of the debppa repo to configure. Ignored if on a RHEL based system.
10 # Defaults to $::opendaylight::deb_repo
13 # The name of the rpm repo to configure. Ignored if on a Debian based system
14 # Defaults to $::opendaylight::rpm_repo
16 # [*rpm_repo_enabled*]
17 # Flag to indicate if the the rpm repo should be enabled or disabled.
20 # [*rpm_repo_gpgcheck*]
21 # Flag to indicate if the rpm repo should be configured with gpgcheck.
24 class opendaylight::repos (
25 $deb_repo = $::opendaylight::deb_repo,
26 $rpm_repo = $::opendaylight::rpm_repo,
27 $rpm_repo_enabled = 1,
28 $rpm_repo_gpgcheck = 0,
29 ) inherits ::opendaylight {
30 if $::osfamily == 'RedHat' {
31 # Add OpenDaylight's Yum repository
33 # 'ensure' isn't supported with Puppet <3.5
34 # Seems to default to present, but docs don't say
35 # https://docs.puppetlabs.com/references/3.4.0/type.html#yumrepo
36 # https://docs.puppetlabs.com/references/3.5.0/type.html#yumrepo
37 baseurl => "http://cbs.centos.org/repos/nfv7-${rpm_repo}/\$basearch/os/",
38 descr => 'OpenDaylight SDN Controller',
39 enabled => $rpm_repo_enabled,
40 # NB: RPM signing is an active TODO, but is not done. We will enable
41 # this gpgcheck once the RPM supports it.
42 gpgcheck => $rpm_repo_gpgcheck,
44 } elsif ($::osfamily == 'Debian') {
47 # Add ODL ppa repository
48 apt::ppa{ $deb_repo: }
50 fail("Unknown operating system method: ${::osfamily}")