Here is the exact error message.

Info: /Stage[main]/Dart::Abstract::Windows_node/File[c:/program 
files/telegraf/telegraf.conf]: Scheduling refresh of Exec[c:/program 
files/telegraf/telegraf.exe --service install]
Error: Could not find command 'c:/program'
Error: /Stage[main]/Dart::Abstract::Windows_node/Exec[c:/program 
files/telegraf/telegraf.exe --service install]/returns: change from 
'notrun' to ['0'] failed: Could not find command 'c:/program'

The manifest resource is defined as follows.

exec { 'c:/program files/telegraf/telegraf.exe --service install':
        cwd => 'c:/program files/telegraf',
        refreshonly => true,
 }

On Tuesday, December 8, 2020 at 1:29:55 PM UTC-5 Michael Watters wrote:

> I tried that as well and it simply results in an error stating "Could not 
> find command: c:/program".
>
> On Monday, December 7, 2020 at 2:06:53 PM UTC-5 Martin Alfke wrote:
>
>> Have you tried using the full path to the executable?
>>
>> exec { 'c:/program files/telegraf/telegraf.exe --service install' :
>> ...
>> }
>>
>> > On 7. Dec 2020, at 18:17, Michael Watters <watt...@gmail.com> wrote:
>> > 
>> > I have an exec resource in a manifest for our Windows nodes however the 
>> command is failing each time that puppet runs. Here is the definition of 
>> the resource and a screenshot of the error.
>> > 
>> > ~> exec { 'telegraf.exe --service install':
>> > cwd => 'c:/program files/telegraf',
>> > refreshonly => false,
>> > }
>> > 
>> > 
>> > 
>> > Is there a way to resolve this? I've tried changing the path parameters 
>> which doesn't make any difference.
>> > 
>> > 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups "Puppet Users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to puppet-users...@googlegroups.com.
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/ca2819ca-1930-4842-8ed8-0820f19ea343n%40googlegroups.com
>> .
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/88f80e94-2efc-4ca7-bfb1-70abd422f44dn%40googlegroups.com.

Reply via email to