From f026c4e012346dd6ce6bdd748994fb73dd669f19 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Thu, 7 Mar 2019 13:43:42 -0500 Subject: [PATCH] Stop sending hugo logs to a specific file Let it log to the foreground, it'll be picked up by systemd/journalctl. Change-Id: I3fe5ca758dfc350e7ca12265007a0b70c132691c --- roles/website/files/hugo.logrotate | 7 ------- roles/website/tasks/hugo.yaml | 13 ------------- roles/website/templates/hugo.service.j2 | 2 +- 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 roles/website/files/hugo.logrotate diff --git a/roles/website/files/hugo.logrotate b/roles/website/files/hugo.logrotate deleted file mode 100644 index 5947a53..0000000 --- a/roles/website/files/hugo.logrotate +++ /dev/null @@ -1,7 +0,0 @@ -/var/log/hugo/*.log { - rotate 14 - size 10M - missingok - compress - copytruncate -} diff --git a/roles/website/tasks/hugo.yaml b/roles/website/tasks/hugo.yaml index 1c533c8..f75e8ee 100644 --- a/roles/website/tasks/hugo.yaml +++ b/roles/website/tasks/hugo.yaml @@ -31,19 +31,6 @@ shell: /sbin/nologin home: "{{ hugo_directory }}" - - name: Create log directory for Hugo - file: - path: /var/log/hugo - state: directory - owner: hugo - group: hugo - mode: 0750 - - - name: Set up logrotate for Hugo - copy: - src: hugo.logrotate - dest: /etc/logrotate.d/hugo - - name: Download Hugo release tarball get_url: url: "{{ hugo_release }}" diff --git a/roles/website/templates/hugo.service.j2 b/roles/website/templates/hugo.service.j2 index a90d65d..df93420 100644 --- a/roles/website/templates/hugo.service.j2 +++ b/roles/website/templates/hugo.service.j2 @@ -6,7 +6,7 @@ After=network.target User=hugo Group=hugo Type=simple -ExecStart=/usr/local/bin/hugo server --source /opt/ara-infra/website --themesDir {{ hugo_directory }}/themes --log --logFile /var/log/hugo/hugo.log --baseURL "https://ara.recordsansible.org/" --appendPort=false +ExecStart=/usr/local/bin/hugo server --source /opt/ara-infra/website --themesDir {{ hugo_directory }}/themes --baseURL "https://ara.recordsansible.org/" --appendPort=false ProtectSystem=yes ProtectHome=no NoNewPrivileges=yes