# Installation and config steps in https://issues.alfresco.com/jira/browse/REDD-86

install_ossec 'installation of ossec' do
  wazuh_url node['ossec']['wazuh']['url']
  wazuh_version node['ossec']['wazuh']['version']
  inotify_url node['ossec']['inotify']['url']
  inotify_version node['ossec']['inotify']['version']
  action :run
end

template "#{node['ossec']['user']['dir']}/etc/ossec.conf" do
  source 'ossec/ossec.conf.erb'
end

service 'ossec' do
  action :restart
end

ossec_ruleset 'download and config ruleset' do
  ruleset_dir node['ossec']['ruleset']['dir']
  ruleset_url node['ossec']['ruleset']['url']
  action :setup
end
