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:
parent
85e0517fbe
commit
d9ff631e62
2 changed files with 7 additions and 6 deletions
|
@ -24,7 +24,7 @@
|
||||||
- name: Download gitea archive
|
- name: Download gitea archive
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "{{ gitea_dl_url }}.xz"
|
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"
|
checksum: "sha256:{{ gitea_dl_url }}.xz.sha256"
|
||||||
register: _download_archive
|
register: _download_archive
|
||||||
until: _download_archive is succeeded
|
until: _download_archive is succeeded
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
- name: Download gitea asc file
|
- name: Download gitea asc file
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "{{ gitea_dl_url }}.xz.asc"
|
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
|
register: _download_asc
|
||||||
until: _download_asc is succeeded
|
until: _download_asc is succeeded
|
||||||
retries: 5
|
retries: 5
|
||||||
|
@ -54,18 +54,18 @@
|
||||||
when: _gitea_gpg_key_status.rc != 0
|
when: _gitea_gpg_key_status.rc != 0
|
||||||
|
|
||||||
- name: Check archive signature
|
- 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
|
changed_when: false
|
||||||
|
|
||||||
- name: Unpack gitea binary
|
- name: Unpack gitea binary
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: "xz -k -d /tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}.xz"
|
cmd: "xz -k -d /tmp/{{ gitea_filename }}.xz"
|
||||||
creates: "/tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}"
|
creates: "/tmp/{{ gitea_filename }}"
|
||||||
|
|
||||||
- name: Propagate gitea binary
|
- name: Propagate gitea binary
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: "/tmp/gitea-{{ gitea_version }}.linux-{{ gitea_arch }}"
|
src: "/tmp/{{ gitea_filename }}"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
dest: "/usr/local/bin/gitea"
|
dest: "/usr/local/bin/gitea"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
|
@ -8,6 +8,7 @@ gitea_go_arch_map:
|
||||||
armv5l: 'arm-5'
|
armv5l: 'arm-5'
|
||||||
|
|
||||||
gitea_arch: "{{ gitea_go_arch_map[ansible_architecture] | default(ansible_architecture) }}"
|
gitea_arch: "{{ gitea_go_arch_map[ansible_architecture] | default(ansible_architecture) }}"
|
||||||
|
gitea_filename: "gitea-{{ gitea_version }}.linux-{{ gitea_arch }}"
|
||||||
|
|
||||||
gitea_variables:
|
gitea_variables:
|
||||||
files:
|
files:
|
||||||
|
|
Loading…
Reference in a new issue