style: make ansible-lint happier

This commit is contained in:
VC
2024-07-05 11:53:33 +02:00
parent 332dc0f60a
commit 2728bc28cd
27 changed files with 125 additions and 87 deletions

View File

@@ -1,28 +1,30 @@
---
- name: create SSH key
openssh_keypair:
- name: Create SSH key
community.crypto.openssh_keypair:
path: ~/.ssh/id_rsa
- name: get SSH pub key
command: cat ~/.ssh/id_rsa.pub
- name: Get SSH pub key
ansible.builtin.command:
cmd: cat ~/.ssh/id_rsa.pub
changed_when: true
register: ssh_keys
- name: put backup script
template:
- name: Put backup script
ansible.builtin.template:
src: borgbackup.sh.j2
dest: /usr/local/bin/borgbackup.sh
owner: root
group: root
mode: '0750'
- name: cron the backup script
cron:
- name: Cron the backup script
ansible.builtin.cron:
name: "borg backup script"
hour: "{{ borg_backup_hour }}"
minute: "{{ borg_backup_minute }}"
job: /usr/local/bin/borgbackup.sh
- name: warns about borg init
debug:
- name: Warns about borg init
ansible.builtin.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"