fix ansible-lint errors

This commit is contained in:
Sergey Malyuk
2025-12-18 16:37:50 +03:00
parent 277900b6ba
commit 70808bad91
6 changed files with 14 additions and 12 deletions

View File

@@ -8,5 +8,7 @@ loop_var_prefix: "^(__|{role}_)"
exclude_paths:
- .github/
- .ansible/
# ansible-lint thinks it's a playbook so gives an error, but its tasks are for include_task. decided to exclude it
# ansible-lint thinks they're playbooks so gives errors, but they're not
- roles/rustdesk/molecule/default/client-binary-existance.yml
- roles/borg_server/molecule/default/secrets.yaml

View File

@@ -1,2 +1,2 @@
---
hide_logs: true
borg_server_hide_logs: true

View File

@@ -1,6 +1,6 @@
---
galaxy_info:
role_name: "ansible_borg_server"
role_name: "borg_server"
namespace: genlab
author: "Alexander Gorelyshev"
company: "Genlab, LLC"
@@ -10,7 +10,7 @@ galaxy_info:
platforms:
- name: "Ubuntu"
versions: [ "focal", "jammy" ]
versions: ["jammy", "noble"]
galaxy_tags: []

View File

@@ -2,6 +2,6 @@
- name: Converge
hosts: all
roles:
- role: genlab.common.ansible_borg_server
- role: genlab.common.borg_server
borg_secrets_path: "secrets.yaml"
hide_logs: false
borg_server_hide_logs: false

View File

@@ -6,6 +6,6 @@
tasks:
- name: "Check if `borg` is available from PATH" # noqa: no-changed-when
register: br_test__borg_version
register: borg_server_version
ansible.builtin.command:
cmd: "borg --version"

View File

@@ -17,7 +17,7 @@
state: present
- name: "Create Borg users"
no_log: "{{ hide_logs }}"
no_log: "{{ borg_server_hide_logs }}"
loop: "{{ borg_repos }}"
ansible.builtin.user:
name: "{{ item.user }}"
@@ -30,7 +30,7 @@
append: true
- name: "Configure SSH authorized keys for Borg users"
no_log: "{{ hide_logs }}"
no_log: "{{ borg_server_hide_logs }}"
loop: "{{ borg_repos }}"
ansible.builtin.lineinfile:
path: /home/{{ item.user }}/.ssh/authorized_keys
@@ -52,7 +52,7 @@
mode: "0770"
- name: "Create repository folders"
no_log: "{{ hide_logs }}"
no_log: "{{ borg_server_hide_logs }}"
loop: "{{ borg_repos }}"
ansible.builtin.file:
path: "{{ borg_repo_root }}/{{ item.name }}"