Create borgmatic configuration directory is not exists
This commit is contained in:
parent
1aeb58245e
commit
7e0278debb
1 changed files with 9 additions and 1 deletions
|
@ -1,4 +1,12 @@
|
|||
---
|
||||
- name: Ensure /etc/borgmatic exists
|
||||
ansible.builtin.file:
|
||||
path: /etc/borgmatic
|
||||
state: directory
|
||||
mode: "0700"
|
||||
owner: "{{ borg_user }}"
|
||||
group: "{{ borg_group }}"
|
||||
|
||||
- name: "Borg | Copy borgmatic configuration"
|
||||
ansible.builtin.template:
|
||||
src: config.yaml.j2
|
||||
|
@ -40,7 +48,7 @@
|
|||
|
||||
- name: "Borg | Export repo key"
|
||||
ansible.builtin.command:
|
||||
cmd: "borg key export ssh://{{ borgbase_repo.repo_id }}@{{ borgbackup_ssh_host }}/./repo borgbase_{{ inventory_hostname }}"
|
||||
cmd: "borg key export ssh://{{ borgbase_repo.repo_id }}@{{ borgbackup_ssh_host }}/./repo borgbase"
|
||||
chdir: "{{ borg_key_export_path }}"
|
||||
when: borgbase is defined and borgbase
|
||||
|
||||
|
|
Loading…
Reference in a new issue