kravietz.hostapd
Nombre del Rol
Rol para configurar hostapd
usando systemd.service
que apoya todas las opciones de configuración.
Requisitos
Ninguno.
Variables del Rol
Interfaz para ejecutar hostapd
. Esta se usará para iniciar [email protected]
en systemd
.
hostapd_interface: wlan1
El siguiente diccionario hostapd_config
se convertirá uno a uno en el archivo de configuración de hostapd. Por favor, consulta la referencia de hostapd.conf para más detalles sobre las opciones individuales:
hostapd_config:
country_code: GB
bridge: br0
interface: "{{ hostapd_interface }}"
driver: nl80211
ssid: "MyWLAN"
hw_mode: g
channel: 9
wmm_enabled: 0
macaddr_acl: 0
auth_algs: 1
wpa: 2
wpa_passphrase: "OhGae6hay0rooRi0poo7" # proteger con ansible-vault
wpa_key_mgmt: WPA-PSK WPA-PSK-SHA256
wpa_pairwise: TKIP CCMP
rsn_pairwise: CCMP
ctrl_interface: /var/run/hostapd
Dependencias
Si estás conectando una red WiFi a la LAN, también puedes configurar un puente usando el rol shibumi.systemd-conf, como en el siguiente ejemplo:
systemd_conf_network:
10-lan:
- Match:
- Name: br0
- Network:
- Address: '192.168.1.251/24'
- Gateway: '192.168.1.252'
20-eth:
- Match:
- Name: eth0
- Network:
- Bridge: br0
systemd_conf_netdev:
10-bridge:
- NetDev:
- Name: br0
- Kind: bridge
Ejemplo de Playbook
Suponiendo la configuración anterior en host_vars
:
- hosts: access_point
roles:
- kravietz.hostapd
- shibumi.systemd-conf
Licencia
GPLv3
Información del Autor
Paweł Krawczyk https://krvtz.net/
Acerca del proyecto
Role to set up and configure `hostapd` using `systemd.service` that supports all configuration options.
Instalar
ansible-galaxy install kravietz.hostapd
Licencia
gpl-3.0
Descargas
668
Propietario
Information security, DevOps and DevSecOps professional from Poland living in the UK