From 5d2d1be654f5a4a9f657f4b7a877f901dc72eb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Sat, 16 Apr 2022 21:20:11 +0200 Subject: [PATCH] ensure directory exists --- roles/backuphost/tasks/main.yaml | 5 +++++ roles/backupscript/tasks/main.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/roles/backuphost/tasks/main.yaml b/roles/backuphost/tasks/main.yaml index 87355c9..7c243e3 100644 --- a/roles/backuphost/tasks/main.yaml +++ b/roles/backuphost/tasks/main.yaml @@ -39,6 +39,11 @@ name: sshd state: restarted +- name: Create .ssh directory of backup user + file: + path: /home/backup/.ssh + state: directory + - name: Copy authorized_keys copy: src: authorized_keys diff --git a/roles/backupscript/tasks/main.yaml b/roles/backupscript/tasks/main.yaml index cc0741d..fa4ef96 100644 --- a/roles/backupscript/tasks/main.yaml +++ b/roles/backupscript/tasks/main.yaml @@ -50,6 +50,11 @@ enabled: yes name: backup.timer +- name: Create .ssh directory of root user + file: + path: /root/.ssh + state: directory + - name: Copy ssh config copy: src: ssh_config