| This is the **Beats.pp __ manifest which includes installation of both Winlogbeat and Filebeat package. class beats{ $filebeat_source = 'http://XX.XX.XX.XX:8081/nexus/content/repositories/filebeat/1.0/filebeat-1.0.zip'$winlogbeat_source = 'http://XX.XX.XX.XX:8081/nexus/content/repositories/winlogbeat/1.0/winlogbeat-1.0.zip' $filebeat_path = 'C:\\Filebeat install-service-filebeat.ps1' {{}} file{'C:\\temp filebeat': {{}} {{ ensure => 'directory',}->}} file{'C:\\temp winlogbeat': {{ ensure => 'directory',}->}} {{}} {{}} download_file{ 'filebeat.zip': {{ url => $filebeat_source,}} {{ destination_directory => 'C:\\temp\\filebeat ',}->}} download_file{ 'winlogbeat.zip': {{ url => $winlogbeat_source,}} {{ destination_directory => 'C:\\temp\\winlogbeat ',}->}} {{}} unzip{'filebeat.zip': {{ source => 'C:\\temp\\filebeat filebeat-1.0.zip',}} {{ creates => "C: Filebeat",}->}} unzip{'winlogbeat.zip': {{ source => 'C:\\temp\\winlogbeat winlogbeat-1.0.zip',}} {{ creates => "C: Winlogbeat",}->}} {{}} {{}} {{notify {"Installing winlogbeat...": withpath => true,} ->}} {{}} {{}} exec{'install-service-filebeat.ps1': {{ path => 'C:/Filebeat',}} {{ command => 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Executionpolicy Unrestricted -File C:/Filebeat/install-service-filebeat.ps1',}} {{ provider => powershell,}} {{ unless => 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe "if (((Get-Service | format-table property name) | out-string).contains(\'filebeat\')) {exit 0} else {exit 1}"',}>}} {{}} {{}} {{}} {{notify {"Starting filebeat...": withpath => true,} ->}} {{}} {{}} {{}} service{'filebeat': {{ ensure => running,}->}} {{}} exec{'install-service-winlogbeat.ps1': path => 'C:/Winlogbeat', {{ command => 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Executionpolicy Unrestricted -File C:/Winlogbeat/install-service-winlogbeat.ps1',}} {{ provider => powershell,}} {{ unless => 'C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe "if (((Get-Service | format-table property name) | out-string).contains(\'winlogbeat\')) {exit 0} else {exit 1}"',}>}} {{}} {{}} service{'winlogbeat': ensure => running,}}{{}} {{}} |