commit a345e980c4fd46a51ff8cd2ea1da5d53b5a0ca4b
parent bd2aca0200cac847009e7f7850c364db22cf3576
Author: Leah Thein <leah@toaster.home.ctu.cx>
Date: Tue, 8 Dec 2020 00:28:24 +0100
parent bd2aca0200cac847009e7f7850c364db22cf3576
Author: Leah Thein <leah@toaster.home.ctu.cx>
Date: Tue, 8 Dec 2020 00:28:24 +0100
arch/hostap: add role
2 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/arch/roles/hostapd/tasks/main.yml b/arch/roles/hostapd/tasks/main.yml @@ -0,0 +1,18 @@ +--- + +- name: "Install package: hostapd" + pacman: + name: hostapd + state: present + update_cache: yes + +- name: "create file: /etc/hostapd/hostapd.conf" + template: + src: hostapd.conf.j2 + dest: /etc/hostapd/hostapd.conf + +- name: "Enable and restart service: hostapd" + systemd: + name: hostapd + enabled: yes + state: started
diff --git a/arch/roles/hostapd/templates/hostapd.conf.j2 b/arch/roles/hostapd/templates/hostapd.conf.j2 @@ -0,0 +1,23 @@ +interface={{hostapd.interface}} +bridge={{hostapd.bridge}} + +ssid={{hostapd.ssid}} +driver=nl80211 +country_code=DE + +hw_mode=g +channel={{hostapd.channel}} + +wpa=2 +auth_algs=1 + +rsn_pairwise=CCMP +wpa_key_mgmt=WPA-PSK +wpa_passphrase={{hostapd.passphrase}} + +logger_stdout=-1 +logger_stdout_level=2 + +ieee80211n=1 +wmm_enabled=1 +ht_capab=[HT40+]