Update to 2021-03-08 13:00

master
Daniel Berteaud 4 years ago
parent 7292622192
commit 61d690ee9a
  1. 4
      roles/gitea/defaults/main.yml
  2. 23
      roles/gitea/tasks/archive_pre.yml

@ -1,11 +1,11 @@
---
# Version to install
gitea_version: 1.13.3
gitea_version: 1.13.4
# URL to the binary
gitea_bin_url: https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-amd64
# sha256 of the binary
gitea_bin_sha256: 4eea66983e30cc3c202538e69e31a79cd626a4c61d28c9678b02840c8b63e1a0
gitea_bin_sha256: dc15430fe3eccc1f309051798a156361ed4c0ae7de90d83f1f904429a2838033
# Handle updates. If set to false, ansible will only install
# Gitea and then won't touch an existing installation
gitea_manage_upgrade: True

@ -0,0 +1,23 @@
---
- name: Create archive directory
file: path={{ gitea_root_dir }}/archives/{{ gitea_current_version }} state=directory mode=700
tags: gitea
- name: Archive previous version
copy: src={{ gitea_root_dir }}/bin/gitea dest={{ gitea_root_dir }}/archives/{{ gitea_current_version }} remote_src=True
tags: gitea
- name: Archive the database
mysql_db:
state: dump
name: "{{ gitea_db_name }}"
target: "{{ gitea_root_dir }}/archives/{{ gitea_current_version }}/{{ gitea_db_name }}.sql.xz"
login_host: "{{ gitea_db_server | default(mysql_server) }}"
login_user: sqladmin
login_password: "{{ mysql_admin_pass }}"
quick: True
single_transaction: True
environment:
XZ_OPT: -T0
tags: gitea
Loading…
Cancel
Save