Can someone please help me with the open source puppet?
I want to provide a jar file to a windows client and execute the .jar file with the command line.
The .jar file is actually an update for an application which is running as a service.
I am poorly familiar with the puppet language but would guess something like this to execute the jar file:
exec { 'jar_execution': command => 'cmd.exe /c java -jar foo.jar', } Should this be part of the manifest which could look like this?
service { 'fooservice': name => foo_service, ensure => running, enable => true, } file { 'foo.jar': path => 'C:/foo/temp/foo.jar', ensure => file, source => "puppet:///modules/foo/foo.jar", } exec { 'jar_execution': command => 'cmd.exe /c java -jar C:/foor/temp/foo.jar', } And how does the agent actually run this command?
https://stackoverflow.com/questions/65947437/run-cmd-commands-with-open-source-puppet January 29, 2021 at 09:06AM
没有评论:
发表评论