aboutsummaryrefslogtreecommitdiff
path: root/roles/gitea/tasks/update.yml
blob: ae6fe1fd9286c4615bf501768e387796aa457e69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---

# initial ?

- name: Stop gitea
  systemd:
    name: gitea
    state: stopped
  become: yes
  when: not gitea_bin_stat.failed
  ignore_errors: yes

- name: Download Gitea
  get_url:
    url: 'https://dl.gitea.com/gitea/{{ gitea.version.ver }}/gitea-{{ gitea.version.ver }}-linux-amd64'
    checksum: 'sha256:{{ gitea_sha256 }}'
    dest: /usr/local/bin/gitea
    owner: root
    group: root
    mode: '755'
  become: yes
  notify:
    - Handle systemd
  when: not gitea_use_forgejo

- name: Download forgejo
  get_url:
    url: 'https://codeberg.org/forgejo/forgejo/releases/download/v{{ gitea.version.ver }}/forgejo-{{ gitea.version.ver }}-linux-amd64'
    checksum: 'sha256:{{ gitea_sha256 }}'
    dest: /usr/local/bin/gitea
    owner: root
    group: root
    mode: '755'
  become: yes
  notify:
    - Handle systemd
  when: gitea_use_forgejo