role_borgmatic/tasks/installation.yml
2023-12-19 11:59:19 +01:00

46 lines
925 B
YAML

---
# tasks file for borgmatic
- name: Installer les prérequis
ansible.builtin.apt:
state: latest
name:
- pipx
- build-essential
- libacl1-dev
- libacl1
- libb2-dev
- liblz4-dev
- libssl-dev
- libzstd-dev
- pkg-config
- python3
- python3-dev
- python3-pkgconfig
become: true
- name: Installer les paquets
community.general.pipx:
state: latest
name: "{{ item }}"
install_deps: true
include_injected: true
become: true
environment:
PIPX_HOME: /opt/pipx
PIPX_BIN_DIR: /usr/local/bin
loop:
- borgbackup
- borgmatic
- name: S'assurer que les paquets sont inclus dans le path
ansible.builtin.command:
cmd: pipx ensurepath
become: true
- name: Créer l'exemple de configuration
ansible.builtin.command:
cmd: borgmatic config generate
creates: /etc/borgmatic/config.yaml
become: true