feat: initial commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-01-15 21:32:00 +01:00
commit e53a7da36c
40 changed files with 516 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
---
- name: configure | deploy systemd configuration
template:
src: etc/systemd/system/gitea.service.j2
dest: /etc/systemd/system/gitea.service
owner: root
group: root
mode: 0644
notify: "restart gitea"
- name: ensure that service is started
service:
name: "gitea"
state: started

View File

@@ -0,0 +1,12 @@
---
- name: install | create directory {{ gitea_docker_compose_directory }}
file:
path: "{{ gitea_docker_compose_directory }}"
state: directory
mode: 0755
- name: install | set compose file
template:
src: opt/gitea/docker-compose.yml.j2
dest: "{{ gitea_docker_compose_directory }}/docker-compose.yml"
notify: 'restart gitea'

View File

@@ -0,0 +1,2 @@
---
- include_tasks: "{{ gitea_state }}.yml"

View File

@@ -0,0 +1,4 @@
---
- include_tasks: "install.yml"
- include_tasks: "configure.yml"
- include_tasks: "start.yml"

View File

@@ -0,0 +1,14 @@
---
- name: start | ensure gitea is up and running
service:
name: gitea
state: started
- name: start | wait for gitea up and running
command: "docker ps"
register: result
retries: 60
changed_when: no
until: "'gitea/gitea:{{ gitea_version}}' in result.stdout"
tags:
- skip_ansible_lint

View File

@@ -0,0 +1,5 @@
---
- name: stop | ensure gitea is up and running
service:
name: gitea
state: stopped