Add known_hosts to Restic's SSH folder

This commit is contained in:
Sam A. 2023-03-06 13:33:18 +01:00 committed by Sam Al-Sapti
parent 2d11a664b4
commit 9d4c7be801
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
3 changed files with 13 additions and 3 deletions

View file

@ -49,10 +49,11 @@ services:
restic:
file: restic_backup.yml
user: "dc-user"
domain: "rynkeby.skovgaard.tel"
user: dc-user
domain: rynkeby.skovgaard.tel
host_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBLGol2G+a87ssy0nu/STKBZSiGyhZhZKx/ujfe9IeFo
volume_folder: "{{ volume_root_folder }}/restic"
repository: "restic"
repository: restic
version: "1.6.0"
disabled_in_vagrant: true

View file

@ -39,6 +39,14 @@
group: root
mode: '0600'
- name: Create SSH known_hosts file
template:
src: restic.ssh.known_hosts.j2
dest: "{{ services.restic.volume_folder }}/ssh/known_hosts"
owner: root
group: root
mode: '0600'
- name: Setup restic backup
docker_compose:
project_name: restic_backup

View file

@ -0,0 +1 @@
{{ services.restic.domain }} {{ services.restic.host_key }}