Add support for WPA EAP
This commit is contained in:
parent
87f7a7a768
commit
ae140f1966
|
@ -20,7 +20,11 @@ so we're using a `ssid` attribute, which default to the names for SSIDs without
|
||||||
{% set suffixes = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=suffixes') or [''] %}
|
{% set suffixes = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=suffixes') or [''] %}
|
||||||
{% set ssid = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=ssid') or name %}
|
{% set ssid = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=ssid') or name %}
|
||||||
{% set type = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=type') or 'wpa' %}
|
{% set type = lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=type') or 'wpa' %}
|
||||||
|
{% if type in ('wpa', 'wep', 'wpa-eap') %}
|
||||||
{% set pass = lookup('community.general.passwordstore', 'wifi/' + name) %}
|
{% set pass = lookup('community.general.passwordstore', 'wifi/' + name) %}
|
||||||
|
{% else %}
|
||||||
|
{% set pass = 'Error, no pass for type ' + type %}
|
||||||
|
{% endif %}
|
||||||
# {{ name }}
|
# {{ name }}
|
||||||
{% for suffix in suffixes %}
|
{% for suffix in suffixes %}
|
||||||
network={
|
network={
|
||||||
|
@ -30,6 +34,14 @@ network={
|
||||||
{% elif type == 'wep' %}
|
{% elif type == 'wep' %}
|
||||||
key_mgmt=NONE
|
key_mgmt=NONE
|
||||||
wep_key0={{ pass }}
|
wep_key0={{ pass }}
|
||||||
|
{% elif type == 'wpa-eap' %}
|
||||||
|
key_mgmt=WPA-EAP
|
||||||
|
eap={{ lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=eap') }}
|
||||||
|
identity="{{ lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=identity') }}"
|
||||||
|
password="{{ pass }}"
|
||||||
|
ca_cert="{{ lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=ca_cert') }}"
|
||||||
|
altsubject_match="{{ lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=altsubject_match') }}"
|
||||||
|
phase2="{{ lookup('community.general.passwordstore', 'wifi/' + name + ' subkey=phase2') }}"
|
||||||
{% elif type == 'open' %}
|
{% elif type == 'open' %}
|
||||||
key_mgmt=NONE
|
key_mgmt=NONE
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in a new issue