Graylog2 / graylog-ansible-role

Ansible role which installs and configures Graylog
Apache License 2.0
212 stars 126 forks source link

templates/graylog.web.default.j2 variable names #12

Closed storax closed 9 years ago

storax commented 9 years ago

Hi and first of all thanks for this awesome role. It helped me a lot. I just ran into an issue while trying to configure https for the web interface. Changes to the config had no effect. Turns out that all variable names in templates/graylog.web.default.j2 are prefixed GRAYLOG2. The init script /etc/init/graylog-web.conf of the web interface looks like this:

description "Graylog web"
author "TORCH GmbH <hello@torch.sh>"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5

setuid graylog-web
setgid graylog-web
console log

script
  GRAYLOG_WEB_HTTP_ADDRESS="0.0.0.0"
  GRAYLOG_WEB_HTTP_PORT="9000"

  test -f /etc/default/graylog-web && . /etc/default/graylog-web

  export JAVA_OPTS="$GRAYLOG_WEB_JAVA_OPTS"

  exec $GRAYLOG_COMMAND_WRAPPER /usr/share/graylog-web/bin/graylog-web-interface \
    -Dlogger.file=/etc/graylog/web/logback.xml \
    -Dconfig.file=/etc/graylog/web/web.conf \
    -Dpidfile.path=/var/lib/graylog-web/application.pid \
    -Dhttp.address=$GRAYLOG_WEB_HTTP_ADDRESS \
    -Dhttp.port=$GRAYLOG_WEB_HTTP_PORT \
    $GRAYLOG_WEB_ARGS
end script

As you can see all variables are prefixed GRAYLOG in the init script without the 2, thus the default is not effective. I'm using graylog-web version 1.0.2-1.

mariussturm commented 9 years ago

Thanks for the report! Shoul be fixed with https://github.com/Graylog2/graylog-ansible-role/commit/d1bbc7eee01ec8d05f8d5048f9cc6565560d5d55

storax commented 9 years ago

Thank you very much! Fix works fine!