Open sasubillis opened 5 years ago
the command to create the service entry manually is
Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -NoLogo -Command New-Service -name winlogbeat -displayName Winlogbeat -binaryPathName '\"C:\Program Files\Winlogbeat\winlogbeat.exe\" -c \"C:\Program Files\Winlogbeat\winlogbeat.yml\" -path.home \"C:\Program Files\Winlogbeat\" -path.data \"C:\ProgramData\winlogbeat\" -path.logs \"C:\ProgramData\winlogbeat\logs\"'
Affected Puppet, Ruby, OS and module versions/distributions
ruby 2.4.4p296 (2018-03-28 revision 63013) [x64-mingw32]
How to reproduce (e.g Puppet code you use)
1) Stop the winlogbeat service if it is already installed 2) delete the service entry on cmd by '
sc delete winlogbeat
' 3) Run the puppet to get winlogbeat installed on target nodepuppet agent -t
Below is the excerpt of puppet class
What are you seeing
What behaviour did you expect instead
Puppet should able to install winlogbeat without any failures.
Output log
Puppet run failing with service not avaialble
Any additional information you'd like to impart
If I add the service manually with the following command and run puppet , it is not failing.
Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -NoLogo -Command New-Service -name filebeat -displayName Filebeat -binaryPathName '\"C:\Program Files\Filebeat\Filebeat.exe\" -c \"C:\Program Files\Filebeat\filebeat.yml\" -path.home \"C:\Program Files\Filebeat\" -path.data \"C:\ProgramData\filebeat\" -path.logs \"C:\ProgramData\filebeat\logs\"'