|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- ---
- - name: debian packages
- apt:
- pkg: "{{item}}"
- with_items:
- - ca-certificates
- - git
- - golang
-
- - name: download gitea
- get_url:
- url: "{{ gitea_download_url }}"
- dest: /usr/local/bin/gitea
- checksum: "{{ gitea_download_checksum }}"
- notify:
- - restart gitea
-
- - name: gitea executable
- file:
- path: /usr/local/bin/gitea
- mode: u=rwx,g=rx,o=rx
-
- # - name: allow gitea executable to bind on privileged port
- # capabilities:
- # path: /usr/local/bin/gitea
- # capability: cap_sys_chroot+eip
- # state: present
-
- - name: git user
- user:
- name: git
- system: yes
- home: /srv/git
-
- - name: gitea home directory
- file:
- path: /srv/git
- mode: u=rwx,g=rx,o=rx
- owner: git
- group: git
- state: directory
-
- - name: gitea repos directory
- file:
- path: /srv/git/repos
- mode: u=rwx,g=rx,o=rx
- owner: git
- group: git
- state: directory
-
- - name: gitea work directory
- file:
- path: /var/lib/gitea
- mode: u=rwx,g=rx,o=rx
- owner: git
- group: git
- state: directory
-
- - name: gitea config directory
- file:
- path: /etc/gitea
- mode: u=rwx,g=rx,o=rx
- owner: git
- group: git
- state: directory
-
- - name: gitea log directory
- file:
- path: /var/log/gitea
- mode: u=rwx,g=rx,o=rx
- owner: git
- group: git
- state: directory
-
- - import_tasks: config.yml
-
- - name: systemd service unit
- template:
- src: systemd.service.j2
- dest: /etc/systemd/system/gitea.service
- notify:
- - systemd daemon-reload
- - restart gitea
-
- - name: gitea started
- systemd:
- name: gitea.service
- state: started
|