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
|
|
|
|
- build-essential
|
|
|
|
- libacl1-dev
|
|
|
|
- libacl1
|
|
|
|
- libb2-dev
|
|
|
|
- liblz4-dev
|
|
|
|
- libssl-dev
|
|
|
|
- libzstd-dev
|
|
|
|
- pkg-config
|
|
|
|
- python3
|
|
|
|
- python3-dev
|
|
|
|
- python3-pkgconfig
|
2023-03-06 23:13:54 +00:00
|
|
|
become: true
|
|
|
|
|
2023-12-18 16:12:52 +00:00
|
|
|
- name: Installer les paquets
|
|
|
|
community.general.pipx:
|
2023-03-06 23:13:54 +00:00
|
|
|
state: latest
|
2023-12-18 16:12:52 +00:00
|
|
|
name: "{{ item }}"
|
|
|
|
install_deps: true
|
|
|
|
include_injected: true
|
2023-03-06 23:13:54 +00:00
|
|
|
become: true
|
2023-12-18 16:12:52 +00:00
|
|
|
environment:
|
|
|
|
PIPX_HOME: /opt/pipx
|
|
|
|
PIPX_BIN_DIR: /usr/local/bin
|
|
|
|
loop:
|
|
|
|
- borgbackup
|
|
|
|
- borgmatic
|
2023-03-06 23:13:54 +00:00
|
|
|
|
2023-12-18 16:12:52 +00:00
|
|
|
- name: S'assurer que les paquets sont inclus dans le path
|
|
|
|
ansible.builtin.command:
|
|
|
|
cmd: pipx ensurepath
|
2023-03-06 23:13:54 +00:00
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Créer l'exemple de configuration
|
|
|
|
ansible.builtin.command:
|
2023-12-18 16:12:52 +00:00
|
|
|
cmd: borgmatic config generate
|
2023-03-06 23:13:54 +00:00
|
|
|
creates: /etc/borgmatic/config.yaml
|
|
|
|
become: true
|