Skip to content
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

Fixes to upstream #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

stejoo
Copy link

@stejoo stejoo commented Feb 26, 2021

I performed some maintenance and made some improvements to your nice Ansible wpa_supplicant role.
Perhaps they are of interest of you?

The commits should speak for themselves on what they change.
I would of course be happy to answer any questions, ideas or objections you might have.

Replaced `with_items:` loop construct with `loop:`.
wpa_supplicant by default enables WiFi Direct functionality. In case you
have no need for this functionality you can disable it by defining
`wpa_p2p_disabled: 1`.

Having P2P enabled adds a socket file to the control path (default at
`/var/run/wpa_supplicant`). Calls to `wpa_cli reconfigure` can end up
trying to reconfigure the `p2p-dev-wlan0` instead of `wlan0`. Disabling
P2P functionality prevents generation of the `p2p-dev-wlan0` socket
file and restore expected `wpa_cli reconfigure` behaviour.
When Ansible was run in check mode the task to generate the encrypted
passphrase would not be executed causing the variable substitution in
them template following to fail.
Now we always run the `wpa_passphrase` command, even in check mode.
Ansible 2.7 handles looping with package managers differently. [1]
It used to perform list squashing when the loop detected it was being
combined with a package manager module that supported installing the
packages in a single transaction. Because this is no longer the case
it's better to give a list of packages to the package manager module.

[1]: https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.7.html#using-a-loop-on-a-package-module-via-squash-actions
@stejoo
Copy link
Author

stejoo commented Feb 26, 2021

Also:
In my fork I did a bit more work to add a feature to support a systemd wpa_supplicant service instance to manage a specific interface. And I removed the broken test code as I didn't want to go into that right now. I did test several permutations by hand where it worked just fine. Feel free to let me know if you are interested in that commit as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant