1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-11-12 21:50:34 +00:00

added debian support

This commit is contained in:
Max Wilhelm 2016-01-23 00:32:29 +01:00
parent 9eb93da056
commit 471eb1bbf2
11 changed files with 70 additions and 25 deletions

View File

@ -265,6 +265,10 @@ bundle install --path vendor/bundle
bundle exec rake spec bundle exec rake spec
bundle exec rake lint bundle exec rake lint
bundle exec rake beaker BEAKER_set=ubuntu-server-1204-x64 bundle exec rake beaker BEAKER_set=ubuntu-server-1204-x64
bundle exec rake beaker BEAKER_set=ubuntu-server-1404-x64
bundle exec rake beaker BEAKER_set=debian-60-x64
bundle exec rake beaker BEAKER_set=debian-78-x64
bundle exec rake beaker BEAKER_set=debian-82-x64
``` ```
## License ## License

View File

@ -20,14 +20,7 @@ class fluentd::params {
case $::osfamily { case $::osfamily {
'Debian': { 'Debian': {
case $::operatingsystem { $repo_manage = true
'Ubuntu': {
$repo_manage = true
}
default: {
fail("Unsupported osfamily: ${::operatingsystem}")
}
}
} }
default: { default: {
fail("Unsupported osfamily: ${::osfamily}") fail("Unsupported osfamily: ${::osfamily}")

View File

@ -1,11 +1,12 @@
# Configure apt::source # Configure apt::source
# #
class fluentd::repo::apt ( class fluentd::repo::apt (
$ensure = 'present', $ensure = 'present',
$location = downcase("http://packages.treasuredata.com/2/${::operatingsystem}/${::lsbdistcodename}"), $location = downcase("http://packages.treasuredata.com/2/${::operatingsystem}/${::lsbdistcodename}"),
$release = $::lsbdistcodename, $release = $::lsbdistcodename,
$repos = 'contrib', $repos = 'contrib',
$key = { $architecture = $::architecture,
$key = {
'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F', 'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F',
'source' => 'http://packages.treasuredata.com/GPG-KEY-td-agent' 'source' => 'http://packages.treasuredata.com/GPG-KEY-td-agent'
}, },
@ -14,10 +15,11 @@ class fluentd::repo::apt (
include '::apt' include '::apt'
apt::source { 'treasure-data': apt::source { 'treasure-data':
ensure => $ensure, ensure => $ensure,
location => $location, location => $location,
release => $release, release => $release,
repos => $repos, architecture => $architecture,
key => $key, repos => $repos,
key => $key,
} }
} }

View File

@ -12,6 +12,10 @@
{ {
"operatingsystem": "Ubuntu", "operatingsystem": "Ubuntu",
"operatingsystemrelease": [ "14.04", "12.04" ] "operatingsystemrelease": [ "14.04", "12.04" ]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [ "6", "7", "8"]
} }
], ],
"dependencies": [ "dependencies": [

View File

@ -14,7 +14,7 @@ RSpec.describe 'fluentd' do
end end
describe service('td-agent') do describe service('td-agent') do
it { is_expected.to be_enabled.with_level(3) } it { is_expected.to be_enabled }
it { is_expected.to be_running } it { is_expected.to be_running }
end end
end end

View File

@ -0,0 +1,10 @@
HOSTS:
debian-60-x64:
roles:
- master
platform: debian-6-amd64
box: puppetlabs/debian-6.0.10-64-nocm
hypervisor: vagrant
CONFIG:
log_level: info
type: foss

View File

@ -0,0 +1,10 @@
HOSTS:
debian-78-x64:
roles:
- master
platform: debian-7-amd64
box: puppetlabs/debian-7.8-64-nocm
hypervisor: vagrant
CONFIG:
log_level: info
type: foss

View File

@ -0,0 +1,10 @@
HOSTS:
debian-82-x64:
roles:
- master
platform: debian-8-amd64
box: puppetlabs/debian-8.2-64-nocm
hypervisor: vagrant
CONFIG:
log_level: info
type: foss

View File

@ -6,5 +6,5 @@ HOSTS:
box: puppetlabs/ubuntu-12.04-64-nocm box: puppetlabs/ubuntu-12.04-64-nocm
hypervisor: vagrant hypervisor: vagrant
CONFIG: CONFIG:
log_level: verbose log_level: info
type: foss type: foss

View File

@ -0,0 +1,10 @@
HOSTS:
ubuntu-server-1404-x64:
roles:
- master
platform: ubuntu-14.04-amd64
box: puppetlabs/ubuntu-14.04-64-nocm
hypervisor: vagrant
CONFIG:
log_level: info
type: foss

View File

@ -7,6 +7,7 @@ describe 'fluentd::repo::apt', :type => :class do
:lsbdistid => 'Ubuntu', :lsbdistid => 'Ubuntu',
:operatingsystem => 'Ubuntu', :operatingsystem => 'Ubuntu',
:lsbdistcodename => 'precise', :lsbdistcodename => 'precise',
:architecture => 'amd64',
} }
} }
@ -14,11 +15,12 @@ describe 'fluentd::repo::apt', :type => :class do
it { it {
should contain_class('apt') should contain_class('apt')
should contain_apt__source('treasure-data').with({ should contain_apt__source('treasure-data').with({
'ensure' => 'present', 'ensure' => 'present',
'location' => 'http://packages.treasuredata.com/2/ubuntu/precise', 'location' => 'http://packages.treasuredata.com/2/ubuntu/precise',
'release' => 'precise', 'release' => 'precise',
'repos' => 'contrib', 'repos' => 'contrib',
'key' => { 'architecture' => 'amd64',
'key' => {
'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F', 'id' => 'C901622B5EC4AF820C38AB861093DB45A12E206F',
'source' => 'http://packages.treasuredata.com/GPG-KEY-td-agent' 'source' => 'http://packages.treasuredata.com/GPG-KEY-td-agent'
} }