From f642a9fc54bfa8f155cab64dd83844b64ba84a6a Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Fri, 2 Oct 2009 19:25:51 -0400 Subject: rename stunnel::client to be stunnel::service to be less confusing (a service can be a client in stunnel, and a service can act in server mode, which would be confusing if it was called stunnel::client) --- manifests/init.pp | 4 ++-- templates/client.conf.erb | 47 ---------------------------------------------- templates/service.conf.erb | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 49 deletions(-) delete mode 100644 templates/client.conf.erb create mode 100644 templates/service.conf.erb diff --git a/manifests/init.pp b/manifests/init.pp index ac060ba..7fd770d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -24,7 +24,7 @@ class stunnel { default: { include stunnel::default } } - define client ( $ensure = present, $accept = false, $capath = false, + define service ( $ensure = present, $accept = false, $capath = false, $cafile = false, $cert = false, $chroot = false, $ciphers = false, $client = false, $compress = false, $connect = false, $crlpath = false, $crlfile @@ -51,7 +51,7 @@ class stunnel { file { "/etc/stunnel/${name}.conf": ensure => $ensure, - content => template('stunnel/client.conf.erb'), + content => template('stunnel/service.conf.erb'), owner => root, group => 0, mode => 0600, require => File["/etc/stunnel"], notify => Service[stunnel]; diff --git a/templates/client.conf.erb b/templates/client.conf.erb deleted file mode 100644 index 84b8f17..0000000 --- a/templates/client.conf.erb +++ /dev/null @@ -1,47 +0,0 @@ -; templated stunnel configuration file to be used by puppet stunnel module -; NOTE: any changes you make to this file will be overwritten the next time -; puppet runs, please make configuration changes to this service in puppet - -; Global configuration options -<%= 'pid = ' + real_pid %> -<%- %w{chroot setuid setgid service compression}.each do |v| - if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> -<%= v + " = " + instance_variable_get("@#{v}").to_s %> -<%- - end -end -%> - -; Some performance tunings -<% if socket.is_a? String -%> -<%= 'socket = ' + socket %> -<% elsif socket.is_a? Array -%> -<%= socket.map { |i| "socket = #{i}" }. join("\n") %> -<% end -%> - -<%- %w{debug output syslog}.each do |v| - if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> -<%= v + " = " + instance_variable_get("@#{v}").to_s %> -<%- - end -end -%> - -<%- %w{egd engine enginectrl rndbytes rndfile rndoverwrite}.each do |v| - if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> -<%= v + " = " + instance_variable_get("@#{v}").to_s %> -<%- - end -end -%> - -; Service-level configuration -<%= '[' + name + ']' %> -<%- %w{accept connect capath cafile cert ciphers crlpath crlfile delay enginenum exec - execargs failover ident key local oscp ocspflag options protocol protocolauthentication - protocolhost protocolpassword protocolusername pty retry session sslversion stack - timeoutbusy timeoutclose timeoutconnect timeoutidle transparent verify}.each do |v| - if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> -<%= v + ' = ' + instance_variable_get("@#{v}").to_s %> -<%- - end -end -%> -client = <%= client ? 'yes' : 'no' %> - diff --git a/templates/service.conf.erb b/templates/service.conf.erb new file mode 100644 index 0000000..84b8f17 --- /dev/null +++ b/templates/service.conf.erb @@ -0,0 +1,47 @@ +; templated stunnel configuration file to be used by puppet stunnel module +; NOTE: any changes you make to this file will be overwritten the next time +; puppet runs, please make configuration changes to this service in puppet + +; Global configuration options +<%= 'pid = ' + real_pid %> +<%- %w{chroot setuid setgid service compression}.each do |v| + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + " = " + instance_variable_get("@#{v}").to_s %> +<%- + end +end -%> + +; Some performance tunings +<% if socket.is_a? String -%> +<%= 'socket = ' + socket %> +<% elsif socket.is_a? Array -%> +<%= socket.map { |i| "socket = #{i}" }. join("\n") %> +<% end -%> + +<%- %w{debug output syslog}.each do |v| + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + " = " + instance_variable_get("@#{v}").to_s %> +<%- + end +end -%> + +<%- %w{egd engine enginectrl rndbytes rndfile rndoverwrite}.each do |v| + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + " = " + instance_variable_get("@#{v}").to_s %> +<%- + end +end -%> + +; Service-level configuration +<%= '[' + name + ']' %> +<%- %w{accept connect capath cafile cert ciphers crlpath crlfile delay enginenum exec + execargs failover ident key local oscp ocspflag options protocol protocolauthentication + protocolhost protocolpassword protocolusername pty retry session sslversion stack + timeoutbusy timeoutclose timeoutconnect timeoutidle transparent verify}.each do |v| + if has_variable?(v) and instance_variable_get("@#{v}").to_s != "false" -%> +<%= v + ' = ' + instance_variable_get("@#{v}").to_s %> +<%- + end +end -%> +client = <%= client ? 'yes' : 'no' %> + -- cgit v1.2.3