Compare commits

1 Commits

Author SHA1 Message Date
renovate[bot]
0fd5f5dd54 Update actions/checkout action to v5 2025-08-14 13:03:26 +00:00
5 changed files with 8 additions and 54 deletions

View File

@@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Lint Ansible Playbook
uses: ansible/ansible-lint-action@main

View File

@@ -1,6 +1,4 @@
---
borgmatic_enabled: true
borgmatic_ssh_keys: []
borgmatic_config:

View File

@@ -20,8 +20,8 @@
- name: Initialize borg check_repositories
ansible.builtin.shell: "borgmatic init --encryption repokey"
environment:
PATH: "{{ ansible_facts['env'].PATH}}:/usr/local/bin"
environment:
PATH: "{{ ansible_env.PATH}}:/usr/local/bin"
- name: Enable borgmatic.timer
ansible.builtin.systemd:

View File

@@ -2,17 +2,8 @@
- name: Borgmatic - Get OS specific vars
include_vars: "{{ item }}"
with_first_found:
- "os/{{ ansible_facts['os_family'] }}/{{ ansible_facts['distribution_major_version'] }}.yaml"
- "os/{{ ansible_facts['os_family'] }}.yaml"
- name: Borgmatic - Install and configure
when: borgmatic_enabled | default(true)
block:
- include_tasks: install.yaml
- include_tasks: config.yaml
- include_tasks: init.yaml
- name: Borgmatic - Uninstall and clean up
when: not borgmatic_enabled | default(true)
block:
- include_tasks: uninstall.yaml
- "os/{{ ansible_os_family }}/{{ ansible_distribution_major_version }}.yaml"
- "os/{{ ansible_os_family }}.yaml"
- include_tasks: install.yaml
- include_tasks: config.yaml
- include_tasks: init.yaml

View File

@@ -1,35 +0,0 @@
---
- name: Disable borgmatic.timer if installed
ansible.builtin.systemd:
name: borgmatic.timer
enabled: false
state: stopped
failed_when: false
- name: Remove borgmatic systemd units
ansible.builtin.file:
path: "/etc/systemd/system/{{ item }}"
state: absent
loop:
- borgmatic.service
- borgmatic.timer
when:
- borgmatic_install_from_pip | default(false)
notify: reload systemd
- name: Uninstall borgmatic package
ansible.builtin.package:
name: borgmatic
state: absent
when:
- not (borgmatic_install_from_pip | default(false))
- name: Remove borgmatic configuration directory
ansible.builtin.file:
path: "/etc/borgmatic"
state: absent
- name: Remove borgmatic files in the root user home
ansible.builtin.file:
path: "/root/.borgmatic"
state: absent