Ignore:
Timestamp:
Aug 23, 2016, 12:02:23 AM (10 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
0.5, app-cordova, debian/bullseye, debian/jessie, master
Children:
04de4a4
Parents:
b5208ff
Message:

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

Location:
src/puppetcode/environments/test
Files:
8 added
6 edited

Legend:

Unmodified
Added
Removed
  • src/puppetcode/environments/test/hieradata/common.yaml

    rb5208ff r2925c4a  
    55  - gnuboat_gpsd
    66  - gnuboat_gnuboat
     7  - gnuboat_hostapd
    78
    89gnuboat_lighttpd::servuce::status: 'running'
    … …  
    2122gnuboat_gnuboat::server: true
    2223gnuboat_gnuboat::webclient: true
     24gnuboat_hostapd::config::interface: 'wlan0'
     25gnuboat_hostapd::config::country_code: 'de'
  • src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/config.pp

    rb5208ff r2925c4a  
    1 class config
     1class gnuboat_hostapd::config
    22(
    3         String $interface = 'wlan0',
     3        String $interface,
     4        String $netmask = '255.255.255.0',
    45        String $hw_mode = 'g',
    56        Integer $channel = 0,
    … …  
    910        Boolean $ieee80211ac = false,
    1011        Boolean $wmm_enabled = false,
    11         String $ssid = 'GNU Boat',
     12        String $ssid = 'GNUBoat',
    1213        Enum['1', '2', '3'] $auth_algs = '1',
    13         Integer $wpa = '2',
     14        Integer $wpa = 2,
    1415        String $wpa_key_mgmt = 'WPA-PSK',
    1516        String $rsn_pairwise = 'CCMP',
    16         String $wpa_passphrase = 'GNUBoat',
     17        String $wpa_passphrase = 'gnu.boat',
    1718)
    18 inherits hostapd
     19inherits gnuboat_hostapd
    1920{
    20         file{'/etc/hostapd/hostapd.conf',
     21        file{'/etc/hostapd/hostapd.conf':
    2122                ensure => present,
    2223                owner => 'root',
    2324                group => 'root',
    2425                mode => '0600',
    25                 content => epp('puppet:///hostapd/hostapd.conf.epp',
     26                content => epp('gnuboat_hostapd/hostapd.conf.epp',
    2627                        {
    2728                                'interface' => $interface,
    … …  
    4243                ),
    4344        }
     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
    4468}
  • src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/init.pp

    rb5208ff r2925c4a  
    1 class hostapd
     1class gnuboat_hostapd
    22(
    33        String $version = 'latest',
     4        String $hostip = '192.168.254.1',
     5        String $hostname = 'gnu',
     6        String $domain = 'boat',
     7        Boolean $dnsmasq_enable = true,
    48)
    59{
     10        contain gnuboat_hostapd::install
     11        contain gnuboat_hostapd::service
     12        contain gnuboat_hostapd::config
    613
     14        Class['gnuboat_hostapd::install'] ->
     15        Class['gnuboat_hostapd::config'] ->
     16        Class['gnuboat_hostapd::service']
     17
     18
     19        if $dnsmasq_enable {
     20                contain gnuboat_hostapd::dnsmasq_install
     21                contain gnuboat_hostapd::dnsmasq_service
     22                contain gnuboat_hostapd::dnsmasq_config
     23
     24                Class['gnuboat_hostapd::dnsmasq_install'] ->
     25                Class['gnuboat_hostapd::dnsmasq_config'] ->
     26                Class['gnuboat_hostapd::dnsmasq_service']
     27        }
    728}
  • src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/install.pp

    rb5208ff r2925c4a  
    1 class hostapd::install() inherits hostapd
     1class gnuboat_hostapd::install() inherits gnuboat_hostapd
    22{
    33        package{'hostapd':
  • src/puppetcode/environments/test/modules/gnuboat_hostapd/manifests/service.pp

    rb5208ff r2925c4a  
    1 class hostapd::service
     1class gnuboat_hostapd::service
    22(
    33        Enum['running', 'stopped'] $status = 'running',
    44        Boolean $enabled = true,
    55)
    6 inherits hostapd
     6inherits gnuboat_hostapd
    77{
    88        service{'hostapd':
  • src/puppetcode/environments/test/modules/gnuboat_hostapd/templates/hostapd.conf.epp

    rb5208ff r2925c4a  
    66ieee80211n=<%= $ieee80211n %>
    77ieee80211ac=<%= $ieee80211ac %>
    8 <% if wmm_enabled %>
    9         wmm_enabled=1
    10 <% else %>
    11         wmm_enabled=0
    12 <% end %>
     8<% if wmm_enabled { -%>
     9wmm_enabled=1
     10<% } else { -%>
     11wmm_enabled=0
     12<% } -%>
    1313ssid=<%= $ssid %>
    1414auth_algs=<%= $auth_algs %>
Note: See TracChangeset for help on using the changeset viewer.