basic gitea setup

This commit is contained in:
2019-03-30 14:57:33 -04:00
parent 2dcf9516e8
commit 401aa60a35
7 changed files with 100 additions and 0 deletions

14
gitea/install.sls Normal file
View File

@@ -0,0 +1,14 @@
{% set ver = salt.pillar.get('gitea:version') %}
{% set url = 'https://github.com/go-gitea/gitea/releases/download/v' +
ver + '/gitea-' + ver + '-linux-amd64'
%}
{% set basepath = salt.pillar.get('gitea:path') %}
wget {{ url }} -O {{ basepath }}/bin/gitea && chmod +x {{ basepath }}/bin/gitea && echo {{ ver }} > {{ basepath }}/VERSION:
cmd.run:
- unless: grep -P '^{{ ver }}$' {{ basepath }}/VERSION
- runas: {{ salt.pillar.get('gitea:user') }}
- require:
- sls: gitea.dirs
# need to setup etc/