diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml index bd3d85a..0b743f7 100644 --- a/.github/workflows/ansible-linting-check.yml +++ b/.github/workflows/ansible-linting-check.yml @@ -17,8 +17,6 @@ jobs: - uses: actions/checkout@v2 - name: Lint Ansible Playbook - uses: ansible/ansible-lint-action@master + uses: ansible/ansible-lint-action@v6 with: targets: "." - override-deps: | - rich>=9.5.1,<11.0.0 diff --git a/README.md b/README.md index 8c020ae..87c7a89 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Either you define exactly which release you install. Or you use the option ``lat ### gitea update | variable name | default value | description | | ------------- | ------------- | ----------- | -| `gitea_version` | **WILL CHANGE SOON** | Define either the exact release to install or use ``latest`` to install the latest release. | +| `gitea_version` | `latest` | Define either the exact release to install *(eg. `1.16.0`)* or use ``latest`` *(default)* to install the latest release. | | `gitea_version_check` | `true` | Check if installed version != `gitea_version` before initiating binary download | | `gitea_gpg_key` | `7C9E68152594688862D62AF62D9AE806EC1592E2` | the gpg key the gitea binary is signed with | | `gitea_gpg_server` | `hkps://keys.openpgp.org` | A gpg key server where this role can download the gpg key | diff --git a/defaults/main.yml b/defaults/main.yml index b1ceede..fddfa3e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,7 +1,7 @@ --- # gitea version # Use 'latest' to auto-update; upgrading past role version may lead to errors. -gitea_version: '1.16.0' +gitea_version: 'latest' gitea_version_check: true gitea_gpg_key: '7C9E68152594688862D62AF62D9AE806EC1592E2' gitea_gpg_server: 'hkps://keys.openpgp.org' 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 diff --git a/vars/main.yml b/vars/main.yml index 381e588..13d2e31 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -56,5 +56,5 @@ transfer_custom_footer: - 'files/gitea_footer/extra_links_footer.tmpl' - 'files/extra_links_footer.tmpl' -playbook_version_number: 35 # should be int +playbook_version_number: 36 # should be int playbook_version_path: 'do1jlr.gitea.version'