Skip to content

Commit

Permalink
fixes borg_source_directories and borg_repository not being overwritt…
Browse files Browse the repository at this point in the history
…en by set_fact
  • Loading branch information
terroirman committed Feb 12, 2024
1 parent ad35507 commit 99909dc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tasks/noauto_install_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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] == "/" -%}
Expand All @@ -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
Expand Down

0 comments on commit 99909dc

Please sign in to comment.