Pass env vars through pre-deploy hook

This commit is contained in:
Luke Murphy 2020-04-15 11:58:24 +02:00
parent f23935bd1a
commit 64069181d6
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 4 additions and 6 deletions

View File

@ -59,6 +59,4 @@ env:
SSH_LISTEN_PORT: "2222"
SSH_PORT: "222"
STARTUP_TIMEOUT: "0"
USER_GID: "{{ vars.git_user_guid }}"
USER_UID: "{{ vars.git_user_uid }}"
WHITELIST_URIS: "https://{{ vars.domain }}"

View File

@ -20,14 +20,14 @@
key: git
split: ":"
- name: Store gitea git user uid/guid in config.vars
- name: Store gitea git user uid/guid in config.env
set_fact:
config: "{{
config.vars |
config.env |
default({}) |
combine({
'git_user_uid': getent_passwd['git'][1],
'git_user_guid': getent_passwd['git'][2],
'USER_GID': getent_passwd['git'][1],
'USER_UID': getent_passwd['git'][2],
})
}}"