- name: Fetch Gitea gpg key command: argv: - "gpg" - "--recv" - "7C9E68152594688862D62AF62D9AE806EC1592E2" tags: - gitea - keys - packages - name: Download Gitea binary signature get_url: url: "https://dl.gitea.io/gitea/master/gitea-master-linux-amd64.asc" dest: "/tmp/gitea-master-linux-amd64.asc" tags: - gitea - keys - packages - name: Download Gitea binary get_url: url: "https://dl.gitea.io/gitea/master/gitea-master-linux-amd64" dest: "/usr/local/bin/gitea" # TODO: Don't update the binary unless the GPG check passes checksum: "sha256:https://dl.gitea.io/gitea/master/gitea-master-linux-amd64.sha256" mode: "+x" tags: - gitea - packages notify: Verify binary with gpg - name: Copy configuration files loop: - { src: "gitea.ini", dest: "/etc/gitea/app.ini", owner: "{{ gitea.user }}", mode: "600" } template: follow: yes src: "{{ item.src }}.j2" dest: "{{ item.dest }}" mode: "{{ item.mode }}" owner: "{{ item.owner }}" tags: - gitea notify: - Run service actions - name: Copy systemd service loop: - { src: "gitea.service", dest: "/etc/systemd/system/gitea.service", owner: "{{ gitea.user }}", mode: "600" } template: follow: yes src: "{{ item.src }}.j2" dest: "{{ item.dest }}" mode: "{{ item.mode }}" owner: "{{ item.owner }}" tags: - gitea notify: - Restart services