Only deploy Gitea config if we don't already have one

This commit is contained in:
Salt 2020-04-30 05:08:52 -05:00
parent 31ea3c3e1f
commit a80d0fa1c4

View File

@ -70,6 +70,11 @@
owner: "root"
group: "git"
path: "/etc/gitea"
- name: Check for config
stat: path="/etc/gitea/app.ini"
register: p
- name: Deploy config
block:
- name: Generate INTERNAL_TOKEN"
command: /usr/local/bin/gitea generate secret INTERNAL_TOKEN
register: gitea_internal_token
@ -81,4 +86,5 @@
src: "app.ini"
dest: "/etc/gitea/app.ini"
mode: "0640"
when: not p.stat.exists
become: yes