make it work on infra.opendoor.fr

This commit is contained in:
2026-01-01 16:49:44 +01:00
parent 1ce512d844
commit 17d54301f7
9 changed files with 59 additions and 57 deletions

View File

@@ -1,20 +1,32 @@
---
- name: configure ssh
block:
- name: .ssh dir
ansible.builtin.file:
path: /root/.ssh
mode: 0700
state: directory
- name: .ssh/confi
ansible.builtin.copy:
dest: /root/.ssh/config
content: |
Host *
Port 2222
- name: get borg binary
get_url:
dest: /usr/bin/borg
owner: root
group: backup
mode: "0750"
url: https://github.com/borgbackup/borg/releases/download/{{ borg_release }}/borg-linux64
mode: "0755"
url: https://github.com/borgbackup/borg/releases/download/{{ borg_release }}/borg-linuxnew64
- name: ensure /root/bin exists
file:
ansible.builtin.file:
path: "{{ borg_script_dir }}"
state: directory
- name: get borgbackup script
tags: wip
get_url:
ansible.builtin.get_url:
url: "{{ item.url }}"
mode: "{{ item.mode }}"
dest: "{{ borg_script_dir }}"
@@ -22,7 +34,9 @@
- { url: "https://git.hadoly.fr/CS_CT/borg/raw/tag/1.0/borg.sh", mode: "0700" }
- name: get borgbackup config
template:
vars:
borg_dirs_serialized: "{{ borg_dirs | join( ' ' ) }}"
ansible.builtin.template:
src: borg.conf.jj
dest: "{{ borg_script_dir }}/borg.conf"
mode: 0600