[Puppet Users] Creating Windows services

2013-08-28 Thread Igor Berger
Hello, Documentation mentions that Windows service resource provider "can start, stop, enable, and disable services". Is it possible to create (register) a service using this provider? I'm running stand-alone Puppet agent 3.4.2 on Windows. Thanks, Igor. -- You received this message because y

Re: [Puppet Users] Creating Windows services

2013-08-28 Thread Igor Berger
Thanks for a quick response. I could use SC, but there are corner cases that require a lot of exec's and flow control, which looks quite ugly in Puppet. It would be nice if something like this was built in: 1. If service doesn't exist, create it (sc create) 2. Set recovery actions (sc failure

Re: [Puppet Users] Creating Windows services

2013-08-30 Thread Igor Berger
For posterity, here's what I ended up with (no graceful service stop): $process_name = 'myprocess' $service_name = 'myservice' $package_source = 'C:/source' $package_target = 'C:/target' $service_config = "start= auto binPath= \"$package_target/bin/$process_name.exe\"" $service_exists = "po

[Puppet Users] Incorrect return code for failed exec

2013-08-30 Thread Igor Berger
Hello, I'm running puppet agent standalone on Windows. The last step in the manifest is "exec { 'start_service': command => "sc start MyService" }". When the service has a problem and doesn't start, Puppet logs: /Stage[main]//Exec[start_service]/returns (err): change from notrun to 0 failed:

[Puppet Users] Re: Incorrect return code for failed exec

2013-09-03 Thread Igor Berger
. Also check the environment > parameters are set for that service. > Can you explain your query in more detail manner. > > Thanks and Regards, > Rahul Khengare, > NTT DATA OSS Center, Pune, India. > > > On Saturday, August 31, 2013 3:20:54 AM UTC+5:30, Igor Berger wrote:

Re: [Puppet Users] Re: Incorrect return code for failed exec

2013-09-03 Thread Igor Berger
binPath= C:\NotThere.exe Then add this to a test.cmd file: sc start MyService echo %errorlevel% On Tuesday, September 3, 2013 10:34:32 AM UTC-4, Rob Reynolds wrote: > > What does "cmd /c sc start MyService" return? > > > On Tue, Sep 3, 2013 at 9:23 AM, Igor Berger

Re: [Puppet Users] Re: Incorrect return code for failed exec

2013-09-10 Thread Igor Berger
Should log an issue about this someplace? On Tuesday, September 3, 2013 10:56:01 AM UTC-4, Igor Berger wrote: > > It returns 1053. The "sc start" command prints: > > [SC] StartService FAILED 1053: The service did not respond to the > start or control request in a ti

[Puppet Users] Unable to specify hierarchy for data-in-modules

2013-09-16 Thread Igor Berger
Hello, I'm running Puppet agent stand-alone on Windows. I got data-in-modules working. However, no matter what I put into the module hiera.yaml, I can only override the defaults from common.yaml by osfamily (and not, e.g., by environment). In the setup below the following command outputs: >pu

Re: [Puppet Users] Re: Incorrect return code for failed exec

2013-09-16 Thread Igor Berger
Tue, Sep 10, 2013 at 11:29 AM, Igor Berger > > wrote: > >> Should log an issue about this someplace? >> >> >> On Tuesday, September 3, 2013 10:56:01 AM UTC-4, Igor Berger wrote: >>> >>> It returns 1053. The "sc start" command prints:

[Puppet Users] Re: Unable to specify hierarchy for data-in-modules

2013-09-18 Thread Igor Berger
Any ideas? On Monday, September 16, 2013 11:30:42 AM UTC-4, Igor Berger wrote: > > Hello, > > I'm running Puppet agent stand-alone on Windows. > > I got data-in-modules working. However, no matter what I put into the > module hiera.yaml, > I can only override the

[Puppet Users] Re: Providing hiera with module data

2013-12-01 Thread Igor Berger
Same problem here :( On Sunday, December 1, 2013 2:27:42 AM UTC-5, Steven Jonthen wrote: > > Hi, > > I have this problem: Hiera only looks inside "data/common.yaml"-file, > which is in my module-directory. When i put other data into another yaml > file "data/example.yaml", then Puppet doesn't

[Puppet Users] Geppetto complains about uninitialized variables in reduce function

2013-12-17 Thread Igor Berger
Hello, I'm using the following expression to format a list: $valid_environments = ['env1', 'env2', 'env3'] $env_message = $valid_environments.reduce |$message, $env| { "${message}, ${env}" } It works at run-time (Puppet 3.2.4 standalone with "--parser=future"). However in Eclip

[Puppet Users] Re: Permissions for Windows Files Sourced from Puppet Master

2014-01-04 Thread Igor Berger
I think "ignore" is the correct default on Windows, assuming it results in files / directories that inherit permissions of their parents. On Friday, January 3, 2014 11:53:22 PM UTC-5, Rob Reynolds wrote: > > Folks supporting Windows, do you have an opinion with this warning? This > may have got

Re: [Puppet Users] Geppetto complains about uninitialized variables in reduce function

2014-01-09 Thread Igor Berger
Thanks, done: https://tickets.puppetlabs.com/browse/GEP-22 On Tuesday, December 17, 2013 7:13:15 PM UTC-5, Henrik Lindberg wrote: > > On 2013-17-12 17:23, Igor Berger wrote: > > Hello, > > > > I'm using the following expression to format a list: > > >