summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/init.pp28
-rw-r--r--templates/config.py.erb10
2 files changed, 24 insertions, 14 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index f0e6202..88bec31 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -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' ]:
diff --git a/templates/config.py.erb b/templates/config.py.erb
index b8aa298..ab28920 100644
--- a/templates/config.py.erb
+++ b/templates/config.py.erb
@@ -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