Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Commit

Permalink
Merge pull request #13 from theasci/master
Browse files Browse the repository at this point in the history
Fix dependency error in nessus::config
  • Loading branch information
adamcrews committed Jan 30, 2016
2 parents f075334 + 1c0915a commit be6a464
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
path => [ '/bin', '/opt/nessus/bin', '/opt/nessus/sbin' ],
command => "${activate_command} && touch /opt/nessus/var/nessus/security_center_activated",
creates => '/opt/nessus/var/nessus/security_center_activated',
notify => Exec['Wait 60 seconds for Nessus activation'],
}
} else {
if ! $::nessus_activation_code {
Expand All @@ -34,7 +35,8 @@

exec { 'Activate Nessus':
path => [ '/opt/nessus/bin', '/opt/nessus/sbin' ],
command => $activate_command
command => $activate_command,
notify => Exec['Wait 60 seconds for Nessus activation'],
}
}
}
Expand All @@ -45,7 +47,6 @@
path => [ '/bin' ],
command => 'sleep 60',
refreshonly => true,
subscribe => Exec['Activate Nessus'],
notify => Service[$service_name],
}

Expand Down
7 changes: 5 additions & 2 deletions spec/classes/nessus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@
end

describe 'nessus::config' do
context 'without nessus_activation_code' do
context 'without nessus_activation_code or supplied activation_code' do
it { should compile }
end

context 'without nessus_activation_code and with supplied activation_code' do
let(:params) {{
:activation_code => 'xxxx-xxxx-xxxx-xxxx'
}}
Expand All @@ -66,7 +70,6 @@
}}

it { should_not contain_exec('Activate Nessus') }

end

context 'with security_center' do
Expand Down

0 comments on commit be6a464

Please sign in to comment.