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

add gitea_filename variable

This commit is contained in:
L3D 2021-03-22 21:47:28 +01:00
parent 85e0517fbe
commit d9ff631e62
Signed by: l3d
GPG key ID: CD08445BFF4313D1
2 changed files with 7 additions and 6 deletions

View file

@ -24,7 +24,7 @@
- name: Download gitea archive
ansible.builtin.get_url:
url: "{{ gitea_dl_url }}.xz"
dest: "/tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}.xz"
dest: "/tmp/{{ gitea_filename }}.xz"
checksum: "sha256:{{ gitea_dl_url }}.xz.sha256"
register: _download_archive
until: _download_archive is succeeded
@ -34,7 +34,7 @@
- name: Download gitea asc file
ansible.builtin.get_url:
url: "{{ gitea_dl_url }}.xz.asc"
dest: "/tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}.xz.asc"
dest: "/tmp/{{ gitea_filename }}.xz.asc"
register: _download_asc
until: _download_asc is succeeded
retries: 5
@ -54,18 +54,18 @@
when: _gitea_gpg_key_status.rc != 0
- name: Check archive signature
ansible.builtin.command: "gpg --verify /tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}.xz.asc /tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}.xz"
ansible.builtin.command: "gpg --verify /tmp/{{ gitea_filename }}.xz.asc /tmp/{{ gitea_filename }}.xz"
changed_when: false
- name: Unpack gitea binary
ansible.builtin.command:
cmd: "xz -k -d /tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}.xz"
creates: "/tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}"
cmd: "xz -k -d /tmp/{{ gitea_filename }}.xz"
creates: "/tmp/{{ gitea_filename }}"
- name: Propagate gitea binary
become: true
ansible.builtin.copy:
src: "/tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}"
src: "/tmp/{{ gitea_filename }}"
remote_src: true
dest: "/usr/local/bin/gitea"
mode: 0755

View file

@ -8,6 +8,7 @@ gitea_go_arch_map:
armv5l: 'arm-5'
gitea_arch: "{{ gitea_go_arch_map[ansible_architecture] | default(ansible_architecture) }}"
gitea_filename: "gitea-{{ gitea_version }}.linux-{{ gitea_arch }}"
gitea_variables:
files: