source: src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/config.pp@ 9b55b08

0.5 app-cordova debian/bullseye debian/jessie
Last change on this file since 9b55b08 was 2925c4a, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago

hostapd configuration may work now, but not sure, if name resolution is configured correctly

  • Property mode set to 100644
File size: 1.6 KB
Line 
1class gnuboat_hostapd::config
2(
3 String $interface,
4 String $netmask = '255.255.255.0',
5 String $hw_mode = 'g',
6 Integer $channel = 0,
7 Boolean $ieee80211d = true,
8 String $country_code,
9 Boolean $ieee80211n = false,
10 Boolean $ieee80211ac = false,
11 Boolean $wmm_enabled = false,
12 String $ssid = 'GNUBoat',
13 Enum['1', '2', '3'] $auth_algs = '1',
14 Integer $wpa = 2,
15 String $wpa_key_mgmt = 'WPA-PSK',
16 String $rsn_pairwise = 'CCMP',
17 String $wpa_passphrase = 'gnu.boat',
18)
19inherits gnuboat_hostapd
20{
21 file{'/etc/hostapd/hostapd.conf':
22 ensure => present,
23 owner => 'root',
24 group => 'root',
25 mode => '0600',
26 content => epp('gnuboat_hostapd/hostapd.conf.epp',
27 {
28 'interface' => $interface,
29 'hw_mode' => $hw_mode,
30 'channel' => $channel,
31 'ieee80211d' => $ieee80211d,
32 'country_code' => $country_code,
33 'ieee80211n' => $ieee80211n,
34 'ieee80211ac' => $ieee80211ac,
35 'wmm_enabled' => $wmm_enabled,
36 'ssid' => $ssid,
37 'auth_algs' => $auth_algs,
38 'wpa' => $wpa,
39 'wpa_key_mgmt' => $wpa_key_mgmt,
40 'rsn_pairwise' => $rsn_pairwise,
41 'wpa_passphrase' => $wpa_passphrase,
42 }
43 ),
44 }
45
46 file{'/etc/network/interfaces.d/hostapd':
47 ensure => present,
48 owner => 'root',
49 group => 'root',
50 mode => '0600',
51 content => epp('gnuboat_hostapd/hostapd.interface.epp',
52 {
53 'interface' => $interface,
54 'hostip' => $hostip,
55 'netmask' => $netmask
56 }
57 ),
58 }
59
60 file{'/etc/default/hostapd':
61 ensure => present,
62 owner => 'root',
63 group => 'root',
64 mode => '0600',
65 content => file('gnuboat_hostapd/default'),
66 }
67
68}
Note: See TracBrowser for help on using the repository browser.