Add bash completion and labels to repositories

This commit is contained in:
phil 2023-04-09 09:25:16 +02:00
parent 72555d15c4
commit f4d6366253
2 changed files with 8 additions and 6 deletions

View file

@ -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"