parametrize server side backup dir

PROD-18191

Change-Id: Idf9167db6a96af48acb3a65b499bbba9b1c511a5
diff --git a/README.rst b/README.rst
index 312ad4d..3bbcf44 100644
--- a/README.rst
+++ b/README.rst
@@ -40,6 +40,7 @@
         target:
           engine: rsync
           engine_opts: "-av --delete --recursive --safe-links"
+          home_dir: /srv/volumes/backup/backupninja
           host: 10.10.10.208
           user: backupninja
 
diff --git a/backupninja/files/rsync.conf b/backupninja/files/rsync.conf
index 6585112..266eb59 100644
--- a/backupninja/files/rsync.conf
+++ b/backupninja/files/rsync.conf
@@ -25,7 +25,7 @@
 # backup partition mountpoint or backup main folder
 # this doesn't need to be a real partition, but should be at least the
 # main folder where the backup is being stored
-mountpoint = /srv/backupninja
+mountpoint = {{ client.target.get('home_dir', '/srv/backupninja') }}
 
 # folder relative do mountpoint where the backup should be stored
 backupdir = {{ system.name }}.{{ system.domain }}
diff --git a/backupninja/server.sls b/backupninja/server.sls
index ec02d77..3a96c3d 100644
--- a/backupninja/server.sls
+++ b/backupninja/server.sls
@@ -9,9 +9,9 @@
   user.present:
   - name: backupninja
   - system: true
-  - home: /srv/backupninja
+  - home: {{ server.home_dir }}
 
-/srv/backupninja:
+{{ server.home_dir }}:
   file.directory:
   - mode: 700
   - user: backupninja
@@ -49,7 +49,7 @@
     - from="{{ clients|join(',') }}"
 {%- endif %}
   - require:
-    - file: /srv/backupninja
+    - file: {{ server.home_dir }}
 
 {%- endif %}
 
@@ -60,7 +60,7 @@
 {%- for backup_name, backup in node_grains.get('backupninja', {}).get('backup', {}).iteritems() %}
 {%- for fs_include in backup.fs_includes %}
 
-/srv/backupninja/{{ node_name }}{{ fs_include }}:
+{{ server.home_dir }}/{{ node_name }}{{ fs_include }}:
   file.directory:
   - mode: 700
   - user: backupninja