mirror of
https://github.com/krislamo/puppet-fluentd
synced 2025-09-13 08:59:29 +00:00
Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bfa6de193e | ||
|
5f3aca9597 | ||
|
ee3a8e968a | ||
|
3f26736084 | ||
|
d27479eb17 | ||
|
c8046ee2c6 | ||
|
fc94e7ba6f | ||
|
3fb5293880 | ||
|
e5650f47d1 | ||
|
49848b2afd | ||
|
f4c24ee881 | ||
|
2e789170a0 | ||
|
22a9578a88 |
16
.travis.yml
16
.travis.yml
@@ -6,12 +6,16 @@ script: bundle exec rake validate && bundle exec rake lint && bundle exec rake s
|
|||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
include:
|
include:
|
||||||
- rvm: 1.9.3
|
- rvm: 2.1.10
|
||||||
env: PUPPET_GEM_VERSION="~> 3.0"
|
env: PUPPET_VERSION="~> 3.0"
|
||||||
- rvm: 2.1.5
|
- rvm: 2.1.10
|
||||||
env: PUPPET_GEM_VERSION="~> 3.0"
|
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes"
|
||||||
- rvm: 2.1.6
|
- rvm: 2.2.7
|
||||||
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
|
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes"
|
||||||
|
- rvm: 2.3.4
|
||||||
|
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes"
|
||||||
|
- rvm: 2.4.1
|
||||||
|
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes"
|
||||||
notifications:
|
notifications:
|
||||||
slack:
|
slack:
|
||||||
secure: WVBx/OJqLpX9WXyiejEdnOcAf+5ShWJ2gcyeBCX032iKzPphcdPKqH+jnlFaKjqQCZARbRqzlj/if3FZWAlhWtTrWrcY545dRHcsaGvJ/nMtdHlBUuwUNHipSn+RTXtorsYz0efhJMPye2LMl0HgAp3rEs70XUt8rZOwdedLGVgfWRwM+KixhSf8P08v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VA8EPr196mWLwerF+dExQ2PJhUu/7MAiOgFrIr4/d05iKhj4ivLYBRNN317s2NVo8qyfhPHlfv6PyzhllC/qjClQ2rLOemVhg=
|
||||||
|
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,4 +1,14 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
## 0.5.6
|
||||||
|
* Fixed `conf_dir_manage` parameter call
|
||||||
|
|
||||||
|
## 0.5.5
|
||||||
|
* Added `conf_dir_manage` parameter (Default: false)
|
||||||
|
* Exclusively handle config files into fluentd::conf_dir. Other files not created by puppet, will be deleted
|
||||||
|
|
||||||
|
## 0.5.4
|
||||||
|
* fixed templates/filter.erb
|
||||||
|
* fixed removing of old GPG key for yum repos
|
||||||
|
|
||||||
## 0.5.3
|
## 0.5.3
|
||||||
* update treasure data repo gpg key
|
* update treasure data repo gpg key
|
||||||
|
2
Gemfile
2
Gemfile
@@ -1,6 +1,6 @@
|
|||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
puppetversion = ENV.key?('PUPPET_VERSION') ? "#{ENV['PUPPET_VERSION']}" : ['>= 3.3']
|
ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 4.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
|
||||||
gem 'puppet', puppetversion
|
gem 'puppet', puppetversion
|
||||||
gem 'puppetlabs_spec_helper', '>= 0.8.2'
|
gem 'puppetlabs_spec_helper', '>= 0.8.2'
|
||||||
gem 'puppet-lint', '>= 1.0.0'
|
gem 'puppet-lint', '>= 1.0.0'
|
||||||
|
20
Rakefile
20
Rakefile
@@ -1,8 +1,22 @@
|
|||||||
require 'puppetlabs_spec_helper/rake_tasks'
|
require 'puppetlabs_spec_helper/rake_tasks'
|
||||||
require 'puppet-lint/tasks/puppet-lint'
|
require 'puppet-lint/tasks/puppet-lint'
|
||||||
PuppetLint.configuration.send('disable_80chars')
|
|
||||||
PuppetLint.configuration.send('disable_puppet_url_without_modules')
|
PuppetLint.configuration.log_format = '%{path}:%{line}:%{check}:%{KIND}:%{message}'
|
||||||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
|
PuppetLint.configuration.fail_on_warnings = true
|
||||||
|
PuppetLint.configuration.send('relative')
|
||||||
|
PuppetLint.configuration.send('disable_140chars')
|
||||||
|
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
|
||||||
|
PuppetLint.configuration.send('disable_documentation')
|
||||||
|
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
|
||||||
|
|
||||||
|
exclude_paths = %w(
|
||||||
|
pkg/**/*
|
||||||
|
vendor/**/*
|
||||||
|
.vendor/**/*
|
||||||
|
spec/**/*
|
||||||
|
)
|
||||||
|
PuppetLint.configuration.ignore_paths = exclude_paths
|
||||||
|
PuppetSyntax.exclude_paths = exclude_paths
|
||||||
|
|
||||||
desc "Validate manifests, templates, and ruby files"
|
desc "Validate manifests, templates, and ruby files"
|
||||||
task :validate do
|
task :validate do
|
||||||
|
@@ -5,5 +5,5 @@
|
|||||||
# file installation
|
# file installation
|
||||||
::fluentd::plugin { 'fluent-plugin-elasticsearch':
|
::fluentd::plugin { 'fluent-plugin-elasticsearch':
|
||||||
type => 'file',
|
type => 'file',
|
||||||
source => 'puppet://path/to/plugin'
|
source => 'puppet:///modules/path/to/plugin'
|
||||||
}
|
}
|
||||||
|
@@ -11,9 +11,11 @@ class fluentd::config inherits fluentd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
file { $::fluentd::conf_dir:
|
file { $::fluentd::conf_dir:
|
||||||
ensure => 'directory',
|
ensure => 'directory',
|
||||||
owner => $::fluentd::user_name,
|
recurse => $::fluentd::conf_dir_manage,
|
||||||
group => $::fluentd::user_group,
|
purge => $::fluentd::conf_dir_manage,
|
||||||
mode => '0750',
|
owner => $::fluentd::user_name,
|
||||||
|
group => $::fluentd::user_group,
|
||||||
|
mode => '0750',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -8,6 +8,9 @@
|
|||||||
# [*repo_manage*]
|
# [*repo_manage*]
|
||||||
# Include repository to install recent fluentd (td-agent) from
|
# Include repository to install recent fluentd (td-agent) from
|
||||||
# Default: 'true'
|
# Default: 'true'
|
||||||
|
# [*conf_dir_manage*]
|
||||||
|
# Exclusively handle config files into fluentd::conf_dir. Other files not created by puppet, will be deleted
|
||||||
|
# Default: 'false'
|
||||||
# [*package_ensure*]
|
# [*package_ensure*]
|
||||||
# Package ensure
|
# Package ensure
|
||||||
# Default: 'installed'
|
# Default: 'installed'
|
||||||
@@ -63,6 +66,7 @@ class fluentd (
|
|||||||
$service_enable = $::fluentd::params::service_enable,
|
$service_enable = $::fluentd::params::service_enable,
|
||||||
$config_path = $::fluentd::params::config_path,
|
$config_path = $::fluentd::params::config_path,
|
||||||
$conf_dir = $::fluentd::params::conf_dir,
|
$conf_dir = $::fluentd::params::conf_dir,
|
||||||
|
$conf_dir_manage = $::fluentd::params::conf_dir_manage,
|
||||||
$config_file = $::fluentd::params::config_file,
|
$config_file = $::fluentd::params::config_file,
|
||||||
$user_manage = $::fluentd::params::user_manage,
|
$user_manage = $::fluentd::params::user_manage,
|
||||||
$user_name = $::fluentd::params::user_name,
|
$user_name = $::fluentd::params::user_name,
|
||||||
@@ -91,9 +95,9 @@ class fluentd (
|
|||||||
include '::fluentd::service'
|
include '::fluentd::service'
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
Class['::Fluentd::Repo'] ->
|
Class['::Fluentd::Repo']
|
||||||
Class['::Fluentd::Install'] ->
|
-> Class['::Fluentd::Install']
|
||||||
Class['::Fluentd::User'] ->
|
-> Class['::Fluentd::User']
|
||||||
Class['::Fluentd::Config'] ->
|
-> Class['::Fluentd::Config']
|
||||||
Class['::Fluentd::Service']
|
-> Class['::Fluentd::Service']
|
||||||
}
|
}
|
||||||
|
@@ -11,6 +11,7 @@ class fluentd::params {
|
|||||||
# config params
|
# config params
|
||||||
$config_path = '/etc/td-agent'
|
$config_path = '/etc/td-agent'
|
||||||
$conf_dir = "${config_path}/conf.d"
|
$conf_dir = "${config_path}/conf.d"
|
||||||
|
$conf_dir_manage = false
|
||||||
$config_file = "${config_path}/td-agent.conf"
|
$config_file = "${config_path}/td-agent.conf"
|
||||||
# user params
|
# user params
|
||||||
$user_manage = true
|
$user_manage = true
|
||||||
|
@@ -26,6 +26,7 @@ class fluentd::repo::yum (
|
|||||||
|
|
||||||
exec { 'remove old GPG key':
|
exec { 'remove old GPG key':
|
||||||
command => 'rpm -e --allmatches gpg-pubkey-a12e206f-*',
|
command => 'rpm -e --allmatches gpg-pubkey-a12e206f-*',
|
||||||
|
path => '/bin:/usr/bin/',
|
||||||
onlyif => 'rpm -qi gpg-pubkey-a12e206f-*',
|
onlyif => 'rpm -qi gpg-pubkey-a12e206f-*',
|
||||||
notify => Exec['add GPG key'],
|
notify => Exec['add GPG key'],
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wywygmbh-fluentd",
|
"name": "wywygmbh-fluentd",
|
||||||
"version": "0.5.3",
|
"version": "0.5.6",
|
||||||
"author": "wywy GmbH",
|
"author": "wywy GmbH",
|
||||||
"summary": "Generic module for fluentd (td-agent).",
|
"summary": "Generic module for fluentd (td-agent).",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
<% @config.each do |key, val| -%>
|
<% @config.each do |key, val| -%>
|
||||||
<%- if val.is_a?( Hash ) -%>
|
<%- if val.is_a?( Hash ) -%>
|
||||||
<<%= key -%>>
|
<<%= key -%>>
|
||||||
<%- val.each do |key, val| -%>
|
<%- val.each do |key2, val2| -%>
|
||||||
<%= key -%> <%= val %>
|
<%= key2 -%> <%= val2 %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
</<%= key %>>
|
</<%= key %>>
|
||||||
<%- else -%>
|
<%- else -%>
|
||||||
|
Reference in New Issue
Block a user