From a09650c8f2f952aba0cc0cebb2cb243a9660c372 Mon Sep 17 00:00:00 2001 From: Frank Dornheim <524257+conloos@users.noreply.github.com> Date: Sun, 5 Mar 2023 21:41:06 +0100 Subject: [PATCH] fix ansible-lint errors and warnings --- meta/main.yml | 2 +- tasks/02_create_key.yml | 6 +++--- tasks/main.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index 979fc62..d9fa6c6 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -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: diff --git a/tasks/02_create_key.yml b/tasks/02_create_key.yml index 3a7ac61..0970cdf 100644 --- a/tasks/02_create_key.yml +++ b/tasks/02_create_key.yml @@ -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" diff --git a/tasks/main.yml b/tasks/main.yml index 674b9bf..d8a27e8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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