chore(ansible,ci): align workflow paths, shared letsencrypt_email, and netbird task tags
ansible-core-net / deploy (push) Successful in 27s
ansible-core-secrets / deploy (push) Successful in 12s
ansible-rus-central / deploy (push) Successful in 36s

This commit is contained in:
karpenok committed 2026-11-11 11:35:45 +07:00
1 parent a0507719b0
commit 842a633916
6 files changed
+10 -22

No files matched your search

+3
View File
@@ -5,12 +5,15 @@ on:
branches: branches:
- main - main
paths: paths:
- 'ansible/ansible.cfg'
- 'ansible/ci/**'
- 'ansible/roles/core-net/**' - 'ansible/roles/core-net/**'
- 'ansible/roles/host/**' - 'ansible/roles/host/**'
- 'ansible/playbooks/core-net.yml' - 'ansible/playbooks/core-net.yml'
- 'ansible/playbooks/host.yml' - 'ansible/playbooks/host.yml'
- 'ansible/playbooks/site.yml' - 'ansible/playbooks/site.yml'
- 'ansible/inventories/prod/hosts.yml' - 'ansible/inventories/prod/hosts.yml'
- 'ansible/inventories/prod/host_vars/core-net.yml'
- 'ansible/inventories/prod/group_vars/**' - 'ansible/inventories/prod/group_vars/**'
workflow_dispatch: workflow_dispatch:
@@ -5,12 +5,15 @@ on:
branches: branches:
- main - main
paths: paths:
- 'ansible/ansible.cfg'
- 'ansible/ci/**'
- 'ansible/roles/core-secrets/**' - 'ansible/roles/core-secrets/**'
- 'ansible/roles/host/**' - 'ansible/roles/host/**'
- 'ansible/playbooks/core-secrets.yml' - 'ansible/playbooks/core-secrets.yml'
- 'ansible/playbooks/host.yml' - 'ansible/playbooks/host.yml'
- 'ansible/playbooks/site.yml' - 'ansible/playbooks/site.yml'
- 'ansible/inventories/prod/hosts.yml' - 'ansible/inventories/prod/hosts.yml'
- 'ansible/inventories/prod/host_vars/core-secrets.yml'
- 'ansible/inventories/prod/group_vars/**' - 'ansible/inventories/prod/group_vars/**'
workflow_dispatch: workflow_dispatch:
+2
View File
@@ -5,6 +5,8 @@ on:
branches: branches:
- main - main
paths: paths:
- 'ansible/ansible.cfg'
- 'ansible/ci/**'
- 'ansible/roles/rus-central/**' - 'ansible/roles/rus-central/**'
- 'ansible/roles/host/**' - 'ansible/roles/host/**'
- 'ansible/playbooks/rus-central.yml' - 'ansible/playbooks/rus-central.yml'
+1 -1
View File
@@ -61,7 +61,7 @@ if [ "$full" -eq 0 ] && [ -n "$changed" ]; then
for file in $changed; do for file in $changed; do
[ -n "$file" ] || continue [ -n "$file" ] || continue
case "$file" in case "$file" in
ansible/roles/host/* | ansible/playbooks/host.yml | ansible/playbooks/site.yml | ansible/playbooks/"$machine".yml | ansible/inventories/prod/hosts.yml | ansible/inventories/prod/group_vars/* | ansible/inventories/prod/host_vars/"$machine".yml) ansible/ansible.cfg | ansible/ci/* | ansible/roles/host/* | ansible/playbooks/host.yml | ansible/playbooks/site.yml | ansible/playbooks/"$machine".yml | ansible/inventories/prod/hosts.yml | ansible/inventories/prod/group_vars/* | ansible/inventories/prod/host_vars/"$machine".yml)
full_from_files=1 full_from_files=1
;; ;;
ansible/roles/"$machine"/*/*) ansible/roles/"$machine"/*/*)
@@ -3,4 +3,4 @@ traefik_version: "v3.3.7"
traefik_dir: "/opt/traefik" traefik_dir: "/opt/traefik"
traefik_dynamic_dir: "/opt/traefik/dynamic" traefik_dynamic_dir: "/opt/traefik/dynamic"
traefik_log_dir: "/var/log/traefik" traefik_log_dir: "/var/log/traefik"
traefik_acme_email: "vvkarpenok@gmail.com" traefik_acme_email: "{{ letsencrypt_email }}"
@@ -27,8 +27,6 @@
- netbird_session_key is defined and netbird_session_key | length > 0 - netbird_session_key is defined and netbird_session_key | length > 0
- netbird_letsencrypt_email is defined and netbird_letsencrypt_email | length > 3 - netbird_letsencrypt_email is defined and netbird_letsencrypt_email | length > 3
fail_msg: "Не задан домен NetBird (host_vars) или один из секретов NETBIRD_AUTH_SECRET, NETBIRD_DATASTORE_KEY, NETBIRD_SESSION_KEY, NETBIRD_LETSENCRYPT_EMAIL." fail_msg: "Не задан домен NetBird (host_vars) или один из секретов NETBIRD_AUTH_SECRET, NETBIRD_DATASTORE_KEY, NETBIRD_SESSION_KEY, NETBIRD_LETSENCRYPT_EMAIL."
tags:
- config
- name: Записать .env - name: Записать .env
ansible.builtin.template: ansible.builtin.template:
@@ -39,8 +37,6 @@
mode: "0600" mode: "0600"
no_log: true no_log: true
notify: Перезапустить NetBird notify: Перезапустить NetBird
tags:
- config
- name: Положить манифест панели - name: Положить манифест панели
ansible.builtin.copy: ansible.builtin.copy:
@@ -50,8 +46,6 @@
group: root group: root
mode: "0644" mode: "0644"
notify: Перезапустить NetBird notify: Перезапустить NetBird
tags:
- config
- name: Собрать dashboard.env - name: Собрать dashboard.env
ansible.builtin.template: ansible.builtin.template:
@@ -61,8 +55,6 @@
group: root group: root
mode: "0644" mode: "0644"
notify: Перезапустить NetBird notify: Перезапустить NetBird
tags:
- config
- name: Собрать config.yaml - name: Собрать config.yaml
ansible.builtin.template: ansible.builtin.template:
@@ -73,13 +65,9 @@
mode: "0600" mode: "0600"
no_log: true no_log: true
notify: Перезапустить NetBird notify: Перезапустить NetBird
tags:
- config
- name: Применить изменения конфигурации - name: Применить изменения конфигурации
ansible.builtin.meta: flush_handlers ansible.builtin.meta: flush_handlers
tags:
- config
- name: Убедиться, что панель запущена - name: Убедиться, что панель запущена
ansible.builtin.command: docker compose up -d ansible.builtin.command: docker compose up -d
@@ -87,8 +75,6 @@
chdir: "{{ netbird_dir }}" chdir: "{{ netbird_dir }}"
register: compose_up register: compose_up
changed_when: "'Started' in compose_up.stderr or 'Created' in compose_up.stderr or 'Recreated' in compose_up.stderr" changed_when: "'Started' in compose_up.stderr or 'Created' in compose_up.stderr or 'Recreated' in compose_up.stderr"
tags:
- config
- name: Показать состояние контейнеров - name: Показать состояние контейнеров
ansible.builtin.command: docker compose ps ansible.builtin.command: docker compose ps
@@ -96,8 +82,6 @@
chdir: "{{ netbird_dir }}" chdir: "{{ netbird_dir }}"
register: compose_ps register: compose_ps
changed_when: false changed_when: false
tags:
- config
- name: Дождаться ответа панели - name: Дождаться ответа панели
ansible.builtin.command: > ansible.builtin.command: >
@@ -109,11 +93,7 @@
retries: 30 retries: 30
delay: 10 delay: 10
until: panel_http.stdout in ['200', '302'] until: panel_http.stdout in ['200', '302']
tags:
- config
- name: Итог установки - name: Итог установки
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ compose_ps.stdout_lines + ['Первый вход: https://' + netbird_domain + '/setup'] }}" msg: "{{ compose_ps.stdout_lines + ['Первый вход: https://' + netbird_domain + '/setup'] }}"
tags:
- config