Improve linting and ansible style

This commit is contained in:
L3D 2025-09-30 19:16:45 +02:00
commit 5d3097a3d4
No known key found for this signature in database
4 changed files with 15 additions and 8 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.cache
.DS_Store
.ansible

View file

@ -24,7 +24,6 @@
owner: '{{ restic_dir_owner }}'
group: '{{ restic_dir_group }}'
- name: Ensure restic binary has cap_dac_read_search capability
community.general.capabilities:
path: "/opt/restic/bin/restic-{{ restic_version }}"

View file

@ -1,16 +1,22 @@
- name: ensure log folder exists and is writeable
---
- name: Ensure log folder exists and is writeable
become: true
ansible.builtin.file:
path: "{{ restic_log_dir }}"
owner: '{{ restic_user }}'
group: '{{ restic_user }}'
mode: '0755'
- name: ensure cache dir exists and is writeable
- name: Ensure cache dir exists and is writeable
become: true
ansible.builtin.file:
path: "{{ restic_log_dir }}"
owner: '{{ restic_user }}'
group: '{{ restic_user }}'
mode: '0750'
- name: Set ownership recursively
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
@ -18,5 +24,5 @@
group: "{{ restic_user }}"
recurse: true
with_items:
- "{{ restic_log_dir }}"
- "{{ restic_cache_dir }}"
- "{{ restic_log_dir }}"
- "{{ restic_cache_dir }}"

View file

@ -1,6 +1,7 @@
- name: create restic user
user:
---
- name: Create restic user
become: true
ansible.builtin.user:
name: "{{ restic_user }}"
shell: "/sbin/nologin"
system: true