fix(netbird): вынести адрес машины и домен в inventory
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
bb6bb5969d
commit
a23232ac1c
10 files changed
+64
-42
No files matched your search
@@ -24,6 +24,7 @@
|
||||
- ufw
|
||||
- openssl
|
||||
- ca-certificates
|
||||
- curl
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
@@ -122,16 +123,21 @@
|
||||
no_log: true
|
||||
when: not netbird_env.stat.exists
|
||||
|
||||
- name: Положить манифесты панели
|
||||
- name: Положить манифест панели
|
||||
ansible.builtin.copy:
|
||||
src: "{{ playbook_dir }}/{{ item }}"
|
||||
dest: "{{ netbird_dir }}/{{ item }}"
|
||||
src: "{{ playbook_dir }}/compose.yaml"
|
||||
dest: "{{ netbird_dir }}/compose.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: Собрать dashboard.env
|
||||
ansible.builtin.template:
|
||||
src: dashboard.env.j2
|
||||
dest: "{{ netbird_dir }}/dashboard.env"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
loop:
|
||||
- compose.yaml
|
||||
- dashboard.env
|
||||
|
||||
- name: Собрать config.yaml
|
||||
ansible.builtin.template:
|
||||
@@ -156,6 +162,17 @@
|
||||
register: compose_ps
|
||||
changed_when: false
|
||||
|
||||
- name: Дождаться ответа панели
|
||||
ansible.builtin.command: >
|
||||
curl -sk --resolve {{ netbird_domain }}:443:127.0.0.1
|
||||
-o /dev/null -w '%{http_code}'
|
||||
https://{{ netbird_domain }}/
|
||||
register: panel_http
|
||||
changed_when: false
|
||||
retries: 30
|
||||
delay: 10
|
||||
until: panel_http.stdout in ['200', '302']
|
||||
|
||||
- name: Итог установки
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ compose_ps.stdout_lines + ['Первый вход: https://central.gunihome.ru/setup'] }}"
|
||||
msg: "{{ compose_ps.stdout_lines + ['Первый вход: https://' + netbird_domain + '/setup'] }}"
|
||||
Reference in new issue
Block a user