-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network/tasks/detected_network.yml: can_be_ap grep failed on absence of regex #3323
Conversation
Quickly tested and Ed in the UK will now further test after merge. |
|
Not by the OS per se, but I believe that yes iiab/roles/1-prep/tasks/main.yml Lines 38 to 40 in 2efd7c0
Which ran: iiab/roles/network/tasks/install.yml Lines 22 to 38 in 2efd7c0
|
Please move the discussion to his actual ticket if possible? |
That doesn't answer the question of why the stanza failed on the first pass.. Then at some point recorded can_be_ap as True |
Recap, of what's explained in this PR itself: Our Ansible logic was just wrong (prior to this PR). As it failed when attempted on any laptop (machine) like the one @EMG70 is attempting to get working with IIAB — e.g. when 'AP' (or anything like it) is not contained anywhere in the output of In short, the logic that we had in place was just wrong, failing to account for the above kind of situation — when the shell command fails — as a result of grep return code of 1. As mentioned earlier today: this failure occurs regardless of the whatever regex grep is scanning for. Specifically: when the regular expression (whatever regex) is not found in the output of |
Indeed the earlier regular expression had serious errors (counting the wrong kinds of lines until about May, which is now cleaned up). I agree a simple simple existence test is what's really needed (no counting, no fancy corner cases, just a Dead Simple yes-or-no presence test which things like So the code is not the most elegant as is — but so be it at least it's finally fixed yay. Thanks go to @EMG70 for uncovering this. |
You have never shown any supporting evidence or issues reported to support that claim. |
Erroneous results were in fact extremely common, caused be strings that happen to contain the letters 'AP' within another word. As documented here: iiab/roles/network/tasks/detected_network.yml Line 112 in d99fcad
This is the reason the regex was much improved around May (of this year). (Apparently EAP = Extensible Authentication Protocol) |
In the face of the lack of presented evidence that statement is hearsay and nothing more. |
Emergency patch to help those whose laptops don't even mention AP at all in the output of
iw list
Building on: