To be sure that ~/.ssh directory exist
Change-Id: I42c94f77e14e4fc4d883b425b9fb2ac2d9602497
Related-PROD: PROD-19111
diff --git a/zookeeper/backup.sls b/zookeeper/backup.sls
index d7bf32a..dcca46a 100644
--- a/zookeeper/backup.sls
+++ b/zookeeper/backup.sls
@@ -126,6 +126,14 @@
- user: zookeeper_user
- pkg: zookeeper_backup_server_packages
+{{ backup.backup_dir }}/.ssh:
+ file.directory:
+ - mode: 700
+ - user: zookeeper
+ - group: zookeeper
+ - require:
+ - user: zookeeper_user
+
{{ backup.backup_dir }}/.ssh/authorized_keys:
file.managed:
- user: zookeeper
@@ -134,6 +142,7 @@
- source: salt://zookeeper/files/backup/authorized_keys
- require:
- file: {{ backup.backup_dir }}/full
+ - file: {{ backup.backup_dir }}/.ssh
zookeeper_server_script:
file.managed: