fix: comply with latest ansible-lint rules
This commit is contained in:
parent
967780f160
commit
e17443ad10
5 changed files with 20 additions and 18 deletions
|
@ -1,2 +1,2 @@
|
|||
skip_list:
|
||||
- '106' # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern'
|
||||
- "106" # Role name {} does not match ``^[a-z][a-z0-9_]+$`` pattern'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
- name: systemd reload
|
||||
- name: Reload systemd
|
||||
ansible.builtin.systemd:
|
||||
daemon_reload: yes
|
||||
daemon_reload: true
|
||||
|
|
|
@ -3,15 +3,15 @@ galaxy_info:
|
|||
author: angristan
|
||||
description: Ansible role for Restic
|
||||
license: MIT
|
||||
min_ansible_version: 2.4
|
||||
min_ansible_version: "2.4"
|
||||
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- all
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- all
|
||||
- name: Debian
|
||||
versions:
|
||||
- all
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- all
|
||||
|
||||
galaxy_tags:
|
||||
- debian
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
---
|
||||
- name: Install fuse (to mount repositories)
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: fuse
|
||||
|
||||
- name: Install bzip2 (to install restic)
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: bzip2
|
||||
|
||||
- name: Install pigz (to compress db dumps)
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: pigz
|
||||
|
||||
- name: Download restic
|
||||
ansible.builtin.get_url:
|
||||
url: "https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_linux_{{ ansible_architecture }}.bz2"
|
||||
dest: "/tmp/restic_{{ restic_version }}_linux_amd64.bz2"
|
||||
mode: "0644"
|
||||
|
||||
- name: Extract restic
|
||||
command: "bzip2 -d /tmp/restic_{{ restic_version }}_linux_amd64.bz2"
|
||||
ansible.builtin.command: "bzip2 -d /tmp/restic_{{ restic_version }}_linux_amd64.bz2"
|
||||
args:
|
||||
creates: "/tmp/restic_{{ restic_version }}_linux_amd64"
|
||||
|
||||
|
@ -26,7 +27,7 @@
|
|||
remote_src: true
|
||||
src: "/tmp/restic_{{ restic_version }}_linux_amd64"
|
||||
dest: "{{ restic_path }}"
|
||||
mode: 0755
|
||||
mode: "0755"
|
||||
|
||||
- name: Remove downloaded file
|
||||
ansible.builtin.file:
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
path: "{{ restic_path }}"
|
||||
register: restic_binary
|
||||
|
||||
- include_tasks: install.yml
|
||||
- name: Include install.yml if restic is not installed or restic_install is true
|
||||
ansible.builtin.include_tasks: install.yml
|
||||
when: not restic_binary.stat.exists or restic_install
|
||||
|
||||
- name: Overwrite SSH config for backup server
|
||||
|
@ -38,14 +39,14 @@
|
|||
mode: "0644"
|
||||
vars:
|
||||
restic_folders_combined: "{{ restic_default_folders + restic_folders }}"
|
||||
notify: systemd reload
|
||||
notify: Reload systemd
|
||||
|
||||
- name: Add systemd timer for restic
|
||||
ansible.builtin.template:
|
||||
src: restic-backup.timer.j2
|
||||
dest: /etc/systemd/system/restic-backup.timer
|
||||
mode: "0644"
|
||||
notify: systemd reload
|
||||
notify: Reload systemd
|
||||
|
||||
- name: Enable and start restic timer
|
||||
ansible.builtin.systemd:
|
||||
|
|
Loading…
Reference in a new issue