mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2025-11-16 01:20:10 +01:00
Allow skipping specific parts of the role
Signed-off-by: Leonidas Avdelas <avdelasleonidas@gmail.com>
This commit is contained in:
parent
a960af0cf4
commit
a06365d34b
@ -17,13 +17,15 @@
|
|||||||
owner: "{{ borg_user }}"
|
owner: "{{ borg_user }}"
|
||||||
group: "{{ borg_group }}"
|
group: "{{ borg_group }}"
|
||||||
comment: "{{ borg_ssh_key_comment }}"
|
comment: "{{ borg_ssh_key_comment }}"
|
||||||
|
when: borg_ssh_key_file_path is defined and borg_ssh_key_file_path | length > 0
|
||||||
|
|
||||||
- name: Read SSH key
|
- name: Read SSH key
|
||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
src: "{{ borg_ssh_key_file_path }}.pub"
|
src: "{{ borg_ssh_key_file_path }}.pub"
|
||||||
register: backup_local_ssh_key
|
register: backup_local_ssh_key
|
||||||
|
when: borg_ssh_key_file_path is defined and borg_ssh_key_file_path | length > 0
|
||||||
|
|
||||||
- name: Print key
|
- name: Print key
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "The generated key is: {{ backup_local_ssh_key['content'] | b64decode }}"
|
msg: "The generated key is: {{ backup_local_ssh_key['content'] | b64decode }}"
|
||||||
...
|
when: borg_ssh_key_file_path is defined and borg_ssh_key_file_path | length > 0
|
||||||
|
|||||||
@ -16,4 +16,4 @@
|
|||||||
mode: "0600"
|
mode: "0600"
|
||||||
owner: "{{ borg_user }}"
|
owner: "{{ borg_user }}"
|
||||||
group: "{{ borg_group }}"
|
group: "{{ borg_group }}"
|
||||||
...
|
when: borgmatic_config_name is defined and borgmatic_config_name | length > 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user