From a033842ff41d13b685dbb3cd2b18d2e259501cf0 Mon Sep 17 00:00:00 2001 From: Bruno Travouillon Date: Thu, 31 Aug 2023 11:08:36 -0400 Subject: [PATCH] fix: Allow to define Dir->JobDefs Type Do not enforce the Backup JOB_TYPE in the template, users must be able to configure different types of jobs. --- README.md | 1 + templates/bareos-dir/jobdefs/jobdef.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c0bb3c..3036534 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ bareos_jobdefs: pool: IncrementalFoo full_pool: FullFoo incr_pool: IncrementalFoo + type: JOB_TYPE # optional, defaults to 'Backup' ``` `bareos_jobs`: List of jobs in following format: diff --git a/templates/bareos-dir/jobdefs/jobdef.conf.j2 b/templates/bareos-dir/jobdefs/jobdef.conf.j2 index 060e546..a5eeee8 100644 --- a/templates/bareos-dir/jobdefs/jobdef.conf.j2 +++ b/templates/bareos-dir/jobdefs/jobdef.conf.j2 @@ -1,7 +1,7 @@ # {{ ansible_managed }} JobDefs { Name = "{{ item.name }}" - Type = Backup + Type = {{ item.type | default('Backup') }} Level = {{ item.level }} Client = {{ item.client }} FileSet = "{{ item.fileset }}"