Unverified Commit 8ed1ab06 authored by Andrew Teixeira's avatar Andrew Teixeira
Browse files

* Add missing options to home_server configuration

* Remove tests/init.pp to fix check:test_file spec test
parent 2e689fbb
# Configure a home_server for proxy config
define freeradius::home_server (
Enum['udp', 'tcp'] $proto = 'udp',
String $secret,
Enum['none', 'status-server', 'request'] $status_check = 'none',
Enum['auth', 'acct', 'auth+acct', 'coa'] $type = 'auth',
Optional[Integer] $check_interval = undef,
Optional[String] $ipaddr = undef,
Optional[String] $ipv6addr = undef,
Optional[String] $virtual_server = undef,
Optional[Integer] $max_outstanding = undef,
Optional[Enum['no', 'yes']] $no_response_fail = undef,
Optional[Integer] $num_answers_to_alive = undef,
Optional[String] $password = undef,
Optional[Integer] $port = 1812,
Enum['udp', 'tcp'] $proto = 'udp',
Enum['none', 'status-server', 'request'] $status_check = 'none',
Optional[Integer] $response_window = undef,
Optional[Integer] $revive_interval = undef,
Optional[String] $src_ipaddr = undef,
Optional[String] $username = undef,
Optional[String] $virtual_server = undef,
Optional[Integer] $zombie_period = undef,
) {
$fr_basepath = $::freeradius::params::fr_basepath
......
home_server <%= @name %> {
type = <%= @type %>
type = <%= @type %>
<% if defined?(@ipaddr) -%>
ipaddr = <%= @ipaddr %>
ipaddr = <%= @ipaddr %>
<% end -%>
<% if defined?(@ipv6addr) -%>
ipv6addr = <%= @ipv6addr %>
ipv6addr = <%= @ipv6addr %>
<% end -%>
<% if defined?(@virtual_server) -%>
virtual_server = <%= @virtual_server %>
virtual_server = <%= @virtual_server %>
<% end -%>
port = <%= @port %>
proto = <%= @proto %>
secret = <%= @secret %>
<% if defined?(@src_ipaddr) -%>
src_ipaddr = <%= @src_ipaddr %>
<% end -%>
<% if defined?(@response_window) -%>
response_window = <%= @response_window %>
<% end -%>
<% if defined?(@no_response_fail) -%>
no_response_fail = <%= @no_response_fail %>
<% end -%>
<% if defined?(@zombie_period) -%>
zombie_period = <%= @zombie_period %>
<% end -%>
<% if defined?(@revive_interval) -%>
revive_interval = <%= @revive_interval %>
<% end -%>
port = <%= @port %>
proto = <%= @proto %>
secret = <%= @secret %>
<%- if @status_check -%>
status_check = <%= @status_check %>
status_check = <%= @status_check %>
<%- end -%>
<% if defined?(@username) -%>
username = <%= @username %>
<% end -%>
<% if defined?(@password) -%>
password = <%= @password %>
<% end -%>
<% if defined?(@check_interval) -%>
check_interval = <%= @check_interval %>
<% end -%>
<% if defined?(@num_answers_to_alive) -%>
num_answers_to_alive = <%= @num_answers_to_alive %>
<% end -%>
<% if defined?(@max_outstanding) -%>
max_outstanding = <%= @max_outstanding %>
<% end -%>
}
# The baseline for module testing used by Puppet Labs is that each manifest
# should have a corresponding test manifest that declares that class or defined
# type.
#
# Tests are then run by using puppet apply --noop (to check for compilation
# errors and view a log of events) or by fully applying the test in a virtual
# environment (to compare the resulting system state to the desired state).
#
# Learn more about module testing here:
# http://docs.puppetlabs.com/guides/tests_smoke.html
#
include freeradius
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment