mirror of
https://github.com/roles-ansible/ansible_role_restic/
synced 2026-09-05 19:27:05 +02:00
Improve linting and ansible style
This commit is contained in:
parent
fc5cfc63c4
commit
5d3097a3d4
4 changed files with 15 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
.cache
|
||||
.DS_Store
|
||||
.ansible
|
||||
|
|
|
|||
|
|
@ -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 }}"
|
||||
|
|
|
|||
|
|
@ -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 }}"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue