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,15 +1,15 @@
---
- name: mount backup disk
mount:
- name: Mount backup disk
ansible.posix.mount:
path: /backup
src: LABEL=BACKUP
fstype: ext4
opts: noatime,nofail
state: mounted
- name: create backup user
user:
- name: Create backup user
ansible.builtin.user:
name: backup
comment: Backup
create_home: true
@@ -18,8 +18,8 @@
system: true
state: present
- name: "create directory for borg clients"
file:
- name: Create directory for borg clients
ansible.builtin.file:
path: "/backup/repos/{{ hostvars[item]['ansible_fqdn'] }}"
state: directory
mode: '0750'
@@ -27,8 +27,8 @@
group: backup
loop: "{{ groups['borg_client'] }}"
- name: "set authorized_keys for borg clients"
authorized_key:
- name: Set authorized_keys for borg clients
ansible.posix.authorized_key:
user: backup
key: "{{ hostvars[item]['ssh_keys']['stdout'] }}"
key_options: "command=\"cd /backup/repos/{{ hostvars[item]['ansible_fqdn'] }}; borg serve --restrict-to-path /backup/repos/{{ hostvars[item]['ansible_fqdn'] }}\""