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 @@
mode: 0700
state: directory
with_items:
- "{{ hostvars[borgbackup_target_host]['borgbackup_pool'] }}"
- "{{ hostvars[borgbackup_target_host]['borgbackup_pool'] }}/{{ borgbackup_source_host }}"
- "{{ hostvars[borgbackup_target_host]['borgbackup_pool'] | default(borgbackup_pool) }}"
- "{{ hostvars[borgbackup_target_host]['borgbackup_pool'] | default(borgbackup_pool) }}/{{ borgbackup_source_host }}"
- name: Add public key
authorized_key:
user: "borgbackup"
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.
Finish editing this message first!
Please register or to comment