various fix
switch from cron to systemd bypass hadoly anubis protection
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
- name: create repo
|
||||
- name: create repo directory
|
||||
file:
|
||||
path: "{{ borg_remote_dir }}{{ inventory_hostname }}"
|
||||
state: directory
|
||||
@@ -37,15 +37,13 @@
|
||||
delegate_to: "{{ borg_server }}"
|
||||
|
||||
- name: check if repository is created
|
||||
tags: wip
|
||||
delegate_to: "{{ borg_server }}"
|
||||
ansible.builtin.stat:
|
||||
path: "{{ borg_remote_dir }}{{ inventory_hostname }}/config"
|
||||
register: repo_content
|
||||
|
||||
- name: create repository
|
||||
tags: wip
|
||||
when: repo_content.stat.isfile is not defined
|
||||
when: repo_content.stat.exists == false
|
||||
ansible.builtin.command: "/usr/bin/borg init --encryption=keyfile {{ borg_account }}@{{ borg_server }}:{{ borg_remote_dir }}{{ inventory_hostname }}"
|
||||
environment:
|
||||
BORG_PASSPHRASE: "{{ borg_passphrase }}"
|
||||
|
||||
Reference in New Issue
Block a user