mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2024-11-19 19:07:42 +01:00
fixes borg_source_directories and borg_repository not being overwritten by set_fact
This commit is contained in:
parent
ad35507f7b
commit
99909dc87c
@ -55,16 +55,20 @@
|
||||
|
||||
- name: Modify borg_source_directories to reflect path in container
|
||||
ansible.builtin.set_fact:
|
||||
borg_source_directories: >-
|
||||
borg_source_directories_tmp: >-
|
||||
{%- set sources = [] -%}
|
||||
{%- for source in borg_source_directories -%}
|
||||
{%- set _ = sources.append("/sources" + source) -%}
|
||||
{%- endfor -%}
|
||||
{{ sources }}
|
||||
|
||||
- name: Overwrite borg_source_directories fact
|
||||
ansible.builtin.set_fact:
|
||||
borg_source_directories: "{{ borg_source_directories_tmp }}"
|
||||
|
||||
- name: Modify borg_repository to reflect path in container
|
||||
ansible.builtin.set_fact:
|
||||
borg_repository: >-
|
||||
borg_repository_tmp: >-
|
||||
{%- set repositories = [] -%}
|
||||
{%- for repo in borg_repository -%}
|
||||
{%- if repo[0] == "/" -%}
|
||||
@ -76,6 +80,10 @@
|
||||
{{ repositories }}
|
||||
borg_repository_flat: "{{ borg_repository | join('|') }}"
|
||||
|
||||
- name: Overwrite borg_repository fact
|
||||
ansible.builtin.set_fact:
|
||||
borg_repository: "{{ borg_repository_tmp }}"
|
||||
|
||||
- name: Check if ssh repo in the list
|
||||
when:
|
||||
- not borg_ssh_private_key
|
||||
|
Loading…
Reference in New Issue
Block a user