Skip to content
Snippets Groups Projects
Verified Commit fa820a0a authored by David Mehren's avatar David Mehren
Browse files

Default to role variables if no host-specific backup path is defined

parent 5a41bf58
No related branches found
No related tags found
No related merge requests found
...@@ -38,11 +38,11 @@ ...@@ -38,11 +38,11 @@
mode: 0700 mode: 0700
state: directory state: directory
with_items: with_items:
- "{{ hostvars[borgbackup_target_host]['borgbackup_pool'] }}" - "{{ hostvars[borgbackup_target_host]['borgbackup_pool'] | default(borgbackup_pool) }}"
- "{{ hostvars[borgbackup_target_host]['borgbackup_pool'] }}/{{ borgbackup_source_host }}" - "{{ hostvars[borgbackup_target_host]['borgbackup_pool'] | default(borgbackup_pool) }}/{{ borgbackup_source_host }}"
- name: Add public key - name: Add public key
authorized_key: authorized_key:
user: "borgbackup" user: "borgbackup"
key: "{{borgbackup_source_key}}" key: "{{borgbackup_source_key}}"
key_options: "command=\"cd {{ hostvars[borgbackup_target_host]['borgbackup_pool'] }}/{{ borgbackup_source_host }};borg serve --restrict-to-path {{ hostvars[borgbackup_target_host]['borgbackup_pool'] }}/{{ borgbackup_source_host }}\",restrict" key_options: "command=\"cd {{ hostvars[borgbackup_target_host]['borgbackup_pool'] | default(borgbackup_pool) }}/{{ borgbackup_source_host }};borg serve --restrict-to-path {{ hostvars[borgbackup_target_host]['borgbackup_pool'] | default(borgbackup_pool) }}/{{ borgbackup_source_host }}\",restrict"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment