feat: Go to pipx
This commit is contained in:
parent
0fc8eb6a4b
commit
8dbec24a3b
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
- name: Créer le dépôt
|
- name: Créer le dépôt
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: borg init -e repokey-blake2 {{ item.path }}
|
cmd: sudo borgmatic init --encryption repokey
|
||||||
become: true
|
become: true
|
||||||
loop: "{{ borgmatic_repositories }}"
|
loop: "{{ borgmatic_repositories }}"
|
||||||
register: borg_init
|
register: borg_init
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: u=rw,g=,o=
|
mode: u=rw,g=,o=
|
||||||
|
validate: borgmatic config validate --config %s
|
||||||
become: true
|
become: true
|
||||||
notify: Créer le dépôt
|
notify: Créer le dépôt
|
||||||
|
|
||||||
|
@ -1,27 +1,45 @@
|
|||||||
---
|
---
|
||||||
# tasks file for borgmatic
|
# tasks file for borgmatic
|
||||||
|
|
||||||
- name: Installer python3-pip
|
- name: Installer les prérequis
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: python3-pip
|
|
||||||
state: latest
|
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
|
become: true
|
||||||
|
|
||||||
- name: Installer borgbackup
|
- name: Installer les paquets
|
||||||
ansible.builtin.apt:
|
community.general.pipx:
|
||||||
name: borgbackup
|
|
||||||
state: latest
|
state: latest
|
||||||
default_release: "{{ borgmatic_distribution_release }}-backports"
|
name: "{{ item }}"
|
||||||
|
install_deps: true
|
||||||
|
include_injected: true
|
||||||
become: true
|
become: true
|
||||||
|
environment:
|
||||||
|
PIPX_HOME: /opt/pipx
|
||||||
|
PIPX_BIN_DIR: /usr/local/bin
|
||||||
|
loop:
|
||||||
|
- borgbackup
|
||||||
|
- borgmatic
|
||||||
|
|
||||||
- name: Installer le paquet avec pip
|
- name: S'assurer que les paquets sont inclus dans le path
|
||||||
ansible.builtin.pip:
|
ansible.builtin.command:
|
||||||
name: borgmatic
|
cmd: pipx ensurepath
|
||||||
state: latest
|
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Créer l'exemple de configuration
|
- name: Créer l'exemple de configuration
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: generate-borgmatic-config
|
cmd: borgmatic config generate
|
||||||
creates: /etc/borgmatic/config.yaml
|
creates: /etc/borgmatic/config.yaml
|
||||||
become: true
|
become: true
|
||||||
|
@ -6,10 +6,12 @@ repositories:
|
|||||||
path: {{ repository.path }}
|
path: {{ repository.path }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if borgmatic_exclude_patterns | length > 0 %}
|
||||||
exclude_patterns:
|
exclude_patterns:
|
||||||
{% for pattern in borgmatic_exclude_patterns %}
|
{% for pattern in borgmatic_exclude_patterns %}
|
||||||
- {{ pattern }}
|
- {{ pattern }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
source_directories:
|
source_directories:
|
||||||
{% for directory in borgmatic_source_directories %}
|
{% for directory in borgmatic_source_directories %}
|
||||||
|
Loading…
Reference in New Issue
Block a user