You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Denis Knauf c0d4049302 listen [::]:443 added 1 year ago
defaults init 3 years ago
files init 3 years ago
handlers init 3 years ago
meta meta 3 years ago
tasks asciidoctor installation and showtitle 2 years ago
templates listen [::]:443 added 1 year ago
tests init 3 years ago
vars init 3 years ago
.gitignore Initial commit 3 years ago
LICENSE Initial commit 3 years ago
README.adoc asciidoctor installation and showtitle 2 years ago

README.adoc

gitea - Git with a cup of tea
=============================

____
A painless self-hosted Git service.
Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.
____

It installs nginx, postgresql and gitea for you git-service.

Requirements
------------

You need to have debian (or compatible, like ubuntu) or alpine already installed.

* sshd

It will install all dependencies on host-machine:

* Postgresql
* nginx
* gitea - itself

It expects for TLS a PKI in `/etc/nginx/tls/`,
where you have to place `**hostname**.key`, `**hostname**.crt`.

Role Variables
--------------

gitea_version::
You need to define it, it cannot determine newest version, yet.

gitea_download_uri::
The URI to the binary.
You need to define it, it cannot determine newest version, yet.

gitea_fqdn::
Full qualified domain name for the webserver.

gitea_root_uri::
The Link to your gitea service. Default `https://{{gitea_fqdn}}/`.

Example Playbook
----------------

This determines the newest version of gitea automatically.
So it defines `gitea_version` and `gitea_download_uri` for you.

It uses a host `local`, which you have to define in your inventory.
Set `ansible_host=localhost` for this host.
It uses this host for fetching needed informations once.

----
---
# vim: set expandtab tabstop=2 shiftwidth=2:

- hosts: gitea
remote_user: root
become: false

tasks:
- delegate_to: local
run_once: true
remote_user: root
become: false
apt:
name:
- ruby-dev
- make
- gcc
- delegate_to: local
run_once: true
remote_user: root
become: false
gem:
user_install: false
name: '{{item}}'
with_items:
- oga
- httpclient
- name: determine newest provided version
delegate_to: local
become: false
run_once: true
shell: |
ruby -roga -rhttpclient <<EOF
puts Oga.parse_html( HTTPClient.get_content( "https://dl.gitea.io/gitea/")).
css( "tr.file a[href] .name").
map {|a| a.text.chomp.split ?. }.
select {|v| v.grep( /\D/).empty? }.
map {|v| v.map &:to_i }.
max.
join( ?.)
EOF
register: det_gitea_ver
- set_fact:
gitea_version: '{{gitea.version | default(det_gitea_ver.stdout)}}'
- set_fact:
gitea_download_uri: '{{gitea.uri | default("https://dl.gitea.io/gitea/"+gitea_version+"/gitea-"+gitea_version+"-linux-"+gitea_architectures_map[ansible_architecture])}}'
- import_role:
name: gitea
----

License
-------

AGPLv3

Author Information
------------------

Denis Knauf - https://git.denkn.at/deac/ansible-role-gitea