This commit is contained in:
2026-02-15 10:44:44 +02:00
parent dc5aff7e98
commit 43750e3549
3 changed files with 55 additions and 8 deletions

View File

@@ -0,0 +1,47 @@
---
- name: WiFiDebug scheduler wrapper
hosts: all
gather_facts: false
vars:
sot_wrapper_mode: true
tasks:
- name: Run sot-updater-iponly in wrapper mode
import_playbook: sot-updater-iponly.yml
- name: Extract NetBox IP from preflight output
set_fact:
nb_ip: >-
{{
(nb_preflight.stdout_lines
| select('match', '^NB_IP=')
| list
| first
| regex_replace('^NB_IP=', '')
) | default('')
}}
when:
- nb_preflight is defined
- nb_preflight.stdout_lines is defined
- name: Fail if NetBox IP not found
fail:
msg: "NB_IP not found in nb_preflight output, cannot continue wrapper"
when:
- nb_ip is not defined or nb_ip | length == 0
- name: Override ansible_host to NetBox IP
set_fact:
ansible_host: "{{ nb_ip }}"
- name: Reset SSH connection after changing ansible_host
meta: reset_connection
- name: Small pause after reset_connection
pause:
seconds: 2
- import_playbook: wifidebug17.yml
vars:
is_run_by: "scheduler"