style(borgbackup): linting

This commit is contained in:
VC
2024-07-05 11:53:13 +02:00
parent 9b3649ea74
commit 2996773e1e
4 changed files with 42 additions and 35 deletions

View File

@@ -1,3 +1,5 @@
---
borg_pass: !vault |
$ANSIBLE_VAULT;1.1;AES256
62333166623737363731663766353330633335306532306366356536376232396664376430613434

View File

@@ -1,6 +1,8 @@
---
- name: create SSH key
openssh_keypair:
path: ~/.ssh/id_rsa
path: ~/.ssh/id_rsa
- name: get SSH pub key
command: cat ~/.ssh/id_rsa.pub
@@ -8,19 +10,19 @@
- name: put backup script
template:
src: borgbackup.sh.j2
dest: /usr/local/bin/borgbackup.sh
owner: root
group: root
mode: '0750'
src: borgbackup.sh.j2
dest: /usr/local/bin/borgbackup.sh
owner: root
group: root
mode: '0750'
- name: cron the backup script
cron:
name: "borg backup script"
hour: "{{ borg_backup_hour }}"
minute: "{{ borg_backup_minute }}"
job: /usr/local/bin/borgbackup.sh
name: "borg backup script"
hour: "{{ borg_backup_hour }}"
minute: "{{ borg_backup_minute }}"
job: /usr/local/bin/borgbackup.sh
- name: warns about borg init
debug:
msg: "Borg has been installed. Dont forget to init with: \nborg init --encryption=repokey-blake2 backup@{{ hostvars[groups['borg_server'][0]]['ansible_fqdn'] }}:home"
msg: "Borg has been installed. Dont forget to init with: \nborg init --encryption=repokey-blake2 backup@{{ hostvars[groups['borg_server'][0]]['ansible_fqdn'] }}:home"