role_borgmatic/tasks/installation.yml

31 lines
608 B
YAML
Raw Normal View History

2023-03-06 23:13:54 +00:00
---
# tasks file for borgmatic
2023-12-18 16:12:52 +00:00
- name: Installer les prérequis
2023-03-06 23:13:54 +00:00
ansible.builtin.apt:
state: latest
2023-12-18 16:12:52 +00:00
name:
- pipx
- pkg-config
2023-03-06 23:13:54 +00:00
become: true
- name: Installer borgbackup
2023-12-18 16:12:52 +00:00
community.general.pipx:
2023-03-06 23:13:54 +00:00
state: latest
2023-12-18 16:12:52 +00:00
name: borgbackup
install_deps: true
include_injected: true
2023-03-06 23:13:54 +00:00
become: true
2023-12-18 16:12:52 +00:00
- name: Installer borgmatic
community.general.pipx:
state: inject
name: borgbackup
inject_packages: borgmatic
2023-03-06 23:13:54 +00:00
- name: Créer l'exemple de configuration
ansible.builtin.command:
cmd: generate-borgmatic-config
creates: /etc/borgmatic/config.yaml
become: true