Merge "Formulas testing revision 2019/10"
diff --git a/dogtag/files/dogtag_restore.sh b/dogtag/files/dogtag-restore.sh
similarity index 88%
rename from dogtag/files/dogtag_restore.sh
rename to dogtag/files/dogtag-restore.sh
index 511c4d9..b6ad5b1 100644
--- a/dogtag/files/dogtag_restore.sh
+++ b/dogtag/files/dogtag-restore.sh
@@ -4,7 +4,13 @@
 {%- if server.initial_data is defined %}
 {%- set restore_engine = server.initial_data.get('engine', 'rsync') %}
 {%- if restore_engine == 'rsync' %}
-{%- set config_file = 'dogtag/meta/backupninja.yml' %}
+{%- set config_file = {} %}
+{%- set grains_fragment_file = 'dogtag/meta/backupninja.yml' %}
+{%- macro load_grains_file() %}{% include grains_fragment_file ignore missing %}{% endmacro %}
+{%- set grains_yaml = load_grains_file()|load_yaml %}
+{%- if grains_yaml %}
+  {%- set _dummy = config_file.update(grains_yaml) %}
+{%- endif %}
 SERVER_BACKUP_HOST="{{ server.initial_data.source }}"
 SERVER_BACKUP_DIR="{{ server.initial_data.get('home_dir', '/srv/volumes/backup/backupninja') }}"
 SERVER_BACKUP_NAME="{{ server.initial_data.host }}"
diff --git a/metadata/support.yml b/metadata/service/support.yml
similarity index 100%
rename from metadata/support.yml
rename to metadata/service/support.yml