To be sure that ~/.ssh directory exist
Change-Id: I2374bfb3a9ffc648dc8dda5e1ab6acd48173edab
Related-PROD: PROD-19112
diff --git a/cassandra/backup.sls b/cassandra/backup.sls
index ba217f3..fd1cacd 100644
--- a/cassandra/backup.sls
+++ b/cassandra/backup.sls
@@ -145,6 +145,14 @@
- user: cassandra_user
- pkg: cassandra_backup_server_packages
+{{ backup.backup_dir }}/.ssh:
+ file.directory:
+ - mode: 700
+ - user: cassandra
+ - group: cassandra
+ - require:
+ - user: cassandra_user
+
{{ backup.backup_dir }}/.ssh/authorized_keys:
file.managed:
- user: cassandra
@@ -153,6 +161,7 @@
- source: salt://cassandra/files/backup/authorized_keys
- require:
- file: {{ backup.backup_dir }}/full
+ - file: {{ backup.backup_dir }}/.ssh
cassandra_server_script:
file.managed: