mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
Merge pull request #96 from Thulium-Drake/main
Change get_url/uri tasks to not use become
This commit is contained in:
commit
d30930b271
4 changed files with 10 additions and 0 deletions
|
@ -31,6 +31,7 @@
|
|||
checksum: "sha256:{{ gitea_forgejo_checksum }}"
|
||||
mode: 0640
|
||||
register: _download_archive
|
||||
become: false
|
||||
until: _download_archive is succeeded
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
@ -41,6 +42,7 @@
|
|||
dest: "/tmp/{{ gitea_filename }}.asc"
|
||||
mode: 0640
|
||||
register: _download_asc
|
||||
become: false
|
||||
until: _download_asc is succeeded
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
@ -59,6 +61,7 @@
|
|||
- name: Import forgejo gpg key
|
||||
ansible.builtin.command: "gpg --keyserver {{ gitea_gpg_server }} --recv {{ gitea_forgejo_gpg_key }}"
|
||||
register: _gitea_import_key
|
||||
become: false
|
||||
changed_when: '"imported: 1" in _gitea_import_key.stderr'
|
||||
when: '_gitea_gpg_key_status.rc != 0 or "expired" in _gitea_gpg_key_status.stdout'
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
checksum: "sha256:{{ gitea_dl_url }}.xz.sha256"
|
||||
mode: 0640
|
||||
register: _download_archive
|
||||
become: false
|
||||
until: _download_archive is succeeded
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
@ -41,6 +42,7 @@
|
|||
dest: "/tmp/{{ gitea_filename }}.xz.asc"
|
||||
mode: 0640
|
||||
register: _download_asc
|
||||
become: false
|
||||
until: _download_asc is succeeded
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
@ -59,6 +61,7 @@
|
|||
- name: Import gitea gpg key
|
||||
ansible.builtin.command: "gpg --keyserver {{ gitea_gpg_server }} --recv {{ gitea_gpg_key }}"
|
||||
register: _gitea_import_key
|
||||
become: false
|
||||
changed_when: '"imported: 1" in _gitea_import_key.stderr'
|
||||
when: '_gitea_gpg_key_status.rc != 0 or "expired" in _gitea_gpg_key_status.stdout'
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
url: 'https://codeberg.org/api/v1/repos/forgejo/forgejo/releases?limit=1'
|
||||
return_content: true
|
||||
register: gitea_forgejo_remote_metadata
|
||||
become: false
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: "Fail if running in check mode without versions set."
|
||||
|
@ -44,6 +45,7 @@
|
|||
url: 'https://codeberg.org/api/v1/repos/forgejo/forgejo/releases/tags/v{{ gitea_version_target }}'
|
||||
return_content: true
|
||||
register: gitea_forgejo_remote_tags_metadata
|
||||
become: false
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: "Generate forgejo download url"
|
||||
|
@ -61,6 +63,7 @@
|
|||
url: "{{ gitea_forgejo_checksum_url | first }}"
|
||||
return_content: true
|
||||
register: _gitea_forgejo_dl_checksum
|
||||
become: false
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: Set forjeo checksum
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
url: https://api.github.com/repos/go-gitea/gitea/releases/latest
|
||||
return_content: true
|
||||
register: gitea_remote_metadata
|
||||
become: false
|
||||
when: not ansible_check_mode
|
||||
|
||||
- name: "Fail if running in check mode without versions set."
|
||||
|
|
Loading…
Reference in a new issue