# 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' ]:
# 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
# ---------------------------------------------------------------------
# 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.
# 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