Commit 2439b8fa authored by Trey Dockendorf's avatar Trey Dockendorf
Browse files

Fix order of Exec to come after adding certs directory

parent 04743eeb
---
BUNDLE_DISABLE_SHARED_GEMS: '1'
......@@ -406,6 +406,7 @@ class freeradius (
command => "openssl dhparam -out ${freeradius::fr_basepath}/certs/dh 1024",
creates => "${freeradius::fr_basepath}/certs/dh",
path => '/usr/bin',
require => File["${freeradius::fr_basepath}/certs"],
}
# Generate global SSL parameters
......@@ -413,6 +414,7 @@ class freeradius (
command => "dd if=/dev/urandom of=${freeradius::fr_basepath}/certs/random count=10 >/dev/null 2>&1",
creates => "${freeradius::fr_basepath}/certs/random",
path => '/bin',
require => File["${freeradius::fr_basepath}/certs"],
}
# This exec tests the radius config and fails if it's bad
......
......@@ -278,7 +278,8 @@ describe 'freeradius' do
.with(
'command' => 'openssl dhparam -out $freeradius::fr_basepath/certs/dh 1024',
'creates' => '$freeradius::fr_basepath/certs/dh',
'path' => '/usr/bin'
'path' => '/usr/bin',
'require' => 'File[$freeradius::fr_basepath/certs]'
)
end
it do
......@@ -286,13 +287,14 @@ describe 'freeradius' do
.with(
'command' => 'dd if=/dev/urandom of=$freeradius::fr_basepath/certs/random count=10 >/dev/null 2>&1',
'creates' => '$freeradius::fr_basepath/certs/random',
'path' => '/bin'
'path' => '/bin',
'require' => 'File[$freeradius::fr_basepath/certs]'
)
end
it do
is_expected.to contain_exec('radiusd-config-test')
.with(
'command' => 'sudo radiusd -XC | grep 'Configuration appears to be OK.' | wc -l',
'command' => 'sudo radiusd -XC | grep \'Configuration appears to be OK.\' | wc -l',
'logoutput' => 'on_failure',
'path' => '[/bin/, /sbin/, /usr/bin/, /usr/sbin/]',
'refreshonly' => 'true',
......@@ -350,7 +352,7 @@ describe 'freeradius' do
it do
is_expected.to contain_syslog__rule('radiusd-log')
.with(
'command' => 'if $programname == 'radiusd' then $freeradius::fr_logpath/radius.log\\n&~',
'command' => 'if $programname == \'radiusd\' then $freeradius::fr_logpath/radius.log\\n&~',
'order' => '12'
)
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