From 52d9dc0f574c9e51b417c6cefeafc56dc7994502 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Mon, 23 Dec 2019 11:30:21 -0600 Subject: [PATCH] restic should log to syslog --- roles/restic/tasks/job.yaml | 2 +- roles/restic/tasks/repo.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/restic/tasks/job.yaml b/roles/restic/tasks/job.yaml index cae7b22..cbb26c4 100644 --- a/roles/restic/tasks/job.yaml +++ b/roles/restic/tasks/job.yaml @@ -54,4 +54,4 @@ weekday: "{{ item.cron.weekday | default(omit) }}" user: "{{ item.cron.user | default('root') }}" state: "{{ item.cron.state | default('present') }}" - job: "{{ restic_bin_path }}/restic-job {{ item.name }}" + job: "( {{ restic_bin_path }}/restic-job {{ item.name }} | logger --id=$$ -t restic-job -p user.info ) 2>&1 | logger --id=$$ -t restic-job -p user.err" diff --git a/roles/restic/tasks/repo.yaml b/roles/restic/tasks/repo.yaml index 6bbab9f..b511e2f 100644 --- a/roles/restic/tasks/repo.yaml +++ b/roles/restic/tasks/repo.yaml @@ -60,4 +60,4 @@ minute: "{{ 60 | random(seed=inventory_hostname) }}" user: root state: present - job: "{{ restic_bin_path }}/restic-tidy {{ item.name }}" + job: "( {{ restic_bin_path }}/restic-tidy {{ item.name }} | logger --id=$$ -t restic-tidy -p user.info ) 2>&1 | logger --id=$$ -t restic-tidy -p user.err"