]> gitweb.fluxo.info Git - puppet-qwebirc.git/commitdiff
Adding proxy-related parameters
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 9 May 2013 20:34:22 +0000 (17:34 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 9 May 2013 20:34:22 +0000 (17:34 -0300)
manifests/init.pp
templates/config.py.erb

index f0e620294c48e177498598d37274f4b9d72de648..88bec3154cc3745ab41837094ba6eb68ba460949 100644 (file)
@@ -1,17 +1,21 @@
 # Based on https://wiki.koumbit.net/QwebIrc
 class qwebirc(
-    $ircserver       = 'irc.myserver.com',
-    $ircport         = '6667',
-    $realname        = 'http://moo.com/',
-    $webirc_mode     = 'None',
-    $base_url        = 'http://foo.foo.org/',
-    $network_name    = 'FooNet',
-    $sslport         = false,
-    $feedback_from   = 'moo@moo.com',
-    $feedback_to     = 'moo@moo.com',
-    $sslfingerprint  = false,
-    $webirc_password = false,
-    $ident           = 'webchat'
+    $ircserver            = 'irc.myserver.com',
+    $ircport              = '6667',
+    $realname             = 'http://moo.com/',
+    $webirc_mode          = 'None',
+    $base_url             = 'http://foo.foo.org/',
+    $network_name         = 'FooNet',
+    $sslport              = false,
+    $feedback_from        = 'moo@moo.com',
+    $feedback_to          = 'moo@moo.com',
+    $sslfingerprint       = false,
+    $webirc_password      = false,
+    $ident                = 'webchat',
+    $args                 = '-n -p 3989',
+    $base_url             = '',
+    $forwarded_for_header = '',
+    $forwarded_for_ips    = ''
 ) {
 
   package { [ 'python-twisted', 'python-openssl', 'python-simplejson', 'mercurial' ]:
index b8aa298081598402f5753185fa33aedb90f41223..ab289206500f2ce03cdb51a97614ab489b85eaed 100644 (file)
@@ -187,11 +187,17 @@ ADMIN_ENGINE_HOSTS = ["127.0.0.1"]
 #         header set this option to the header name, also set
 #         FORWARDED_FOR_IPS.
 #FORWARDED_FOR_HEADER="x-forwarded-for"
+<%- if forwarded_for_header != '' -%>
+FORWARDED_FOR_HEADER="<%= forwarded_for_header %>"
+<%- end -%>
  
 # OPTION: FORWARDED_FOR_IPS
 #         This option specifies the IP addresses that forwarded-for
 #         headers will be accepted from.
 #FORWARDED_FOR_IPS=["127.0.0.1"]
+<%- if forwarded_for_ips != '' -%>
+FORWARDED_FOR_IPS="<%= forwarded_for_ips %>"
+<%- end -%>
 
 # EXECUTION OPTIONS
 # ---------------------------------------------------------------------
@@ -199,7 +205,7 @@ ADMIN_ENGINE_HOSTS = ["127.0.0.1"]
 # OPTION: ARGS (optional)
 #         These arguments will be used as if qwebirc was run directly
 #         with them, see run.py --help for a list of options.
-#ARGS = "-n -p 3989"
+ARGS = "<%= args %>"
 
 # OPTION: SYSLOG_ADDR (optional)
 #         Used in conjunction with util/syslog.py and -s option.
@@ -263,7 +269,7 @@ HTTP_REQUEST_TIMEOUT = 5
 #         requests.
 #         You'd find this useful if you're running multiple qwebirc
 #         instances on the same host.
-STATIC_BASE_URL = ""
+STATIC_BASE_URL = "<%= base_url %>"
 
 # OPTION: DYNAMIC_BASE_URL
 #         This value is used to build the URL for all dynamic HTTP