Add support for 802.1x wired connections (EAP-TLS only)

Only EAP-TLS method is supported. Must use NetworkManager as the network_provider.
Also fixed bug in do_connections_validate_nm() function.
This commit is contained in:
Jack Adolph 2020-03-02 01:19:14 +11:00 committed by Till Maas
parent d32f4e5a7b
commit 4af8f23955
22 changed files with 961 additions and 7 deletions

View file

@ -20,16 +20,23 @@ network_provider_current: "{{
# Default to the auto-detected value
network_provider: "{{ network_provider_current }}"
# wpa_supplicant is required if any 802.1x connections are defined
wpa_supplicant_required: "{{ network_connections |
json_query('[*][\"802.1x\"]') | flatten | count > 0 }}"
_network_packages_default_802_1x: ["{% if wpa_supplicant_required
%}wpa_supplicant{% endif %}"]
# The python-gobject-base package depends on the python version and
# distribution:
# - python-gobject-base on RHEL7 (no python2-gobject-base :-/)
# - python3-gobject-base on Fedora 28+
_network_packages_default_gobject_packages: ["python{{
ansible_python['version']['major'] | replace('2', '')}}-gobject-base"]
network_service_name_default_nm: NetworkManager
network_packages_default_nm:
- ethtool
- NetworkManager
- "python{{ ansible_python['version']['major'] | replace('2', '')
}}-gobject-base"
network_packages_default_nm: "{{ ['ethtool', 'NetworkManager']
+ _network_packages_default_gobject_packages|select()|list()
+ _network_packages_default_802_1x|select()|list()}}"
network_service_name_default_initscripts: network