1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00

Merge pull request #71 from roles-ansible/latest

change gitea_version to latest + linting
This commit is contained in:
L3D 2022-03-27 05:27:00 +02:00 committed by GitHub
commit d33e6b1da8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 9 deletions

View file

@ -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

View file

@ -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 |

View file

@ -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'

View file

@ -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"

View file

@ -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"

View file

@ -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'"

View file

@ -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

View file

@ -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'