diff --git a/defaults/main.yml b/defaults/main.yml index 26bc571..f58baab 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,8 @@ --- goaccess__state: present +goaccess_systemd: true +goaccess__logfiles: '/var/log/apache2/access.log' +goaccess__webfiles: '/var/www/html/report/index.html' # should we do a version check? (recomended) submodules_versioncheck: false diff --git a/templates/goaccess.service.j2 b/templates/goaccess.service.j2 new file mode 100644 index 0000000..47c1dc4 --- /dev/null +++ b/templates/goaccess.service.j2 @@ -0,0 +1,11 @@ +[Unit] +Description=Goaccess +After=network.target + +[Service] +Restart=always +ExecStart=/usr/bin/goaccess {{ goaccess__logfiles }} --log-format=COMBINED -o {{ goaccess__webfiles }} --real-time-html + +[Install] +WantedBy=multi-user.target +