From a092bfd947773281a23419ee0ab62358371b7166 Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Wed, 22 Jan 2020 02:12:24 +0100
Subject: tr/-/_/ in group names.

This avoids

[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set
to allow bad characters in group names by default, this will change, but
still be user configurable on deprecation. This feature will be removed
in version 2.10. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
[WARNING]: Invalid characters were found in group names but not
replaced, use -vvvv to see details
---
 roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'roles/bacula-dir/templates')

diff --git a/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2 b/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2
index ee01930..f2ffd17 100644
--- a/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2
+++ b/roles/bacula-dir/templates/etc/bacula/bacula-dir.conf.j2
@@ -22,7 +22,7 @@ JobDefs {
   Name = DefaultJob
   Type = Backup
   Level = Incremental
-  Storage = {{ hostvars[ groups['bacula-sd'][0] ].inventory_hostname_short }}-sd
+  Storage = {{ hostvars[ groups['bacula_sd'][0] ].inventory_hostname_short }}-sd
   Messages = Standard
   Accurate = yes
   #Rerun Failed Levels = yes
@@ -38,7 +38,7 @@ JobDefs {
   Name = DefaultMySQLJob
   Type = Backup
   Level = Full
-  Storage = {{ hostvars[ groups['bacula-sd'][0] ].inventory_hostname_short }}-sd
+  Storage = {{ hostvars[ groups['bacula_sd'][0] ].inventory_hostname_short }}-sd
   Messages = Standard
   FileSet = SQL
   Schedule = WeeklyCycleAfterBackup
@@ -64,7 +64,7 @@ JobDefs {
   Name = DefaultSlapdJob
   Type = Backup
   Level = Full
-  Storage = {{ hostvars[ groups['bacula-sd'][0] ].inventory_hostname_short }}-sd
+  Storage = {{ hostvars[ groups['bacula_sd'][0] ].inventory_hostname_short }}-sd
   Messages = Standard
   FileSet = LDAP
   Schedule = WeeklyCycleAfterBackup
@@ -125,7 +125,7 @@ Job {
 }
 {% endfor %}
 
-{% for fd in groups['MDA'] | union(groups['webmail']) | union(groups['lists']) | union(groups['bacula-dir']) | union(groups['nextcloud']) | sort %}
+{% for fd in groups['MDA'] | union(groups['webmail']) | union(groups['lists']) | union(groups['bacula_dir']) | union(groups['nextcloud']) | sort %}
 Job {
   Name = {{ hostvars[fd].inventory_hostname_short }}-mysql
   Client = {{ hostvars[fd].inventory_hostname_short }}-fd
@@ -150,7 +150,7 @@ Job {
   Type = Restore
   Client= {{ inventory_hostname_short }}-fd
   FileSet = FileSetRoot
-  Storage = {{ hostvars[ groups['bacula-sd'][0] ].inventory_hostname_short }}-sd
+  Storage = {{ hostvars[ groups['bacula_sd'][0] ].inventory_hostname_short }}-sd
   Pool = Default
   Messages = Standard
   # NOTE: Files are put on the client (FD) that is being restored.
@@ -385,7 +385,7 @@ Client {
 
 
 # Definition of file storage device
-{% for sd in groups['bacula-sd'] | sort %}
+{% for sd in groups['bacula_sd'] | sort %}
 Storage {
   Name = {{ hostvars[sd].inventory_hostname_short }}-sd
   Address = {{ ipsec[ hostvars[sd].inventory_hostname_short ] }}
-- 
cgit v1.2.3