Feat: borgmatic start after boot
This commit is contained in:
@@ -8,12 +8,11 @@
|
||||
- /media/test2/
|
||||
- borg_repository:
|
||||
- /backup/
|
||||
- borgmatic_config_name: config.yaml
|
||||
|
||||
pre_tasks:
|
||||
#- name: Update apt cache
|
||||
# apt:
|
||||
# update_cache: yes
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Create sources directories
|
||||
file:
|
||||
|
||||
@@ -8,7 +8,13 @@ def test_installed_packages(host):
|
||||
assert borgmatic.is_installed
|
||||
|
||||
def test_borgmatic_config(host):
|
||||
config = host.file("/etc/borgmatic/config.yaml")
|
||||
config_file = "/etc/borgmatic/default.yaml"
|
||||
config = host.file(config_file)
|
||||
assert config.exists
|
||||
valid_config = host.run("sudo validate-borgmatic-config")
|
||||
valid_config = host.run(f"sudo validate-borgmatic-config -c {config_file}")
|
||||
assert valid_config.succeeded
|
||||
|
||||
def test_borgmatic_service(host):
|
||||
borgmatic_service = host.service("borgmatic_default")
|
||||
assert borgmatic_service.is_valid
|
||||
assert borgmatic_service.is_enabled
|
||||
|
||||
Reference in New Issue
Block a user