--- - name: Init db ansible.builtin.include_tasks: db.yml - name: Install prerequisites ansible.builtin.package: name: git state: present update_cache: true - name: Download Gitea executable ansible.builtin.get_url: url: "{{ gitea_url }}" dest: "{{ gitea_bin }}" owner: root group: root mode: "0o755" force: true notify: - Restart Gitea - name: Create git user ansible.builtin.user: name: git password: '*' comment: "Git Version Control" home: /home/git shell: /bin/bash state: present - name: Create Gitea base dir ansible.builtin.file: state: directory path: "{{ gitea_path }}" owner: git group: git mode: "0o755" - name: Create Gitea sub dirs ansible.builtin.file: state: directory path: "{{ gitea_path }}/{{ item }}" owner: git group: git mode: "0o755" loop: - custom - data - log - name: Create Gitea config dir ansible.builtin.file: state: directory path: "{{ gitea_etc_path }}" owner: root group: git mode: "0o750" - name: Create Gitea config file ansible.builtin.template: src: app.ini.j2 dest: "{{ gitea_etc_path }}/app.ini" owner: root group: git mode: "0o640" notify: - Restart Gitea - name: Create systemd Gitea file ansible.builtin.template: src: gitea.service.j2 dest: /etc/systemd/system/gitea.service owner: root group: root mode: "0o640" notify: - Restart Gitea