mirror of
https://github.com/krislamo/puppet-fluentd
synced 2024-11-10 04:50:34 +00:00
added fluentd::repo & fluentd::repo::apt
This commit is contained in:
parent
3f09afb262
commit
6463a84e2b
@ -42,7 +42,16 @@
|
|||||||
#
|
#
|
||||||
# Copyright 2015 Your name here, unless otherwise noted.
|
# Copyright 2015 Your name here, unless otherwise noted.
|
||||||
#
|
#
|
||||||
class fluentd {
|
class fluentd (
|
||||||
|
$ensure = $::fluentd::params::ensure,
|
||||||
|
$manage_repo = $::fluentd::params::manage_repo,
|
||||||
|
) inherits fluentd::params {
|
||||||
|
|
||||||
|
validate_string($ensure)
|
||||||
|
validate_bool($manage_repo)
|
||||||
|
|
||||||
|
if $manage_repo {
|
||||||
|
class { '::fluentd::repo': }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
19
manifests/params.pp
Normal file
19
manifests/params.pp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
class fluentd::params {
|
||||||
|
$ensure = 'present'
|
||||||
|
|
||||||
|
case $::osfamily {
|
||||||
|
'Debian': {
|
||||||
|
case $::operatingsystem {
|
||||||
|
'Ubuntu': {
|
||||||
|
$manage_repo = true
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
fail("Unsupported osfamily: ${::operatingsystem}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
fail("Unsupported osfamily: ${::osfamily}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
12
manifests/repo.pp
Normal file
12
manifests/repo.pp
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Configure package repository
|
||||||
|
#
|
||||||
|
class fluentd::repo {
|
||||||
|
case $::osfamily {
|
||||||
|
'Debian': {
|
||||||
|
include ::fluentd::repo::apt
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
fail("No repo available for ${::osfamily}/${::operatingsystem}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
20
manifests/repo/apt.pp
Normal file
20
manifests/repo/apt.pp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Configure apt::source
|
||||||
|
#
|
||||||
|
class fluentd::repo::apt (
|
||||||
|
$ensure = 'present',
|
||||||
|
$location = downcase("http://packages.treasuredata.com/2/${::operatingsystem}/${::lsbdistcodename}"),
|
||||||
|
$release = $::lsbdistcodename,
|
||||||
|
$repos = 'contrib',
|
||||||
|
$key_source = 'https://packages.treasuredata.com/GPG-KEY-td-agent',
|
||||||
|
) {
|
||||||
|
|
||||||
|
include '::apt'
|
||||||
|
|
||||||
|
apt::source { 'treasure-data':
|
||||||
|
ensure => $ensure,
|
||||||
|
location => $location,
|
||||||
|
release => $release,
|
||||||
|
repos => $repos,
|
||||||
|
key_source => $key_source,
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,8 @@
|
|||||||
"project_page": "https://github.com/wywygmbh/puppet-fluentd",
|
"project_page": "https://github.com/wywygmbh/puppet-fluentd",
|
||||||
"issues_url": "https://github.com/wywygmbh/puppet-fluentd/issues",
|
"issues_url": "https://github.com/wywygmbh/puppet-fluentd/issues",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"}
|
{ "name":"puppetlabs-stdlib","version_requirement":">= 1.0.0" },
|
||||||
|
{ "name": "puppetlabs/apt", "version_requirement": ">= 1.8.0 < 3.0.0" }
|
||||||
],
|
],
|
||||||
"data_provider": null
|
"data_provider": null
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user