|
@@ -69,7 +69,12 @@
|
|
src: '{{ item }}'
|
|
src: '{{ item }}'
|
|
loop: "{{ _host_keys_files.results | map(attribute='path') | list }}"
|
|
loop: "{{ _host_keys_files.results | map(attribute='path') | list }}"
|
|
register: _host_keys_base64
|
|
register: _host_keys_base64
|
|
-- name: decode host keys
|
|
+- name: check if repository is initialized
|
|
|
|
+ stat:
|
|
|
|
+ path: '{{ _repo_dir.path }}/config'
|
|
|
|
+ register: _repository_config_file
|
|
|
|
+- name: decode host keys & set return variables
|
|
set_fact:
|
|
set_fact:
|
|
borgbackup_sshd_host_keys: >-
|
|
borgbackup_sshd_host_keys: >-
|
|
{{ _host_keys_base64.results | map(attribute='content') | map('b64decode') | map('trim') | list }}
|
|
{{ _host_keys_base64.results | map(attribute='content') | map('b64decode') | map('trim') | list }}
|
|
|
|
+ borgbackup_sshd_repository_initialized: '{{ _repository_config_file.stat.exists }}'
|