forked from KrisBuytaert/puppet-logstash
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58aac96
commit 2458aa9
Showing
15 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name 'puppet-logstash' | ||
version '0.0.1' | ||
source 'UNKNOWN' | ||
author 'puppet' | ||
license 'UNKNOWN' | ||
summary 'UNKNOWN' | ||
description 'UNKNOWN' | ||
project_page 'UNKNOWN' | ||
|
||
## Add dependencies, if any: | ||
# dependency 'username/name', '>= 1.2.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
logstash | ||
|
||
This is the logstash module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Facter | ||
====== | ||
|
||
Define facts in this directory. | ||
|
||
Sometimes you need to be able to write conditional expressions based | ||
on site-specific data that just isn’t available via Facter. The | ||
solution may be to add a fact to Facter. These additional facts can | ||
then be distributed to Puppet clients and are available for use in | ||
manifests. Learn more at | ||
http://projects.puppetlabs.com/projects/puppet/wiki/Adding_Facts | ||
|
||
File paths should match the fact name; for example, a fact | ||
`hardware_platform`, defined like this: | ||
|
||
Facter.add("hardware_platform") do | ||
setcode do | ||
%x{/bin/uname -i}.chomp | ||
end | ||
end | ||
|
||
Should be found in `hardware_platform.rb` in this directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Functions | ||
========= | ||
|
||
Define functions in this directory. | ||
|
||
File paths should match the function name; for example, a function | ||
`myfunction`, defined like this: | ||
|
||
Puppet::Parser::Functions::newfunction( | ||
:myfunction, | ||
:type => :statement, | ||
:doc => "Documentation here." | ||
) do |vals| | ||
# ... | ||
end | ||
|
||
Should be found in `myfunction.rb` in this directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Providers | ||
========= | ||
|
||
Define providers under this directory. | ||
|
||
File paths should match the resource type name and provider name; for | ||
example, a provider `myprovider` for a resource type `mytype`, defined like this: | ||
|
||
Puppet::Type.type(:mytype).provide(:myprovider) do | ||
desc "Documentation here" | ||
# ... | ||
end | ||
|
||
Should be found in `mytype/myprovider.rb` under this directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Resource Types | ||
============== | ||
|
||
Define resource types in this directory. | ||
|
||
Filenames should match the resource type name; for example, a resource | ||
type `mytype`, defined like this: | ||
|
||
Puppet::Type.newtype(:mytype) do | ||
@doc = "Documentation here." | ||
# ... | ||
end | ||
|
||
Should be found in `mytype.rb` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Manifests | ||
========= | ||
|
||
Module manifest files belong in this directory. | ||
|
||
`init.pp` defines how the module will carry out its tasks in this file. | ||
|
||
Add additional definitions in this directory. Their file paths should match the | ||
definition name; for example, a definition `mydefinition`, defined like this: | ||
|
||
# Definition: mydefinition | ||
# | ||
# This is the mydefinition in the mymodule module. | ||
# | ||
# Parameters: | ||
# | ||
# Actions: | ||
# | ||
# Requires: | ||
# | ||
# Sample Usage: | ||
# | ||
# [Remember: No empty lines between comments and class definition] | ||
define mydefinition { | ||
# ... | ||
} | ||
|
||
Should be found in `mydefinition.pp` in this directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,11 @@ | |
# } | ||
|
||
} | ||
|
||
|
||
|
||
class logstash::server { | ||
|
||
include elasticsearch | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Specs | ||
===== | ||
|
||
The Puppet project uses RSpec for testing. | ||
|
||
For more information on RSpec, see http://rspec.info/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--format | ||
s | ||
--colour | ||
--loadby | ||
mtime | ||
--backtrace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require 'pathname' | ||
dir = Pathname.new(__FILE__).parent | ||
$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib') | ||
|
||
require 'mocha' | ||
require 'puppet' | ||
gem 'rspec', '=1.2.9' | ||
require 'spec/autorun' | ||
|
||
Spec::Runner.configure do |config| | ||
config.mock_with :mocha | ||
end | ||
|
||
# We need this because the RAL uses 'should' as a method. This | ||
# allows us the same behaviour but with a different method name. | ||
class Object | ||
alias :must :should | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Provider Specs | ||
============== | ||
|
||
Define specs for your providers under this directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Resource Type Specs | ||
=================== | ||
|
||
Define specs for your resource types in this directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Templates | ||
========= | ||
|
||
Puppet supports templates and templating via ERB, which is part of the Ruby | ||
standard library and is used for many other projects including Ruby on Rails. | ||
Templates allow you to manage the content of template files, for example | ||
configuration files that cannot yet be managed as a Puppet type. Learn more at | ||
http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating | ||
|
||
You can use templates like this: | ||
|
||
class myclass { | ||
package { mypackage: ensure => latest } | ||
service { myservice: ensure => running } | ||
file { "/etc/myfile": | ||
content => template("mymodule/myfile.erb") | ||
} | ||
} | ||
|
||
The templates are searched for in: | ||
|
||
$templatedir/mymodule/myfile.erb | ||
$modulepath/mymodule/templates/myfile.erb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include logstash |