Files
2024-03-06 10:56:21 +00:00

33 lines
839 B
YAML

---
- hosts: gitea
become: true
become_user: root
tasks:
- name: gitea.yml | Stop service gitea on debian, if running
ansible.builtin.systemd:
name: gitea
state: stopped
- name: gitea.yml | Download newest gitea binary
ansible.builtin.get_url:
url: "{{ var_gitea_url }}"
dest: /tmp/gitea
mode: '0511'
- name: gitea.yml | Copy file with owner and permissions
ansible.builtin.copy:
src: /tmp/gitea
dest: /usr/local/bin/gitea
mode: '0511'
remote_src: yes
- name: gitea.yml | Start service gitea on debian, if not running
ansible.builtin.systemd:
name: gitea
state: started
- name: gitea.yml | clean and remove /tmp directory
ansible.builtin.file:
path: /tmp/gitea
state: absent