From c179060741af781ee857b3f1c43757cf4d9c10af Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 27 Mar 2022 05:19:36 +0200 Subject: [PATCH] resolve linting errors --- handlers/main.yml | 4 ++-- tasks/backup.yml | 1 + tasks/create_user.yml | 2 +- tasks/install.yml | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/handlers/main.yml b/handlers/main.yml index fc2696b..d687965 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,14 +1,14 @@ --- - name: "Restart gitea" become: true - service: + ansible.builtin.service: name: gitea state: restarted when: ansible_service_mgr == "systemd" - name: "Reload systemd" become: true - systemd: + ansible.builtin.systemd: daemon_reload: true when: ansible_service_mgr == "systemd" diff --git a/tasks/backup.yml b/tasks/backup.yml index cc7c290..c12a22f 100644 --- a/tasks/backup.yml +++ b/tasks/backup.yml @@ -26,6 +26,7 @@ ansible.builtin.command: cmd: "sudo -u {{ gitea_user }} gitea dump -c /etc/gitea/gitea.ini" chdir: "{{ gitea_backup_location }}" + changed_when: true when: - ansible_facts.services["gitea.service"] is defined - ansible_facts.services["gitea.service"].state == "running" diff --git a/tasks/create_user.yml b/tasks/create_user.yml index 473726e..f68fa7c 100644 --- a/tasks/create_user.yml +++ b/tasks/create_user.yml @@ -7,7 +7,7 @@ state: "present" - name: Switch shell when not using the builtin ssh server - set_fact: + ansible.builtin.set_fact: gitea_shell: "/bin/bash" when: "not gitea_start_ssh and gitea_shell == '/bin/false'" diff --git a/tasks/install.yml b/tasks/install.yml index ef325f8..8ee8ed5 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -26,6 +26,7 @@ url: "{{ gitea_dl_url }}.xz" dest: "/tmp/{{ gitea_filename }}.xz" checksum: "sha256:{{ gitea_dl_url }}.xz.sha256" + mode: 0640 register: _download_archive until: _download_archive is succeeded retries: 5 @@ -35,6 +36,7 @@ ansible.builtin.get_url: url: "{{ gitea_dl_url }}.xz.asc" dest: "/tmp/{{ gitea_filename }}.xz.asc" + mode: 0640 register: _download_asc until: _download_asc is succeeded retries: 5