Commit 7f90367f authored by Nathan Ward's avatar Nathan Ward
Browse files

Add a redhat_common_dependencies shared_context, which has a few resources...

Add a redhat_common_dependencies shared_context, which has a few resources which various defined types rely on
parent d2885da1
......@@ -7,30 +7,33 @@ end
# Set up freeradius::params with the redhat values, so we have something
# to test for in the freeradius spec without defining separate tests for
# every OS
redhat_params_class = 'class freeradius::params {
$fr_basepath = "/etc/raddb"
$fr_configdir = "mods-config"
$fr_db_dir = "\${localstatedir}/lib/radiusd"
$fr_group = "radiusd"
$fr_libdir = "/usr/lib64/freeradius"
$fr_logpath = "/var/log/radius"
$fr_moduleconfigpath = "/etc/raddb/mods-config"
$fr_moduledir = "mods-enabled"
$fr_modulepath = "/etc/raddb/mods-enabled"
$fr_package = "freeradius"
$fr_pidfile = "/var/run/radiusd/radiusd.pid"
$fr_raddbdir = "\${sysconfdir}/raddb"
$fr_service = "radiusd"
$fr_service_has_status = true
$fr_user = "radiusd"
$fr_version = "3"
$fr_wbpriv_user = "wbpriv"
$fr_wpa_supplicant = "wpa_supplicant"
$radacctdir = "\${logdir}/radacct"
}
include freeradius::params'
shared_context 'redhat_params' do
let(:pre_condition) do
[
'class freeradius::params {
$fr_basepath = "/etc/raddb"
$fr_configdir = "mods-config"
$fr_db_dir = "\${localstatedir}/lib/radiusd"
$fr_group = "radiusd"
$fr_libdir = "/usr/lib64/freeradius"
$fr_logpath = "/var/log/radius"
$fr_moduleconfigpath = "/etc/raddb/mods-config"
$fr_moduledir = "mods-enabled"
$fr_modulepath = "/etc/raddb/mods-enabled"
$fr_package = "freeradius"
$fr_pidfile = "/var/run/radiusd/radiusd.pid"
$fr_raddbdir = "\${sysconfdir}/raddb"
$fr_service = "radiusd"
$fr_service_has_status = true
$fr_user = "radiusd"
$fr_version = "3"
$fr_wbpriv_user = "wbpriv"
$fr_wpa_supplicant = "wpa_supplicant"
$radacctdir = "\${logdir}/radacct"
}'
redhat_params_class,
]
end
end
......@@ -40,7 +43,26 @@ end
shared_context 'freeradius_default' do
let(:pre_condition) do
[
redhat_params_class,
'class { freeradius: }'
]
end
end
# Some common dependencies for things based on names for redhat systems
shared_context 'redhat_common_dependencies' do
let(:pre_condition) do
[
redhat_params_class,
"package { 'freeradius': }",
"group { 'radiusd': }",
"service { 'radiusd': }",
"file { '/etc/raddb': ensure => directory }",
"file { '/etc/raddb/certs': ensure => directory }",
"file { '/etc/raddb/clients.d': ensure => directory }",
"file { '/etc/raddb/dictionary.d': ensure => directory }",
"file { '/etc/raddb/mods-config': ensure => directory }",
"file { '/etc/raddb/scripts': ensure => directory }",
]
end
end
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