|
|
@@ -0,0 +1,50 @@ |
|
|
|
--- |
|
|
|
|
|
|
|
- name: gitea download dir |
|
|
|
file: |
|
|
|
path: /opt/gitea |
|
|
|
state: directory |
|
|
|
|
|
|
|
- name: gitea keyring |
|
|
|
command: gpg --no-default-keyring --keyring /opt/gitea/keyring.gpg |
|
|
|
--keyserver pool.sks-keyservers.net |
|
|
|
--recv 7C9E68152594688862D62AF62D9AE806EC1592E2 |
|
|
|
register: _gitea_keyring_recv |
|
|
|
changed_when: '"import" in _gitea_keyring_recv.stderr' |
|
|
|
|
|
|
|
- name: gitea checksum |
|
|
|
uri: |
|
|
|
url: "{{ gitea_download_url }}.sha256" |
|
|
|
return_content: true |
|
|
|
register: _gitea_checksum |
|
|
|
|
|
|
|
- name: download gitea signature |
|
|
|
get_url: |
|
|
|
url: "{{ gitea_download_url }}.asc" |
|
|
|
dest: "/opt/gitea/{{ gitea_download_filename }}.asc" |
|
|
|
force: true |
|
|
|
register: _gitea_download_signature |
|
|
|
|
|
|
|
|
|
|
|
- name: download gitea |
|
|
|
get_url: |
|
|
|
url: "{{ gitea_download_url }}" |
|
|
|
dest: "/opt/gitea/{{ gitea_download_filename }}" |
|
|
|
checksum: "sha256:{{_gitea_checksum.content.split(' ')|first}}" |
|
|
|
|
|
|
|
- name: verify gitea signature |
|
|
|
command: gpg --no-default-keyring --keyring /opt/gitea/keyring.gpg |
|
|
|
--verify "/opt/gitea/{{ gitea_download_filename }}.asc" |
|
|
|
"/opt/gitea/{{ gitea_download_filename }}" |
|
|
|
changed_when: false |
|
|
|
|
|
|
|
- name: gitea executable |
|
|
|
file: |
|
|
|
path: /opt/gitea/{{ gitea_download_filename }} |
|
|
|
mode: u=rwx,g=rx,o=rx |
|
|
|
|
|
|
|
- name: make gitea binary available on system |
|
|
|
file: |
|
|
|
src: /opt/gitea/{{ gitea_download_filename }} |
|
|
|
dest: /usr/local/bin/gitea |
|
|
|
state: link |