mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2026-03-10 02:24:14 +01:00
No auto init
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# So in different positions in that role we need the user home
|
||||
# Since we cannot be sure that this FSH is compatible we will determine it.
|
||||
- name: Get home dir
|
||||
when:
|
||||
when:
|
||||
- borgbackup_user == "root"
|
||||
- install_backup is not defined or install_backup
|
||||
tags:
|
||||
@@ -18,10 +18,10 @@
|
||||
|
||||
- name: Save the user_info, we need them for the home_dir
|
||||
ansible.builtin.set_fact:
|
||||
backup_user_info: "{{ user_info }}"
|
||||
backup_user_info: "{{ user_info }}"
|
||||
|
||||
- name: Create User if borgbackup_user != "root"
|
||||
when:
|
||||
when:
|
||||
- borgbackup_user == "root"
|
||||
- install_backup is not defined or install_backup
|
||||
tags:
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
- name: Init repository
|
||||
when:
|
||||
- install_backup is not defined or install_backup
|
||||
- borgmatic_initialization_repo is not defined or borgmatic_initialization_repo
|
||||
tags:
|
||||
- install_backup
|
||||
ansible.builtin.command:
|
||||
cmd: "su - {{ borgbackup_user }} -c '/usr/local/bin/borgmatic rcreate --encryption keyfile --append-only'"
|
||||
...
|
||||
# - name: Init repository
|
||||
# when:
|
||||
# - install_backup is not defined or install_backup
|
||||
# - borgmatic_initialization_repo is not defined or borgmatic_initialization_repo
|
||||
# tags:
|
||||
# - install_backup
|
||||
# ansible.builtin.command:
|
||||
# cmd: "su - {{ borgbackup_user }} -c '/usr/local/bin/borgmatic rcreate --encryption keyfile --append-only'"
|
||||
# ...
|
||||
|
||||
Reference in New Issue
Block a user