Puppet Class: bareos::repository
- Inherits:
- bareos
- Defined in:
- manifests/repository.pp
Overview
Class: bareos::repository
This class installs bareos repositories. Required for installation based on package
Variables
Refer to bareos class for the variables defined here.
Usage
This class is not intended to be used directly. It’s automatically included by bareos main class. This class uses default file and exec defines to avoid more Example42 dependencies (sigh)
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'manifests/repository.pp', line 17
class bareos::repository inherits bareos {
case $::operatingsystem {
redhat,centos,fedora,Scientific,OracleLinux: {
file { 'bareos.repo':
path => '/etc/yum.repos.d/bareos.repo',
content => template('bareos/bareos.repo.erb'),
}
}
Debian,Ubuntu: {
file { '/etc/apt/sources.list.d/bareos.list':
content => "deb http://download.bareos.org/bareos/release/${bareos::repo_flavour}/${bareos::repo_distro} /\n"
}
~>
exec { 'bareos-key':
command => "/usr/bin/wget -q http://download.bareos.org/bareos/release/${bareos::repo_flavour}/${bareos::repo_distro}/Release.key -O- | /usr/bin/apt-key add -",
refreshonly => true
}
~>
exec { 'update-apt':
command => '/usr/bin/apt-get update',
refreshonly => true
}
}
default: { fail("${::hostname}: This module does not support operatingsystem ${::operatingsystem}") }
}
}
|