Compare commits
No commits in common. "b14a0948ee7ea1edec646b65febbd1c0fa48f78d" and "809240330cd0e15e8bfb76b30f88e3acfc87fc9c" have entirely different histories.
b14a0948ee
...
809240330c
@ -70,6 +70,12 @@ Phrase de passe de chiffrement de la sauvegarde.
|
|||||||
|
|
||||||
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
*<span style="text-decoration: underline">Valeur par défaut:</span> aucune*
|
||||||
|
|
||||||
|
### borgmatic_ssh_command
|
||||||
|
|
||||||
|
Commande SSH utilisée pour la sauvegarde.
|
||||||
|
|
||||||
|
*<span style="text-decoration: underline">Valeur par défaut:</span> `ssh -i /etc/borgmatic/id_ed25519`*
|
||||||
|
|
||||||
## Exemples
|
## Exemples
|
||||||
|
|
||||||
### host_vars/host1.ykn.local
|
### host_vars/host1.ykn.local
|
||||||
|
@ -23,3 +23,4 @@ borgmatic_retention:
|
|||||||
borgmatic_name: "{{ inventory_hostname }}_{now}"
|
borgmatic_name: "{{ inventory_hostname }}_{now}"
|
||||||
borgmatic_compression: none
|
borgmatic_compression: none
|
||||||
borgmatic_passphrase: ""
|
borgmatic_passphrase: ""
|
||||||
|
borgmatic_ssh_command: ssh -i /etc/borgmatic/id_ed25519
|
||||||
|
@ -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: borgmatic init --encryption repokey-blake2
|
cmd: borgmatic init --encryption repokey
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Activer la planification
|
- name: Activer la planification
|
||||||
|
@ -19,19 +19,6 @@
|
|||||||
mode: u=rw,g=r,o=r
|
mode: u=rw,g=r,o=r
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Déployer la configuration de SSH
|
|
||||||
ansible.builtin.blockinfile:
|
|
||||||
path: /root/.ssh/config
|
|
||||||
create: true
|
|
||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK for role_borgmatic"
|
|
||||||
block: |
|
|
||||||
{% for repository in borgmatic_repositories %}
|
|
||||||
Host {{ repository | ansible.builtin.urlsplit('hostname') }}
|
|
||||||
IdentityFile /etc/borgmatic/id_ed25519
|
|
||||||
IdentitiesOnly yes
|
|
||||||
{% endfor %}
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Déployer la configuration
|
- name: Déployer la configuration
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: config.yaml.j2
|
src: config.yaml.j2
|
||||||
|
@ -22,3 +22,4 @@ storage:
|
|||||||
archive_name_format: {{ borgmatic_name }}
|
archive_name_format: {{ borgmatic_name }}
|
||||||
compression: {{ borgmatic_compression }}
|
compression: {{ borgmatic_compression }}
|
||||||
encryption_passphrase: {{ borgmatic_passphrase }}
|
encryption_passphrase: {{ borgmatic_passphrase }}
|
||||||
|
ssh_command: {{ borgmatic_ssh_command }}
|
||||||
|
Loading…
Reference in New Issue
Block a user