mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-12-16 13:20:35 +00:00
Merge pull request #1 from ume3/add-redhat-repository-support
added redhat(yumrepo) support
This commit is contained in:
commit
7ddbe46025
@ -22,6 +22,9 @@ class fluentd::params {
|
|||||||
'Debian': {
|
'Debian': {
|
||||||
$repo_manage = true
|
$repo_manage = true
|
||||||
}
|
}
|
||||||
|
'Redhat': {
|
||||||
|
$repo_manage = true
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("Unsupported osfamily: ${::osfamily}")
|
fail("Unsupported osfamily: ${::osfamily}")
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,9 @@ class fluentd::repo inherits fluentd {
|
|||||||
'Debian': {
|
'Debian': {
|
||||||
include ::fluentd::repo::apt
|
include ::fluentd::repo::apt
|
||||||
}
|
}
|
||||||
|
'RedHat': {
|
||||||
|
include ::fluentd::repo::yum
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
fail("No repo available for ${::osfamily}/${::operatingsystem}")
|
fail("No repo available for ${::osfamily}/${::operatingsystem}")
|
||||||
}
|
}
|
||||||
|
25
manifests/repo/yum.pp
Normal file
25
manifests/repo/yum.pp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Configure yumrepo
|
||||||
|
#
|
||||||
|
class fluentd::repo::yum (
|
||||||
|
$ensure = 'present',
|
||||||
|
$descr = 'TreasureData',
|
||||||
|
$baseurl = 'https://packages.treasuredata.com/2/redhat/$releasever/$basearch',
|
||||||
|
$enabled = '1',
|
||||||
|
$gpgcheck = '1',
|
||||||
|
$gpgkey = 'https://packages.treasuredata.com/GPG-KEY-td-agent',
|
||||||
|
) {
|
||||||
|
|
||||||
|
yumrepo { 'treasure-data':
|
||||||
|
ensure => $ensure,
|
||||||
|
descr => $descr,
|
||||||
|
baseurl => $baseurl,
|
||||||
|
enabled => $enabled,
|
||||||
|
gpgcheck => $gpgcheck,
|
||||||
|
notify => Exec['add GPG key'],
|
||||||
|
}
|
||||||
|
|
||||||
|
exec { 'add GPG key':
|
||||||
|
command => "/usr/bin/rpm --import ${fluentd::repo::yum::gpgkey}",
|
||||||
|
refreshonly => true,
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user