diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-09-23 16:50:46 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-09-26 16:10:09 +0300 |
commit | 20596acbfb10f92ee7ea04facaea68c3bd340c3f (patch) | |
tree | a77f3d78070fbbf53535b010cdd56290c6d0e610 | |
parent | ef137489a2af825da682169ed3a532c452e4f68c (diff) | |
download | minipc-router-20596acbfb10f92ee7ea04facaea68c3bd340c3f.tar.gz |
Move hotspot defaults to top level
-rw-r--r-- | ansible/minipc-router.yml | 36 | ||||
-rw-r--r-- | ansible/roles/hotspot/defaults/main.yml | 17 | ||||
-rw-r--r-- | ansible/roles/hotspot/templates/hostapd.conf.j2 | 6 |
3 files changed, 38 insertions, 21 deletions
diff --git a/ansible/minipc-router.yml b/ansible/minipc-router.yml index e99f49a..936c9ce 100644 --- a/ansible/minipc-router.yml +++ b/ansible/minipc-router.yml @@ -1,10 +1,44 @@ +# You need to update the parts marked FIXME in vars. + - hosts: router remote_user: ansible become: yes vars: - debian_mirror: http://ftp.fi.debian.org/debian + + # Hostname of the router. hostname: router + + # The Debian mirror to use. + debian_mirror: http://ftp.fi.debian.org/debian + + # The Debian release to use. distro: jessie + + # Your wifi network name (SSID). + ssid: FIXME + + # Your country code for wifi. + country: FIXME + + # Your passphrase for wifi. + wifi_passphrase: FIXME + + # Wireless device, check `iwconfig` + interface: wlan0 + + # Set if interface is a bridge, leave empty otherwise + bridge: br0 + + # IEEE 802.11 operation mode + # Supported modes: a, b, g, ad + wifi_mode: g + + # Enable 802.11n, if supported by chipset + ieee80211n: 1 + + # Wifi channel to use, check `iw list` + wifi_channel: 2 + roles: - dhcp-client - sane-debian-system diff --git a/ansible/roles/hotspot/defaults/main.yml b/ansible/roles/hotspot/defaults/main.yml deleted file mode 100644 index a413af9..0000000 --- a/ansible/roles/hotspot/defaults/main.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Your network SSID -ssid: Caprica -# Your country code -country: FI -# Your passphrase -passphrase: "{{ lookup('pipe', 'pass show office_network/wifi') }}" -# Wireless device, check `iwconfig` -interface: wlan0 -# Set if interface is a bridge, leave empty otherwise -bridge: br0 -# IEEE 802.11 operation mode -# Supported modes: a, b, g, ad -mode: g -# Enable 802.11n, if supported by chipset -ieee80211n: 1 -# Channel to use, check `iw list` -channel: 2 diff --git a/ansible/roles/hotspot/templates/hostapd.conf.j2 b/ansible/roles/hotspot/templates/hostapd.conf.j2 index 83ff514..3ce7744 100644 --- a/ansible/roles/hotspot/templates/hostapd.conf.j2 +++ b/ansible/roles/hotspot/templates/hostapd.conf.j2 @@ -5,16 +5,16 @@ bridge={{ bridge }} driver=nl80211 ssid={{ ssid }} country_code={{ country }} -hw_mode={{ mode }} +hw_mode={{ wifi_mode }} ieee80211n={{ ieee80211n }} -channel={{ channel }} +channel={{ wifi_channel }} macaddr_acl=0 auth_algs=1 ignore_broadcast_ssid=0 wmm_enabled=1 # bit1: WPA2 only wpa=1 -wpa_passphrase={{ passphrase }} +wpa_passphrase={{ wifi_passphrase }} wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 wpa_pairwise=TKIP rsn_pairwise=CCMP |