- name: "Install gitea" hosts: gitea tasks: # User + Key Setup - name: Create a new regular user with sudo privileges user: name: git state: present groups: docker append: true create_home: true shell: /home/git/ssh-shell - name: Creates directory structure for gitea data file: path: /home/{{ create_user }}/gitea state: directory owner: "{{ create_user }}" group: "{{ create_user }}" mode: 0775 - name: Creates backup directory outside of docker volumes to move dumps more easily off of server file: path: /home/{{ create_user }}/backups state: directory owner: "{{ create_user }}" group: "{{ create_user }}" mode: 0775 - name: copy ssh-shell file for git user to server (from template) template: src: templates/ssh-shell.j2 owner: git group: git mode: 0750 dest: /home/git/ssh-shell - name: copy docker compose to server (from template) template: src: templates/docker-compose.yml.j2 dest: /home/{{ create_user }}/gitea/docker-compose.yml - name: docker compose up docker_compose: project_src: /home/{{ create_user }}/gitea/ state: present register: __gitea