feat: вынести admin_email и letsencrypt_email в group_vars/all.yml
This commit is contained in:
1 parent
a084498d0d
commit
3481829b62
3 files changed
+15
-7
No files matched your search
@@ -4,9 +4,10 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
letsencrypt_email:
|
||||
description: Почта для уведомлений Let's Encrypt
|
||||
required: true
|
||||
description: Почта для уведомлений Let's Encrypt (по умолчанию из group_vars/all.yml)
|
||||
required: false
|
||||
type: string
|
||||
default: 'vvkarpenok@gmail.com'
|
||||
|
||||
jobs:
|
||||
install:
|
||||
@@ -25,10 +26,6 @@ jobs:
|
||||
echo "В секретах нет RUNNER_SSH_KEY." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "${NETBIRD_LETSENCRYPT_EMAIL}" ]; then
|
||||
echo "Укажите почту Let's Encrypt при запуске." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rm -rf "${HOME}/homelab-infra"
|
||||
git clone https://gitea.gunihome.ru/karpenok/homelab-infra.git "${HOME}/homelab-infra"
|
||||
@@ -45,8 +42,13 @@ jobs:
|
||||
|
||||
cd "${HOME}/homelab-infra"
|
||||
|
||||
extra_args=()
|
||||
if [ -n "${NETBIRD_LETSENCRYPT_EMAIL:-}" ]; then
|
||||
extra_args+=("-e" "netbird_letsencrypt_email=${NETBIRD_LETSENCRYPT_EMAIL}")
|
||||
fi
|
||||
|
||||
ansible-playbook playbooks/site.yml \
|
||||
-i inventories/prod/hosts.yml \
|
||||
--limit netbird \
|
||||
--private-key "${HOME}/.ssh/id_ed25519" \
|
||||
-e "netbird_letsencrypt_email=${NETBIRD_LETSENCRYPT_EMAIL}"
|
||||
"${extra_args[@]}"
|
||||
Reference in new issue
Block a user