Add bash completion and labels to repositories
This commit is contained in:
parent
72555d15c4
commit
f4d6366253
2 changed files with 8 additions and 6 deletions
|
@ -5,6 +5,11 @@
|
|||
dest: "/etc/borgmatic/{{ borgmatic_config_name }}"
|
||||
mode: "0600"
|
||||
|
||||
- name: "Borg | Install borgmatic bach completions"
|
||||
ansible.builtin.command:
|
||||
cmd: "borgmatic --bash-completion > /usr/share/bash-completion/completions/borgmatic"
|
||||
creates: /usr/share/bash-completion/completions/borgmatic
|
||||
|
||||
- name: "Borg | Add borgmatic cron job"
|
||||
ansible.builtin.cron:
|
||||
name: "{{ borgmatic_timer_cron_name }}"
|
||||
|
@ -28,7 +33,7 @@
|
|||
|
||||
- name: "Borg | Export repo key"
|
||||
ansible.builtin.command:
|
||||
cmd: "borg key export {{ item }} {{ borg_key_export_path }}/{{ item | replace('ssh://', '') | replace('@', '') | replace('.', '_') | replace('/', '') }}"
|
||||
cmd: "borg key export {{ item.path }} {{ item.label }}"
|
||||
loop: "{{ borg_repository }}"
|
||||
|
||||
- name: "Borg | Save repo key to localhost"
|
||||
|
|
|
@ -17,13 +17,10 @@ location:
|
|||
# Stay in same file system (do not cross mount points).
|
||||
one_file_system: {{ borg_one_file_system }}
|
||||
repositories:
|
||||
{% if borg_repository is iterable and (borg_repository is not string and borg_repository is not mapping) %}
|
||||
{% for repo in borg_repository %}
|
||||
- {{ repo }}
|
||||
- path: {{ repo.path }}
|
||||
label: {{ repo.label }}
|
||||
{% endfor %}
|
||||
{% elif borg_repository is defined and borg_repository is string %}
|
||||
- {{ borg_repository }}
|
||||
{% endif %}
|
||||
|
||||
# Store atime into archive.
|
||||
atime: {{ borgmatic_store_atime }}
|
||||
|
|
Loading…
Reference in a new issue