fix ansible-lint errors and warnings

This commit is contained in:
Frank Dornheim 2023-03-05 21:41:06 +01:00
parent 40b81c759b
commit a09650c8f2
3 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ galaxy_info:
description: Set up backup to remote machine using Borg and Borgmatic.
company: "BorgBase.com"
license: license (BSD, MIT)
min_ansible_version: 2.0
min_ansible_version: "2.0"
platforms:
- name: Debian
versions:

View File

@ -1,12 +1,12 @@
---
- name: Create ssh-key for {{ borgbackup_user }} if neeeded
- name: Create ssh-key (if neeeded) for {{ borgbackup_user }}
when:
- install_backup is not defined or install_backup
- backup_id_rsa is not defined or backup_id_rsa | length == 0
tags:
- install_backup
block:
- name: Ensire /home/{{ borgbackup_user }}/.ssh directory exist
- name: Ensire directory exist
ansible.builtin.file:
path: "/home/{{ borgbackup_user }}/.ssh/"
state: directory
@ -21,7 +21,7 @@
owner: "{{ borgbackup_user }}"
group: "{{ borgbackup_group }}"
- name: Set key (/home/{{ borgbackup_user }}/.ssh) permission
- name: Set key permission
ansible.builtin.file:
path: "/home/{{ borgbackup_user }}/.ssh/id_rsa.pub"
mode: "0644"

View File

@ -1,7 +1,7 @@
---
- name: Add and run all plays
include_tasks: "{{ element }}"
with_items: "{{ lookup( 'ansible.builtin.fileglob', '*.yml' ).split(',') | reject('search', 'main.yml') | reject('search', 'noauto_*') | sort }}"
with_items: "{{ lookup('ansible.builtin.fileglob', '*.yml').split(',') | reject('search', 'main.yml') | reject('search', 'noauto_*') | sort }}"
loop_control:
loop_var: element
tags: always