dns_resolver role, update-dns script, dns-deploy playbook, inventory updates

This commit is contained in:
sascha 2026-04-03 19:42:50 +02:00
parent 152edb8345
commit 1509daad4c
26 changed files with 780 additions and 176 deletions

View file

@ -1,7 +1,9 @@
---
- name: Borg installieren
- name: Borg und borgmatic installieren
apt:
name: borgbackup
name:
- borgbackup
- borgmatic
state: present
update_cache: yes
@ -44,24 +46,29 @@
failed_when: borg_init.rc != 0 and 'already exists' not in borg_init.stderr
changed_when: borg_init.rc == 0
- name: Passphrase-Datei deployen
copy:
dest: /root/.borg-passphrase
content: "{{ borg_passphrase }}"
mode: '0400'
- name: Backup-Script deployen
template:
src: borg-backup.sh.j2
dest: /usr/local/bin/borg-backup.sh
- name: borgmatic Config-Verzeichnis
file:
path: /etc/borgmatic
state: directory
mode: '0700'
- name: borgmatic Config deployen
template:
src: borgmatic.yml.j2
dest: /etc/borgmatic/config.yaml
mode: '0600'
- name: Altes Backup-Script entfernen
file:
path: /usr/local/bin/borg-backup.sh
state: absent
- name: Systemd Timer Unit
copy:
dest: /etc/systemd/system/borg-backup.timer
content: |
[Unit]
Description=Borg Backup Timer
Description=Borgmatic Backup Timer
[Timer]
OnCalendar=*-*-* 03:00:00
@ -76,13 +83,13 @@
dest: /etc/systemd/system/borg-backup.service
content: |
[Unit]
Description=Borg Backup
Description=Borgmatic Backup
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/borg-backup.sh
ExecStart=/usr/bin/borgmatic --verbosity 1
Nice=19
IOSchedulingClass=idle