diff --git a/roles/test-beat/tasks/linux/main.yml b/roles/test-beat/tasks/linux/main.yml index 9857d1d..38935b5 100644 --- a/roles/test-beat/tasks/linux/main.yml +++ b/roles/test-beat/tasks/linux/main.yml @@ -25,6 +25,18 @@ dest: '{{ beat_cfg }}' mode: 0600 +- name: Create dir for systemd overrides + file: + path: '/etc/systemd/system/{{ beat_service_name }}.service.d' + state: directory + mode: 0755 + +- name: Override log options for systemd to get a log file + template: + src: systemd.debug.conf + dest: '/etc/systemd/system/{{ beat_service_name }}.service.d/debug.conf' + mode: 0600 + - name: 'Start {{ beat_service_name }} service' service: name: '{{ beat_service_name }}' diff --git a/roles/test-beat/templates/systemd.debug.conf b/roles/test-beat/templates/systemd.debug.conf new file mode 100644 index 0000000..017c088 --- /dev/null +++ b/roles/test-beat/templates/systemd.debug.conf @@ -0,0 +1,2 @@ +[Service] +Environment="BEAT_LOG_OPTS="