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:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
letsencrypt_email:
|
letsencrypt_email:
|
||||||
description: Почта для уведомлений Let's Encrypt
|
description: Почта для уведомлений Let's Encrypt (по умолчанию из group_vars/all.yml)
|
||||||
required: true
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
default: 'vvkarpenok@gmail.com'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
install:
|
install:
|
||||||
@@ -25,10 +26,6 @@ jobs:
|
|||||||
echo "В секретах нет RUNNER_SSH_KEY." >&2
|
echo "В секретах нет RUNNER_SSH_KEY." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ -z "${NETBIRD_LETSENCRYPT_EMAIL}" ]; then
|
|
||||||
echo "Укажите почту Let's Encrypt при запуске." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf "${HOME}/homelab-infra"
|
rm -rf "${HOME}/homelab-infra"
|
||||||
git clone https://gitea.gunihome.ru/karpenok/homelab-infra.git "${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"
|
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 \
|
ansible-playbook playbooks/site.yml \
|
||||||
-i inventories/prod/hosts.yml \
|
-i inventories/prod/hosts.yml \
|
||||||
--limit netbird \
|
--limit netbird \
|
||||||
--private-key "${HOME}/.ssh/id_ed25519" \
|
--private-key "${HOME}/.ssh/id_ed25519" \
|
||||||
-e "netbird_letsencrypt_email=${NETBIRD_LETSENCRYPT_EMAIL}"
|
"${extra_args[@]}"
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
# Общие глобальные переменные для всей инфраструктуры homelab (окружение prod)
|
||||||
|
admin_email: vvkarpenok@gmail.com
|
||||||
|
letsencrypt_email: "{{ admin_email }}"
|
||||||
@@ -4,3 +4,5 @@ netbird_ports:
|
|||||||
- 80/tcp
|
- 80/tcp
|
||||||
- 443/tcp
|
- 443/tcp
|
||||||
- 3478/udp
|
- 3478/udp
|
||||||
|
|
||||||
|
netbird_letsencrypt_email: "{{ letsencrypt_email | default(admin_email) }}"
|
||||||
Reference in new issue
Block a user