refactor ♻️: Refactor regex and add debug info
Refactored the regular expression to improve pattern matching and added debug information for better traceability in the `tasks/main.yml` file.
This commit is contained in:
@@ -20,10 +20,10 @@
|
||||
{{
|
||||
bridge_links.stdout_lines
|
||||
| select('search', 'master ' ~ wol_bridge)
|
||||
| map('regex_replace', '^\\d+: ([^:@]+).*', '\\1')
|
||||
| reject('search', '^tap')
|
||||
| reject('search', '^fw')
|
||||
| reject('equalto', '')
|
||||
| select('match', '^\\d+: [a-zA-Z0-9]+:')
|
||||
| reject('search', ' veth')
|
||||
| reject('search', ' tap')
|
||||
| map('regex_replace', '^\\d+: ([^:]+):.*', '\\1')
|
||||
| first
|
||||
}}
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
msg: >
|
||||
Unable to detect physical NIC backing {{ wol_bridge }}.
|
||||
Please set wol_interface explicitly.
|
||||
Bridge output:
|
||||
{{ bridge_links.stdout_lines }}
|
||||
when: wol_detected_phy | default('') | length == 0
|
||||
|
||||
# ------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user