diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-08-05 19:12:30 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-08-05 19:12:30 +0000 |
commit | d121b1f06e40067c499a1a8ef9e805298c20c9a2 (patch) | |
tree | 0a2c0931e2b755de86234de386485345118beb54 /lib | |
parent | 1e6c2baffb7605da2bc40a0a49c267c51a54a056 (diff) | |
download | puppet-d121b1f06e40067c499a1a8ef9e805298c20c9a2.tar.gz puppet-d121b1f06e40067c499a1a8ef9e805298c20c9a2.tar.xz puppet-d121b1f06e40067c499a1a8ef9e805298c20c9a2.zip |
Removing the code from #745 until it can pass some basic tests
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2749 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/provider/syslog/parsed.rb | 40 | ||||
-rw-r--r-- | lib/puppet/type/syslog.rb | 29 |
2 files changed, 0 insertions, 69 deletions
diff --git a/lib/puppet/provider/syslog/parsed.rb b/lib/puppet/provider/syslog/parsed.rb deleted file mode 100644 index 9904c673a..000000000 --- a/lib/puppet/provider/syslog/parsed.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'puppet/provider/parsedfile' - -# The default target -# We should be able to override this by setting it explicitly in Facter -case Facter.value(:syslogconf) -when nil: - syslogconf = "/etc/syslog.conf" -else - syslogconf = Facter.value(:syslogconf) -end - -Puppet::Type.type(syslog).provide(:parsed, - :parent => Puppet::Provider::ParsedFile, - :default_target => syslogconf, - :filetype => :flat -) do -text_line :comment, :match => /^#/ -text_line :blank, :match => /^\s+/ - -record_line :parsed, :fields => %w{source target}, - :post_parse => proc { |hash| - if hash[:source] =~ /;/ - sources = hash[:source].split(";"); - sources.each { |level| - if level[:facility] =~ /\./ - names = level[:facility].split("\.") - hash[:facility] = names.shift - hash[:priority] = names - end - } - end - } - :pre_gen => proc { |hash| - if hash[:alias] - names = [hash[:name], hash[:alias]].flatten - hash[:name] = [hash[:name], hash[:alias]].flatten.join(",") - hash.delete(:alias) - end - } -end diff --git a/lib/puppet/type/syslog.rb b/lib/puppet/type/syslog.rb deleted file mode 100644 index b685c4138..000000000 --- a/lib/puppet/type/syslog.rb +++ /dev/null @@ -1,29 +0,0 @@ -module Puppet - newtype(:syslog) do - @doc = "Installs and manages syslog config files for syslogd. - Facilities and levels when unspecified default to *. - - Example - syslog { logging: - facility => \"local0\", - level => *, - target => \"/var/log/local0.log\" - } - - To allow for multiple targets, pass target as an array." - - ensurable - - newproperty(:facility) - desc "The facility at which logging happens. See syslog.conf(5) for details" - end - - newproperty(:level) - desc "The level at which logging happens" - end - - newproperty(:target) - desc "The file or host to which logging happens" - end - end -end |