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 <[email protected]> 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 [email protected].
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2E0E0CBB-579C-4E64-85C5-28C260779823%40gmail.com.

Reply via email to