le1t0-deprec 2.1.6.031 → 2.1.6.032

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  # deprec changelog
2
2
 
3
+ = 2.1.6.032 (Jul 20, 2010)
4
+
5
+ * some small fixes for syslog-ng recipe
6
+
3
7
  = 2.1.6.031 (Jul 20, 2010)
4
8
 
5
9
  * renamed syslog to sysklogd
@@ -3,10 +3,11 @@ Capistrano::Configuration.instance(:must_exist).load do
3
3
  namespace :deprec do
4
4
  namespace :syslog_ng do
5
5
 
6
+ set :syslog_use_default_dynamic_settings, true
6
7
  set :syslog_ng_server, nil
7
8
  set :syslog_ng_server_port, 5140
8
9
  set :syslog_ng_is_server, false # set this option to true if the server(s) mentioned in your recipe are syslog servers
9
- set :syslog_ng_server_max_connections, 100
10
+ set :syslog_ng_server_max_connections, 10
10
11
 
11
12
  set :syslog_ng_options, {
12
13
  :chain_hostnames => 0,
@@ -1,10 +1,10 @@
1
- options {<% syslog_ng_options.reverse_merge(syslog_ng_is_server ? {
1
+ options {<% syslog_ng_options.merge(syslog_ng_is_server && syslog_ng_server && syslog_use_default_dynamic_settings ? {
2
2
  :keep_hostname => :yes
3
3
  } : {}).each do |key, value| %>
4
4
  <%= value.nil? ? "" : "#{key}(#{value.is_a?(String) ? "\"#{value}\"" : value.to_s});" %>
5
5
  <% end %>};
6
6
 
7
- <% syslog_ng_sources.reverse_merge(syslog_ng_is_server ? {
7
+ <% syslog_ng_sources.merge(syslog_ng_is_server && syslog_ng_server && syslog_use_default_dynamic_settings ? {
8
8
  :s_net => "tcp(ip(#{syslog_ng_server}) port(#{syslog_ng_server_port || 5140}) max-connections(#{syslog_ng_server_max_connections || 10}));"
9
9
  } : {}).each do |name, syslog_ng_source_list| %>
10
10
  source <%= name %> {
@@ -22,7 +22,7 @@ filter <%= name %> {
22
22
  };
23
23
  <% end %>
24
24
 
25
- <% syslog_ng_destinations.reverse_merge(syslog_ng_server.nil? || syslog_ng_is_server ? {} : { :d_log_server => "tcp(\"#{syslog_ng_server}\" port(#{syslog_ng_server_port || 5140}));" }).each do |name, syslog_ng_destination_list| %>
25
+ <% syslog_ng_destinations.merge(syslog_ng_server.nil? || syslog_ng_is_server || !syslog_use_default_dynamic_settings ? {} : { :d_log_server => "tcp(\"#{syslog_ng_server}\" port(#{syslog_ng_server_port || 5140}));" }).each do |name, syslog_ng_destination_list| %>
26
26
  destination <%= name %> {
27
27
  <% [syslog_ng_destination_list].flatten.each do |syslog_ng_destination| %>
28
28
  <%= syslog_ng_destination.gsub(/;$/, '') %>;
@@ -30,7 +30,7 @@ destination <%= name %> {
30
30
  };
31
31
  <% end %>
32
32
 
33
- <% syslog_ng_logs.reverse_merge(syslog_ng_is_server ? {
33
+ <% syslog_ng_logs.merge(syslog_ng_is_server && syslog_use_default_dynamic_settings ? {
34
34
  :s_net => {
35
35
  :df_daemons => {
36
36
  :filters => :f_daemons,
@@ -38,8 +38,8 @@ destination <%= name %> {
38
38
  }
39
39
  }
40
40
  } : {}).each do |source_name, destinations_filters|
41
- if source_name == :s_all && syslog_ng_server
42
- destinations_filters.reverse_merge!(
41
+ if source_name == :s_all && syslog_ng_server && syslog_use_default_dynamic_settings && !syslog_ng_is_server
42
+ destinations_filters.merge!(
43
43
  [ :df_daemons, :d_log_server ] => { :filters => :f_daemons, :flags => :final})
44
44
  end
45
45
  destinations_filters.each do |destinations, filters| %>
@@ -55,4 +55,4 @@ log {
55
55
  flags(<%= flag %>);
56
56
  <% end %>
57
57
  };
58
- <% end %>
58
+ <% end end %>
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 2
7
7
  - 1
8
8
  - 6
9
- - 31
10
- version: 2.1.6.031
9
+ - 32
10
+ version: 2.1.6.032
11
11
  platform: ruby
12
12
  authors:
13
13
  - Le1t0