[Puppet Users] puppet windows base older version 7zip

2017-04-10 Thread Ryan Vande
During our chocolatey install in our base_windows.pp it installs the latest 
version of 7-zip

I believe it does this VIA the powershell script InstallChocolatey.ps1.erb

" Write-Output "Download 7Zip commandline tool"
  $7zaExe = Join-Path $tempDir '7za.exe'

  Download-File 'https://chocolatey.org/7za.exe' "$7zaExe""

Can I just change this to Download-File 
'https://chocolatey.org/api/v2/package/7zip.install/16.04' "$7zaExe" and it 
will download that specific version?

I guess I can just try this and find out , but if someone knows of a 
different way let me know please 

-- 
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/391db0e9-3f63-44ff-8805-89e483baea00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-09-01 Thread Matthew Stone
do it do it do it do it!

I put one together for windowsfeature and wanted to submit a PR, but I'm 
unseasoned at rspec and haven't been able to put together a solid block of 
tests.  Any help or resources in that department is more than appreciated. 
:)

On Monday, August 31, 2015 at 7:15:32 PM UTC-7, Rob Reynolds wrote:
>
>
> I thought about a blog post series specifically about types and providers 
> in Windows.
>  
>
>

-- 
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/da2e0fc0-8a92-4d75-85a7-937054bd2281%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-08-31 Thread Matthew Stone
For instances like this, I've usually smashed everything into a one-liner 
using the powershell provider. So...something along the lines of:

command => " \$thing = ; Write-Host \"Puppet 
${thingamajig} is a $\thing\""

As can be seen above, it can start looking pretty ugly, especially if the 
commands you are executing are a bit longwinded.  You can get a lot more 
power out of writing custom types/providers and it make for a lot cleaner 
looking manifest, but there aren't a lot of publicly available 
windows-specific ones in the wild right now.  I think most people tend to 
steer towards DSC for that and hope for the best.


On Thursday, August 27, 2015 at 9:06:13 AM UTC-7, Thomas Bartlett wrote:
>
> Nice one, I'll give that a go. You don't happen to know how I can set a 
> variable to equal the result of a powershell command do you? I need to use 
> the hostname of the machine as a parameter for another command. At the 
> minute I'm using hard-coding which is obviously a cardinal sin.
>
>

-- 
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/137c1e96-4285-4a6c-a43a-d7d243fe70e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-08-31 Thread Rob Reynolds
On Monday, August 31, 2015, Matthew Stone  wrote:

> For instances like this, I've usually smashed everything into a one-liner
> using the powershell provider. So...something along the lines of:
>
> command => " \$thing = ; Write-Host \"Puppet
> ${thingamajig} is a $\thing\""
>
> As can be seen above, it can start looking pretty ugly, especially if the
> commands you are executing are a bit longwinded.  You can get a lot more
> power out of writing custom types/providers and it make for a lot cleaner
> looking manifest, but there aren't a lot of publicly available
> windows-specific ones in the wild right now.
>

I thought about a blog post series specifically about types and providers
in Windows.


>  I think most people tend to steer towards DSC for that and hope for the
> best.
>
>
> On Thursday, August 27, 2015 at 9:06:13 AM UTC-7, Thomas Bartlett wrote:
>>
>> Nice one, I'll give that a go. You don't happen to know how I can set a
>> variable to equal the result of a powershell command do you? I need to use
>> the hostname of the machine as a parameter for another command. At the
>> minute I'm using hard-coding which is obviously a cardinal sin.
>>
>> --
> 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/137c1e96-4285-4a6c-a43a-d7d243fe70e6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Rob Reynolds
Developer, Puppet Labs

*PuppetConf 2015  is coming to Portland,
Oregon! Join us October 5-9.*
*Register now to take advantage of the Final Countdown discount

*
*—**save $149!*

-- 
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/CAMJiBK7hknwfT3k9TWWX8Mr3tGZMA6n%3DWCHSUO9-D-U13JjBRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-08-29 Thread Rob Reynolds
On Thu, Aug 27, 2015 at 9:26 AM, Peter Kristolaitis alte...@alter3d.ca
wrote:

 We solve this issue by doing (kind of ugly) stuff like this in our modules:

 unless  =  'if ( ! ( Get-Service mcollectived ) ) { exit 1 }',

 If you don't like that syntax, you may be able to use the $? or
 $LastExitCode variables that get set by PowerShell (I haven't tested this,
 however).  Both of those have non-obvious gotchas.  A good writeup on error
 handling in PS (not Puppet-specific) is here:
 http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/12/powershell-error-handling-and-why-you-should-care.aspx


Another great writeup for PowerShell confusion is
http://joshua.poehls.me/2012/powershell-script-module-boilerplate/

The tl;dr of PowerShell scripts is that parser errors (incorrect
PowerShell) will always exit with 0, so test your scripts with PowerShell
and look at the last exit code.

Another is that even setting $ErrorActionPreference = 'Stop' (to catch
non-terminating errors) doesn't appear to catch external command errors
(versus powershell function calls):

[image: Inline image 1]

PowerShell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass
-Command $ErrorActionPreference = 'Stop';reg /query bob; Write-Host 'yo'




 - Peter



 On 08/27/2015 08:38 AM, Thomas Bartlett wrote:

 Hi Guys,

 So I've been working with puppet on windows and I think my approach is all
 wrong. I've been using the puppetlabs/powershell module to run commands,
 however I'm having difficulty with exit codes. Primarily puppet expects
 exit codes to denote success/failure, whereas powershell is returning
 objects (and giving a 0 exit code regardless of result).

 I'm automating the install of old bits of software, so getting meaningful
 answers out of the installers is pretty difficult, this means that the
 scripts are a bit ugly and not very idempotent. Typically I have to check a
 log file to find out if the install actually worked.

 Are there any examples out there of windows puppet automation that makes
 heavy use of the powershell module?

 Cheers,

 Tom
 --
 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/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


 --
 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/55DF1E29.40409%40alter3d.ca
 https://groups.google.com/d/msgid/puppet-users/55DF1E29.40409%40alter3d.ca?utm_medium=emailutm_source=footer
 .

 For more options, visit https://groups.google.com/d/optout.




-- 
Rob Reynolds
Developer, Puppet Labs

*PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland,
Oregon! Join us October 5-9.*
*Register now to take advantage of the Final Countdown discount
https://www.eventbrite.com/e/puppetconf-2015-october-5-9-register-now-its-the-final-countdown-tickets-13115894995?discount=FinalCountdown
*
*—**save $149!*

-- 
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/CAMJiBK7WtTGh5HHoCU4rBNLrVWvqsignfdzhooe52mQ_VH_-xg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-08-29 Thread Rob Reynolds
On Sat, Aug 29, 2015 at 9:22 AM, Rob Reynolds r...@puppetlabs.com wrote:



 On Thu, Aug 27, 2015 at 7:38 AM, Thomas Bartlett 
 thomas.bartlett.1...@gmail.com wrote:

 Hi Guys,

 So I've been working with puppet on windows and I think my approach is
 all wrong. I've been using the puppetlabs/powershell module to run
 commands, however I'm having difficulty with exit codes. Primarily puppet
 expects exit codes to denote success/failure, whereas powershell is
 returning objects (and giving a 0 exit code regardless of result).

 I'm automating the install of old bits of software, so getting meaningful
 answers out of the installers is pretty difficult, this means that the
 scripts are a bit ugly and not very idempotent. Typically I have to check a
 log file to find out if the install actually worked.


 If you are automating the install of software, you should look at using
 either the built-in package resource


I forgot to include a link with tips for using the built-in package
resource -
http://docs.puppetlabs.com/puppet/latest/reference/resources_package_windows.html


 or one of the Windows package providers, e.g. Chocolatey[1]. It also has a
 pre-built, ready to go internal package server[2] so you can put your
 packages somewhere in your network.

 Lastly, if you are looking at the Chocolatey route, note that the provider
 is almost finished with the install of choco on the machine[3] and using it
 as a provider for packages in the same run.[4]

 [1] https://forge.puppetlabs.com/chocolatey/chocolatey
 [2] https://forge.puppetlabs.com/chocolatey/chocolatey_server
 [3] https://github.com/chocolatey/puppet-chocolatey/pull/76
 [4]
 https://cloud.githubusercontent.com/assets/63502/9509913/cadaf9ee-4c2a-11e5-9ca8-042b79cac217.png





 Are there any examples out there of windows puppet automation that makes
 heavy use of the powershell module?

 Cheers,

 Tom

 --
 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/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




 --
 Rob Reynolds
 Developer, Puppet Labs

 *PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland,
 Oregon! Join us October 5-9.*
 *Register now to take advantage of the Final Countdown discount
 https://www.eventbrite.com/e/puppetconf-2015-october-5-9-register-now-its-the-final-countdown-tickets-13115894995?discount=FinalCountdown
  *
 *—**save $149!*




-- 
Rob Reynolds
Developer, Puppet Labs

*PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland,
Oregon! Join us October 5-9.*
*Register now to take advantage of the Final Countdown discount
https://www.eventbrite.com/e/puppetconf-2015-october-5-9-register-now-its-the-final-countdown-tickets-13115894995?discount=FinalCountdown
*
*—**save $149!*

-- 
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/CAMJiBK6YS-2jmV35DP9_z%2BhywYPC89BTV7GyTdPJPeKp662bRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-08-29 Thread Rob Reynolds
On Thu, Aug 27, 2015 at 7:38 AM, Thomas Bartlett 
thomas.bartlett.1...@gmail.com wrote:

 Hi Guys,

 So I've been working with puppet on windows and I think my approach is all
 wrong. I've been using the puppetlabs/powershell module to run commands,
 however I'm having difficulty with exit codes. Primarily puppet expects
 exit codes to denote success/failure, whereas powershell is returning
 objects (and giving a 0 exit code regardless of result).

 I'm automating the install of old bits of software, so getting meaningful
 answers out of the installers is pretty difficult, this means that the
 scripts are a bit ugly and not very idempotent. Typically I have to check a
 log file to find out if the install actually worked.


If you are automating the install of software, you should look at using
either the built-in package resource or one of the Windows package
providers, e.g. Chocolatey[1]. It also has a pre-built, ready to go
internal package server[2] so you can put your packages somewhere in your
network.

Lastly, if you are looking at the Chocolatey route, note that the provider
is almost finished with the install of choco on the machine[3] and using it
as a provider for packages in the same run.[4]

[1] https://forge.puppetlabs.com/chocolatey/chocolatey
[2] https://forge.puppetlabs.com/chocolatey/chocolatey_server
[3] https://github.com/chocolatey/puppet-chocolatey/pull/76
[4]
https://cloud.githubusercontent.com/assets/63502/9509913/cadaf9ee-4c2a-11e5-9ca8-042b79cac217.png





 Are there any examples out there of windows puppet automation that makes
 heavy use of the powershell module?

 Cheers,

 Tom

 --
 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/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Rob Reynolds
Developer, Puppet Labs

*PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland,
Oregon! Join us October 5-9.*
*Register now to take advantage of the Final Countdown discount
https://www.eventbrite.com/e/puppetconf-2015-october-5-9-register-now-its-the-final-countdown-tickets-13115894995?discount=FinalCountdown
*
*—**save $149!*

-- 
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/CAMJiBK57HpXDGjetf013WpCF3aiDh%3DL1TvtGr2Lr%2BLOahVca7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Windows Automation

2015-08-28 Thread Fraser Goffin
Whilst there are definitely some uses cases where executing scripts in either 
Powershell or via an Exec resource is the way to go, in my opinion you should 
really be thinking of using the higher level resource abstractions. That way 
you don't need to deal with the implementation details and you are leveraging 
the true power of a declarative language. Otherwise it's just glorified 
scripting and to some extent you may as well just run Powershell natively. 
Using the RAL, you will also undoubtedly find that it's not too difficult to 
abstract away the OS specifics as well, especially if you plug in Hiera. So go 
on, ... start thinking in terms of resources rather than code, you know you 
want to ;-)

Regards

Fraser.

-- 
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/bc729cbe-f925-4100-8720-28958f3e0c96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-08-27 Thread Peter Kristolaitis

We solve this issue by doing (kind of ugly) stuff like this in our modules:

unless  =  'if ( ! ( Get-Service mcollectived ) ) { exit 1 }',

If you don't like that syntax, you may be able to use the $? or 
$LastExitCode variables that get set by PowerShell (I haven't tested 
this, however).  Both of those have non-obvious gotchas.  A good writeup 
on error handling in PS (not Puppet-specific) is here: 
http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/12/powershell-error-handling-and-why-you-should-care.aspx


- Peter


On 08/27/2015 08:38 AM, Thomas Bartlett wrote:

Hi Guys,

So I've been working with puppet on windows and I think my approach is 
all wrong. I've been using the puppetlabs/powershell module to run 
commands, however I'm having difficulty with exit codes. Primarily 
puppet expects exit codes to denote success/failure, whereas 
powershell is returning objects (and giving a 0 exit code regardless 
of result).


I'm automating the install of old bits of software, so getting 
meaningful answers out of the installers is pretty difficult, this 
means that the scripts are a bit ugly and not very idempotent. 
Typically I have to check a log file to find out if the install 
actually worked.


Are there any examples out there of windows puppet automation that 
makes heavy use of the powershell module?


Cheers,

Tom
--
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 
mailto:puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com 
https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com?utm_medium=emailutm_source=footer.

For more options, visit https://groups.google.com/d/optout.


--
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/55DF1E29.40409%40alter3d.ca.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Windows Automation

2015-08-27 Thread Thomas Bartlett
Hi Guys,

So I've been working with puppet on windows and I think my approach is all 
wrong. I've been using the puppetlabs/powershell module to run commands, 
however I'm having difficulty with exit codes. Primarily puppet expects 
exit codes to denote success/failure, whereas powershell is returning 
objects (and giving a 0 exit code regardless of result).

I'm automating the install of old bits of software, so getting meaningful 
answers out of the installers is pretty difficult, this means that the 
scripts are a bit ugly and not very idempotent. Typically I have to check a 
log file to find out if the install actually worked.

Are there any examples out there of windows puppet automation that makes 
heavy use of the powershell module?

Cheers,

Tom

-- 
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/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-08-27 Thread Thomas Bartlett
Nice one, I'll give that a go. You don't happen to know how I can set a 
variable to equal the result of a powershell command do you? I need to use 
the hostname of the machine as a parameter for another command. At the 
minute I'm using hard-coding which is obviously a cardinal sin.

On Thursday, 27 August 2015 15:27:04 UTC+1, Peter Kristolaitis wrote:

 We solve this issue by doing (kind of ugly) stuff like this in our modules:

 unless  =  'if ( ! ( Get-Service mcollectived ) ) { exit 1 }',

 If you don't like that syntax, you may be able to use the $? or 
 $LastExitCode variables that get set by PowerShell (I haven't tested this, 
 however).  Both of those have non-obvious gotchas.  A good writeup on error 
 handling in PS (not Puppet-specific) is here:  
 http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/12/powershell-error-handling-and-why-you-should-care.aspx

 - Peter


 On 08/27/2015 08:38 AM, Thomas Bartlett wrote:

 Hi Guys,

 So I've been working with puppet on windows and I think my approach is all 
 wrong. I've been using the puppetlabs/powershell module to run commands, 
 however I'm having difficulty with exit codes. Primarily puppet expects 
 exit codes to denote success/failure, whereas powershell is returning 
 objects (and giving a 0 exit code regardless of result).

 I'm automating the install of old bits of software, so getting meaningful 
 answers out of the installers is pretty difficult, this means that the 
 scripts are a bit ugly and not very idempotent. Typically I have to check a 
 log file to find out if the install actually worked.

 Are there any examples out there of windows puppet automation that makes 
 heavy use of the powershell module?

 Cheers,

 Tom
 -- 
 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 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com
  
 https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
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/4b7bba85-c64c-4ff1-abe0-ef8b9ec56590%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows Automation

2015-08-27 Thread Peter Kristolaitis
PowerShell is largely based on the syntax of the ksh shell, so most 
constructs that work in ksh will work in PS as well.


In this case:

$FOO=(hostname)

That will interpolate anywhere, not just during variable assignment, so 
you can do stuff like:


Some-CmdLet -Host (hostname)

If you're familiar with the use of backticks in bash the mechanism is 
exactly the same, just different syntax.



On 08/27/2015 12:06 PM, Thomas Bartlett wrote:
Nice one, I'll give that a go. You don't happen to know how I can set 
a variable to equal the result of a powershell command do you? I need 
to use the hostname of the machine as a parameter for another command. 
At the minute I'm using hard-coding which is obviously a cardinal sin.


On Thursday, 27 August 2015 15:27:04 UTC+1, Peter Kristolaitis wrote:

We solve this issue by doing (kind of ugly) stuff like this in our
modules:

unless  =  'if ( ! ( Get-Service mcollectived ) ) { exit 1 }',

If you don't like that syntax, you may be able to use the $? or
$LastExitCode variables that get set by PowerShell (I haven't
tested this, however).  Both of those have non-obvious gotchas.  A
good writeup on error handling in PS (not Puppet-specific) is
here:

http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/12/powershell-error-handling-and-why-you-should-care.aspx

http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/12/powershell-error-handling-and-why-you-should-care.aspx

- Peter


On 08/27/2015 08:38 AM, Thomas Bartlett wrote:

Hi Guys,

So I've been working with puppet on windows and I think my
approach is all wrong. I've been using the puppetlabs/powershell
module to run commands, however I'm having difficulty with exit
codes. Primarily puppet expects exit codes to denote
success/failure, whereas powershell is returning objects (and
giving a 0 exit code regardless of result).

I'm automating the install of old bits of software, so getting
meaningful answers out of the installers is pretty difficult,
this means that the scripts are a bit ugly and not very
idempotent. Typically I have to check a log file to find out if
the install actually worked.

Are there any examples out there of windows puppet automation
that makes heavy use of the powershell module?

Cheers,

Tom
-- 
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 javascript:.
To view this discussion on the web visit

https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com

https://groups.google.com/d/msgid/puppet-users/7b4f140b-05fd-4477-b8bc-62e14f54da70%40googlegroups.com?utm_medium=emailutm_source=footer.
For more options, visit https://groups.google.com/d/optout
https://groups.google.com/d/optout.


--
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 
mailto:puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4b7bba85-c64c-4ff1-abe0-ef8b9ec56590%40googlegroups.com 
https://groups.google.com/d/msgid/puppet-users/4b7bba85-c64c-4ff1-abe0-ef8b9ec56590%40googlegroups.com?utm_medium=emailutm_source=footer.

For more options, visit https://groups.google.com/d/optout.


--
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/55DF38C0.20208%40alter3d.ca.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Windows ARR

2015-08-25 Thread Sergiu Cornea
Hello guys,

I have been asked to use Puppet in order to set-up Windows ARR, however, I 
have been searching all over Google but unfortunately, I couldn't find 
anything.

Could someone please let me know where I can find more information about 
this as well as creating a Windows Server Cluster using Puppet?

Thank you,

Regards,
Sergiu 

-- 


This message and its attachments are private and confidential. If you have 
received this message in error, please notify the sender and remove it and 
its attachments from your system.

The University of Westminster is a charity and a company 
limited by guarantee. Registration number: 977818 England. 
Registered Office: 309 Regent Street, London W1B 2UW.

-- 
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/cae81bc1-b495-4dfb-bf18-6e76f14afc0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows ARR

2015-08-25 Thread Rob Reynolds
On Tue, Aug 25, 2015 at 11:30 AM, Sergiu Cornea 
s.cor...@my.westminster.ac.uk wrote:

 Hello guys,

 I have been asked to use Puppet in order to set-up Windows ARR, however, I
 have been searching all over Google but unfortunately, I couldn't find
 anything.


For setting up the Web Server itself, you want to look at the
windowsfeature[1] module.

Once you determine the features you want, you can get the specific names by
hopping on a Windows box (2008 and 2012 will have different feature names
for the same things, so keep that in mind) and run Get-WindowsFeature.

Then you can build what you need to set up the Web server. Here's an
example of installing IIS and ASP.NET[2].


Now onto getting ARR installed. You can find redistributables for it at the
bottom of this iis.net page[3]. If you go that route, you just need to
build a package resource to install it.

[1] https://forge.puppetlabs.com/puppet/windowsfeature
[2]
https://github.com/chocolatey/puppet-chocolatey_server/blob/master/manifests/init.pp#L24-L29
[3] http://www.iis.net/downloads/microsoft/application-request-routing


 Could someone please let me know where I can find more information about
 this as well as creating a Windows Server Cluster using Puppet?

 Thank you,

 Regards,
 Sergiu

 This message and its attachments are private and confidential. If you have
 received this message in error, please notify the sender and remove it and
 its attachments from your system.

 The University of Westminster is a charity and a company
 limited by guarantee. Registration number: 977818 England.
 Registered Office: 309 Regent Street, London W1B 2UW.

 --
 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/cae81bc1-b495-4dfb-bf18-6e76f14afc0c%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/cae81bc1-b495-4dfb-bf18-6e76f14afc0c%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Rob Reynolds
Developer, Puppet Labs

*PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland,
Oregon! Join us October 5-9.*
*Register now to take advantage of the Final Countdown discount
https://www.eventbrite.com/e/puppetconf-2015-october-5-9-register-now-its-the-final-countdown-tickets-13115894995?discount=FinalCountdown
*
*—**save $149!*

-- 
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/CAMJiBK5R2Bp%2Bg9AY%3D5%3DvRcDbHJ60GqH33sSas1TgvP15%3DBy%3DMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2014-05-27 Thread Tomer Paz
I know its quite late to respond on this (I have issued similar issue in 
another group and got a good answer pointing among other links to this 
thread)
having said that, are you sure there isn't a MS API for 'registered' MSI 
installations? 
I used this script from MS online documentation: 
http://msdn.microsoft.com/en-us/library/aa369767%28v=vs.85%29.aspx
it sort of claim they have a simple API to exract info on all registered 
MSIs with windows installer.
I used the script and indeed it has shown All installed MSIs, without 
'discriminating' our 'hidden' MSIs :)
that's how I realized there must be some dependency of Puppet windows 
package provider on the add/remove programs...

So, have I missed something? is the claim that MS API doesn't exist still 
in tact? (and I'm btw a *nix person, who unfortunately has to deal 
sometimes with MS stuff...)

I would love to have ensure = ${version} working for our hundreds of MSI 
components. Currently doesn't (puppet 3.6)

Thanks

On Monday, June 24, 2013 7:47:30 PM UTC+3, Josh Cooper wrote:




 On Mon, Jun 17, 2013 at 11:53 AM, Adnan Chowdhury 
 adnancho...@gmail.comjavascript:
  wrote:

 I don't foresee any bad side-effects.


 On Sat, Jun 15, 2013 at 1:48 AM, Josh Cooper 
 jo...@puppetlabs.comjavascript:
  wrote:



 On Thursday, June 13, 2013, Reginald Choudari wrote:



 On Wednesday, June 12, 2013 5:23:50 PM UTC-4, Josh Cooper wrote:




 On Wed, Jun 12, 2013 at 12:51 PM, Reginald Choudari 
 adnancho...@gmail.com wrote:

 Tried renaming the title of the resource to what the name attribute 
 was set to; no go.

 After doing a 'puppet resource package' on the agent, I see a list of 
 packages but the package listed here is not shown ... I confirmed that 
 it 
 is still showing 'ensure: created' in the event logs every puppet run.

 Thanks


 Can you export the Uninstall registry key for that package? I want to 
 see what the SystemComponent, etc values are.


 On Friday, June 7, 2013 10:54:36 AM UTC-4, Reginald Choudari wrote:

 Hello,

 I've got Package resource on my Windows machine that keeps creating 
 itself even though the package has been properly installed.

 I've got the name attribute set to the DisplayName found in the 
 Registry for the package.

 Every time the agent polls, I see in the Event Logs:

 /Stage[main]/Mssql_rtwo_sptwo/Package[mssql2008r2sp2_exec]/ensure: 
 created

 This is what's in my manifest:

 package { 'mssql2008r2sp2_exec':
 ensure  = installed,
 name= 'SQL Server 2008 R2 SP2 Common Files',
 provider= windows,
 source  = C:\\puppet_temp\\${mssql_filename},
 install_options = ['/quiet', '/IAcceptSQLServerLicenseTerms', 
 '/allinstances'],
 require = Exec['run_mssql2008r2sp2_artif
 act_extract_ps1'],
   }

 I'm thinking there has got to be some weird bug/error with this ... 
 Can anyone help?

 Thanks in advance

  -- 
 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 post to this group, send email to puppet...@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en
 .
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


 Josh

 -- 
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13
 *Register now and take advantage of the Early Bird discount - save 
 25%!*
  
  -- 
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  


 Unfortunately, Windows does not have an API for retrieving installed 
 packages. So we scan the registry and apply heuristics to determine which 
 packages to report on.

  The overall goal has been for Puppet to report on the same set of 
 packages that you see in Add/Remove Programs. Packages whose registry 
 value SystemComponent=1 are hidden from ARP, so Puppet does the same, see 
 https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/windows/exe_package.rb#L34

 Since Puppet never reports on SystemComponents, it will always think 
 they are absent, and need to be installed each time it runs.

 I'm thinking Puppet should not exclude SystemComponents? Are there any 
 bad side effects if we included them?
  
 Josh


 -- 
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13
 *Register now and take advantage of the Early Bird discount - save 25%!*

  -- 
 You received 

Re: [Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2014-05-27 Thread Josh Cooper
On Tue, May 27, 2014 at 10:43 AM, Tomer Paz tomer@gmail.com wrote:

 I know its quite late to respond on this (I have issued similar issue in
 another group and got a good answer pointing among other links to this
 thread)
 having said that, are you sure there isn't a MS API for 'registered' MSI
 installations?
 I used this script from MS online documentation:
 http://msdn.microsoft.com/en-us/library/aa369767%28v=vs.85%29.aspx
 it sort of claim they have a simple API to exract info on all registered
 MSIs with windows installer.
 I used the script and indeed it has shown All installed MSIs, without
 'discriminating' our 'hidden' MSIs :)
 that's how I realized there must be some dependency of Puppet windows
 package provider on the add/remove programs...

 So, have I missed something? is the claim that MS API doesn't exist still
 in tact? (and I'm btw a *nix person, who unfortunately has to deal
 sometimes with MS stuff...)


The API will only tell you about MSI based packages, but not
executable-based packages such as those created by InstallShield, NullSoft,
Wise, Innosetup, etc. As a result, it's not a practical method for
discovering installed packages.

I would love to have ensure = ${version} working for our hundreds of MSI
 components. Currently doesn't (puppet 3.6)

 Thanks

 On Monday, June 24, 2013 7:47:30 PM UTC+3, Josh Cooper wrote:




 On Mon, Jun 17, 2013 at 11:53 AM, Adnan Chowdhury 
 adnancho...@gmail.comwrote:

 I don't foresee any bad side-effects.


 On Sat, Jun 15, 2013 at 1:48 AM, Josh Cooper jo...@puppetlabs.comwrote:



 On Thursday, June 13, 2013, Reginald Choudari wrote:



 On Wednesday, June 12, 2013 5:23:50 PM UTC-4, Josh Cooper wrote:




 On Wed, Jun 12, 2013 at 12:51 PM, Reginald Choudari 
 adnancho...@gmail.com wrote:

 Tried renaming the title of the resource to what the name attribute
 was set to; no go.

 After doing a 'puppet resource package' on the agent, I see a list
 of packages but the package listed here is not shown ... I confirmed 
 that
 it is still showing 'ensure: created' in the event logs every puppet 
 run.

 Thanks


 Can you export the Uninstall registry key for that package? I want to
 see what the SystemComponent, etc values are.


 On Friday, June 7, 2013 10:54:36 AM UTC-4, Reginald Choudari wrote:

 Hello,

 I've got Package resource on my Windows machine that keeps creating
 itself even though the package has been properly installed.

 I've got the name attribute set to the DisplayName found in the
 Registry for the package.

 Every time the agent polls, I see in the Event Logs:

 /Stage[main]/Mssql_rtwo_sptwo/Package[mssql2008r2sp2_exec]/ensure:
 created

 This is what's in my manifest:

 package { 'mssql2008r2sp2_exec':
 ensure  = installed,
 name= 'SQL Server 2008 R2 SP2 Common Files',
 provider= windows,
 source  = C:\\puppet_temp\\${mssql_filename},
 install_options = ['/quiet', '/IAcceptSQLServerLicenseTerms',
 '/allinstances'],
 require = Exec['run_mssql2008r2sp2_artif
 act_extract_ps1'],
   }

 I'm thinking there has got to be some weird bug/error with this ...
 Can anyone help?

 Thanks in advance

  --
 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 post to this group, send email to puppet...@googlegroups.com.
 Visit this group at http://groups.google.com/group
 /puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




 Josh

 --
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13
 *Register now and take advantage of the Early Bird discount - save
 25%!*

  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




 Unfortunately, Windows does not have an API for retrieving installed
 packages. So we scan the registry and apply heuristics to determine which
 packages to report on.

  The overall goal has been for Puppet to report on the same set of
 packages that you see in Add/Remove Programs. Packages whose registry
 value SystemComponent=1 are hidden from ARP, so Puppet does the same, see
 https://github.com/puppetlabs/puppet/blob/master/
 lib/puppet/provider/package/windows/exe_package.rb#L34

 Since Puppet never reports on SystemComponents, it will always think
 they are absent, and need to be installed each time it runs.

 I'm thinking Puppet should not exclude SystemComponents? Are there any
 bad side effects if 

Re: [Puppet Users] Puppet windows File permissions

2013-09-19 Thread Josh Cooper
On Thu, Mar 1, 2012 at 9:47 AM, Josh Cooper j...@puppetlabs.com wrote:

 Hi Marco,

 On Thu, Mar 1, 2012 at 6:17 AM, Marco Parra D. marco.parr...@gmail.comwrote:

  Hi Josh, thank you for reply,

 On 29-02-2012 19:12, Josh Cooper wrote:

 Hi Marco,

 On Wed, Feb 29, 2012 at 10:52 AM, Marco Parra D. marco.parr...@gmail.com
  wrote:

  Hi Josh,
 I'm runnig from cmd.exe, I'm using Administrator account on the windows
 box, this is the output for the command that you asked:

 C:\Users\Administratorwhoami /groups

 GROUP INFORMATION
 -

 Group Name   Type SID
 Attributes
   
 ===
 Everyone Well-known group S-1-1-0
 Mandatory group, Enabled by default, Enabled group
 BUILTIN\Administrators   AliasS-1-5-32-544
 Mandatory group, Enabled by default, Enabled group, Group owner


  This shows that you are running elevated, which is good.


  BUILTIN\UsersAliasS-1-5-32-545
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\INTERACTIVE Well-known group S-1-5-4
 Mandatory group, Enabled by default, Enabled group
 CONSOLE LOGONWell-known group S-1-2-1
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\Authenticated Users Well-known group S-1-5-11
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\This Organization   Well-known group S-1-5-15
 Mandatory group, Enabled by default, Enabled group
 LOCALWell-known group S-1-2-0
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\NTLM Authentication Well-known group S-1-5-64-10
 Mandatory group, Enabled by default, Enabled group
 Mandatory Label\High Mandatory Level LabelS-1-16-12288
 Mandatory group, Enabled by default, Enabled group

 C:\Users\Administrator


 I found a page that talks about security on windows 2008, and I tried
 changing a configuration for the IIS, On the Ineternet Information Services
 Manager, under Management, Configuration Editor, selecting Providers, click
 on Edit Items, selecting DataProtectionConfigurationProvider, I change
 useMachineProtection, and save the change.

 On Windows 7 the scripts run perfect, but on Windows 2008 R2 still
 didn't work, still the execution said that the file was modified, but
 nothing happens on the file. no errors it's showed


  Is your Windows 7 box 32-bit? If you're using 32-bit ruby on a 64-bit
 Windows 2008 R2 to edit 
 C:\Windows\System32\inetsrv\config\applicationHost.config,
 Windows may be redirecting you to %windir%\syswow64\inetsrv instead:
 http://forums.iis.net/p/1150832/1875622.aspx


 Yeah, I'm using a Windows 7 32 bits box, and it's works fine... in the
 other hand, I've testing on Windows 2008 R2 64 bits server, I checked on
 the path tha you said, and your right, the file is changed on
 c:\windows\SysWOW64\inetsrv\config\applicationHost.config, but IIS uses the
 file on c:\windows\system32\inetsrv\config\applicationHost.config

 C:\Windows\SysWOW64\inetsrv\Configdir applicationHost.config
  Volume in drive C has no label.
  Volume Serial Number is F4D5-2946

  Directory of C:\Windows\SysWOW64\inetsrv\Config

 03/01/2012  06:01 AM82,384 applicationHost.config
1 File(s) 82,384 bytes
0 Dir(s)   6,910,136,320 bytes free

 C:\Windows\SysWOW64\inetsrv\Configdir
 c:\Windows\System32\inetsrv\config\applicationHost.config
  Volume in drive C has no label.
  Volume Serial Number is F4D5-2946

  Directory of c:\Windows\System32\inetsrv\config

 02/29/2012  11:01 AM82,122 applicationHost.config
1 File(s) 82,122 bytes
0 Dir(s)   6,910,136,320 bytes free


 How can I tell ruby that don't uses c:\windows\SysWOW64\inetsrv\config
 path? Is this posible?...


 You can disable file system redirection using the special 'sysnative'
 alias: C:\Windows\Sysnative\inetsrv\config\applicationHost.config. But
 acccording to MS this is not available on 2003[1], which is odd, because
 then 32-bit processes in 64-bit 2003 can't disable file system redirection
 on a per-file basis.


While working on reboot support, we discovered that there is a hotfix to
address this problem on 2003: http://support.microsoft.com/kb/942589


 There are APIs for disabling file system redirection for the entire
 process, but that would probably break 32-bit ruby.exe

 Perhaps the best option is to create a symlink to the IIS configuration
 directory[2]. However, 2003 doesn't support symlinks, so again I'm not sure
 how to do this on 64-bit 2003. Also puppet cannot currently manage symlinks
 on Windows, so you'd have to use an exec resource to do that.

 I'll add a note to our troubleshooting guide about 32vs64bit. I'd be
 curious to 

Re: [Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2013-06-24 Thread Josh Cooper
On Mon, Jun 17, 2013 at 11:53 AM, Adnan Chowdhury 
adnanchowdhur...@gmail.com wrote:

 I don't foresee any bad side-effects.


 On Sat, Jun 15, 2013 at 1:48 AM, Josh Cooper j...@puppetlabs.com wrote:



 On Thursday, June 13, 2013, Reginald Choudari wrote:



 On Wednesday, June 12, 2013 5:23:50 PM UTC-4, Josh Cooper wrote:




 On Wed, Jun 12, 2013 at 12:51 PM, Reginald Choudari 
 adnancho...@gmail.com wrote:

 Tried renaming the title of the resource to what the name attribute
 was set to; no go.

 After doing a 'puppet resource package' on the agent, I see a list of
 packages but the package listed here is not shown ... I confirmed that it
 is still showing 'ensure: created' in the event logs every puppet run.

 Thanks


 Can you export the Uninstall registry key for that package? I want to
 see what the SystemComponent, etc values are.


 On Friday, June 7, 2013 10:54:36 AM UTC-4, Reginald Choudari wrote:

 Hello,

 I've got Package resource on my Windows machine that keeps creating
 itself even though the package has been properly installed.

 I've got the name attribute set to the DisplayName found in the
 Registry for the package.

 Every time the agent polls, I see in the Event Logs:

 /Stage[main]/Mssql_rtwo_sptwo/Package[mssql2008r2sp2_exec]/**e**nsure:
 created

 This is what's in my manifest:

 package { 'mssql2008r2sp2_exec':
 ensure  = installed,
 name= 'SQL Server 2008 R2 SP2 Common Files',
 provider= windows,
 source  = C:\\puppet_temp\\${mssql_**file**name},
 install_options = ['/quiet', '/**IAcceptSQLServerLicenseTerms**',
 '/allinstances'],
 require = Exec['run_mssql2008r2sp2_**artif**
 act_extract_ps1'],
   }

 I'm thinking there has got to be some weird bug/error with this ...
 Can anyone help?

 Thanks in advance

  --
 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 post to this group, send email to puppet...@googlegroups.com.
 Visit this group at http://groups.google.com/**
 group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .




 Josh

 --
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13*
 **Register now and take advantage of the Early Bird discount - save
 25%!*

  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




 Unfortunately, Windows does not have an API for retrieving installed
 packages. So we scan the registry and apply heuristics to determine which
 packages to report on.

  The overall goal has been for Puppet to report on the same set of
 packages that you see in Add/Remove Programs. Packages whose registry
 value SystemComponent=1 are hidden from ARP, so Puppet does the same, see
 https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/windows/exe_package.rb#L34

 Since Puppet never reports on SystemComponents, it will always think they
 are absent, and need to be installed each time it runs.

 I'm thinking Puppet should not exclude SystemComponents? Are there any
 bad side effects if we included them?

 Josh


 --
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13*
 **Register now and take advantage of the Early Bird discount - save 25%!*

  --
 You received this message because you are subscribed to a topic in the
 Google Groups Puppet Users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/puppet-users/ftvvO51bX1U/unsubscribe.

 To unsubscribe from this group and all its topics, send an email to
 puppet-users+unsubscr...@googlegroups.com.

 To post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.

 For more options, visit https://groups.google.com/groups/opt_out.




  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.

 For more options, visit https://groups.google.com/groups/opt_out.




Filed as 

Re: [Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2013-06-17 Thread Adnan Chowdhury
I don't foresee any bad side-effects.


On Sat, Jun 15, 2013 at 1:48 AM, Josh Cooper j...@puppetlabs.com wrote:



 On Thursday, June 13, 2013, Reginald Choudari wrote:



 On Wednesday, June 12, 2013 5:23:50 PM UTC-4, Josh Cooper wrote:




 On Wed, Jun 12, 2013 at 12:51 PM, Reginald Choudari 
 adnancho...@gmail.com wrote:

 Tried renaming the title of the resource to what the name attribute was
 set to; no go.

 After doing a 'puppet resource package' on the agent, I see a list of
 packages but the package listed here is not shown ... I confirmed that it
 is still showing 'ensure: created' in the event logs every puppet run.

 Thanks


 Can you export the Uninstall registry key for that package? I want to
 see what the SystemComponent, etc values are.


 On Friday, June 7, 2013 10:54:36 AM UTC-4, Reginald Choudari wrote:

 Hello,

 I've got Package resource on my Windows machine that keeps creating
 itself even though the package has been properly installed.

 I've got the name attribute set to the DisplayName found in the
 Registry for the package.

 Every time the agent polls, I see in the Event Logs:

 /Stage[main]/Mssql_rtwo_sptwo/Package[mssql2008r2sp2_exec]/**e**nsure:
 created

 This is what's in my manifest:

 package { 'mssql2008r2sp2_exec':
 ensure  = installed,
 name= 'SQL Server 2008 R2 SP2 Common Files',
 provider= windows,
 source  = C:\\puppet_temp\\${mssql_**file**name},
 install_options = ['/quiet', '/**IAcceptSQLServerLicenseTerms**',
 '/allinstances'],
 require = Exec['run_mssql2008r2sp2_**artif**
 act_extract_ps1'],
   }

 I'm thinking there has got to be some weird bug/error with this ...
 Can anyone help?

 Thanks in advance

  --
 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 post to this group, send email to puppet...@googlegroups.com.
 Visit this group at 
 http://groups.google.com/**group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .




 Josh

 --
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13*
 **Register now and take advantage of the Early Bird discount - save 25%!
 *

  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




 Unfortunately, Windows does not have an API for retrieving installed
 packages. So we scan the registry and apply heuristics to determine which
 packages to report on.

 The overall goal has been for Puppet to report on the same set of packages
 that you see in Add/Remove Programs. Packages whose registry
 value SystemComponent=1 are hidden from ARP, so Puppet does the same, see
 https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/windows/exe_package.rb#L34

 Since Puppet never reports on SystemComponents, it will always think they
 are absent, and need to be installed each time it runs.

 I'm thinking Puppet should not exclude SystemComponents? Are there any bad
 side effects if we included them?

 Josh


 --
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13*
 **Register now and take advantage of the Early Bird discount - save 25%!*

  --
 You received this message because you are subscribed to a topic in the
 Google Groups Puppet Users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/puppet-users/ftvvO51bX1U/unsubscribe.

 To unsubscribe from this group and all its topics, send an email to
 puppet-users+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.

 For more options, visit https://groups.google.com/groups/opt_out.




-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2013-06-17 Thread Kevin D
Josh,

You mentioned:

 Unfortunately, Windows does not have an API for retrieving installed 
 packages.


Does this include the WMI class 
Win32_Producthttp://msdn.microsoft.com/en-us/library/windows/desktop/aa394378%28v=vs.85%29.aspx?
  
Win32_product provides a limited set of information about all products 
installed using MSI/Windows Installer.  Although Windows Installer is a 
standard, not all compiled installers use this method.

-Kev


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2013-06-17 Thread Josh Cooper
On Mon, Jun 17, 2013 at 12:05 PM, Kevin D kevin.dimic...@pearson.comwrote:

 Josh,

 You mentioned:

 Unfortunately, Windows does not have an API for retrieving installed
 packages.


 Does this include the WMI class 
 Win32_Producthttp://msdn.microsoft.com/en-us/library/windows/desktop/aa394378%28v=vs.85%29.aspx?
 Win32_product provides a limited set of information about all products
 installed using MSI/Windows Installer.  Although Windows Installer is a
 standard, not all compiled installers use this method.

 -Kev



  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.

 For more options, visit https://groups.google.com/groups/opt_out.




Win32_Product has issues. Simply enumerating the set of installed packages
will cause a consistency check to be performed on all packages:

http://sdmsoftware.com/group-policy-blog/wmi/why-win32_product-is-bad-news/
http://gregramsey.net/2012/02/20/win32_product-is-evil/
http://support.microsoft.com/kb/974524

Josh

-- 
Josh Cooper
Developer, Puppet Labs

*Join us at PuppetConf 2013, August 22-23 in San Francisco - *
http://bit.ly/pupconf13*
**Register now and take advantage of the Early Bird discount - save 25%!*

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2013-06-14 Thread Josh Cooper
On Thursday, June 13, 2013, Reginald Choudari wrote:



 On Wednesday, June 12, 2013 5:23:50 PM UTC-4, Josh Cooper wrote:




 On Wed, Jun 12, 2013 at 12:51 PM, Reginald Choudari 
 adnancho...@gmail.com wrote:

 Tried renaming the title of the resource to what the name attribute was
 set to; no go.

 After doing a 'puppet resource package' on the agent, I see a list of
 packages but the package listed here is not shown ... I confirmed that it
 is still showing 'ensure: created' in the event logs every puppet run.

 Thanks


 Can you export the Uninstall registry key for that package? I want to see
 what the SystemComponent, etc values are.


 On Friday, June 7, 2013 10:54:36 AM UTC-4, Reginald Choudari wrote:

 Hello,

 I've got Package resource on my Windows machine that keeps creating
 itself even though the package has been properly installed.

 I've got the name attribute set to the DisplayName found in the
 Registry for the package.

 Every time the agent polls, I see in the Event Logs:

 /Stage[main]/Mssql_rtwo_sptwo/Package[mssql2008r2sp2_exec]/**e**nsure:
 created

 This is what's in my manifest:

 package { 'mssql2008r2sp2_exec':
 ensure  = installed,
 name= 'SQL Server 2008 R2 SP2 Common Files',
 provider= windows,
 source  = C:\\puppet_temp\\${mssql_**file**name},
 install_options = ['/quiet', '/**IAcceptSQLServerLicenseTerms**',
 '/allinstances'],
 require = Exec['run_mssql2008r2sp2_**artif**
 act_extract_ps1'],
   }

 I'm thinking there has got to be some weird bug/error with this ... Can
 anyone help?

 Thanks in advance

  --
 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 post to this group, send email to puppet...@googlegroups.com.
 Visit this group at 
 http://groups.google.com/**group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .




 Josh

 --
 Josh Cooper
 Developer, Puppet Labs

 *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
 http://bit.ly/pupconf13*
 **Register now and take advantage of the Early Bird discount - save 25%!*

  --
 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 javascript:_e({},
 'cvml', 'puppet-users%2bunsubscr...@googlegroups.com');.
 To post to this group, send email to 
 puppet-users@googlegroups.comjavascript:_e({}, 'cvml', 
 'puppet-users@googlegroups.com');
 .
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




Unfortunately, Windows does not have an API for retrieving installed
packages. So we scan the registry and apply heuristics to determine which
packages to report on.

The overall goal has been for Puppet to report on the same set of packages
that you see in Add/Remove Programs. Packages whose registry
value SystemComponent=1 are hidden from ARP, so Puppet does the same, see
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/package/windows/exe_package.rb#L34

Since Puppet never reports on SystemComponents, it will always think they
are absent, and need to be installed each time it runs.

I'm thinking Puppet should not exclude SystemComponents? Are there any bad
side effects if we included them?

Josh


-- 
Josh Cooper
Developer, Puppet Labs

*Join us at PuppetConf 2013, August 22-23 in San Francisco - *
http://bit.ly/pupconf13*
**Register now and take advantage of the Early Bird discount - save 25%!*

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2013-06-10 Thread Josh Cooper
Hi Reginald,


On Fri, Jun 7, 2013 at 7:54 AM, Reginald Choudari 
adnanchowdhur...@gmail.com wrote:

 Hello,

 I've got Package resource on my Windows machine that keeps creating itself
 even though the package has been properly installed.

 I've got the name attribute set to the DisplayName found in the Registry
 for the package.

 Every time the agent polls, I see in the Event Logs:

 /Stage[main]/Mssql_rtwo_sptwo/Package[mssql2008r2sp2_exec]/ensure: created

 This is what's in my manifest:

 package { 'mssql2008r2sp2_exec':
 ensure  = installed,
 name= 'SQL Server 2008 R2 SP2 Common Files',
 provider= windows,
 source  = C:\\puppet_temp\\${mssql_filename},
 install_options = ['/quiet', '/IAcceptSQLServerLicenseTerms',
 '/allinstances'],
 require = Exec['run_mssql2008r2sp2_artifact_extract_ps1'],
   }

 I'm thinking there has got to be some weird bug/error with this ... Can
 anyone help?

 Thanks in advance

 --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.




Try running `puppet resource package` and see if the package you tried to
installed is in the output, and that it's name matches exactly with the
`name` parameter above.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

*Join us at PuppetConf 2013, August 22-23 in San Francisco - *
http://bit.ly/pupconf13*
**Register now and take advantage of the Early Bird discount - save 25%!*

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Windows package not seeing DisplayName in Registry?

2013-06-07 Thread Reginald Choudari
Hello,

I've got Package resource on my Windows machine that keeps creating itself 
even though the package has been properly installed.

I've got the name attribute set to the DisplayName found in the Registry 
for the package.

Every time the agent polls, I see in the Event Logs:

/Stage[main]/Mssql_rtwo_sptwo/Package[mssql2008r2sp2_exec]/ensure: created

This is what's in my manifest:

package { 'mssql2008r2sp2_exec':
ensure  = installed,
name= 'SQL Server 2008 R2 SP2 Common Files',
provider= windows,
source  = C:\\puppet_temp\\${mssql_filename},
install_options = ['/quiet', '/IAcceptSQLServerLicenseTerms', 
'/allinstances'],
require = Exec['run_mssql2008r2sp2_artifact_extract_ps1'],
  }

I'm thinking there has got to be some weird bug/error with this ... Can 
anyone help?

Thanks in advance

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Windows - Mapped Network Drive and Service Account

2013-04-29 Thread Kevin D
On Windows 2008 R2 SP1, after joining to the domain, there is an issue with 
a mapped network drive when Puppet agent runs by the LOCAL SYSTEM service 
account.

Using dependency chaining, a near the beginning module is 
map-networkdrivez. The module execs a batch file that if Z:\ does not 
exist (not already mapped), maps Z:\ to a Windows 2008 R2 SP1 file server 
with a hidden share data$. The file server is configured for anonymous to 
allow share access (with the appropriate NTFS and Share permissions).

By default, when the puppet agent runs as the service, the associated 
service account is local system. On first run, the batch file 
appropriately maps the drive and the modules have access to the resources 
of the mapped network drive.

Once a module executes that joins the computer to the domain and restarts 
the computer, subsequent puppet runs fail because of a failed resource 
dependency on Z:\:

 Could not evaluate. Could not retrieve information from environment 
production source(s) file:/z:/Install-Exe.ps1

I setup a SysInternal's Process Monitor trace during a puppet run:

Path   = \\;LanmanRedirector\;Z:03e7\10.202.1.27\Data$\
Result = ACCESS DENIED.

I verified the same result using psexec to open a cmd prompt under the 
LOCAL SYSTEM account by opening a CMD with administrative privileges, 
running psexec -hsi cmd and navigating to z:

Access is denied.

If using the local administrator account I open a cmd prompt  run 
C:\Program Files(x86)\Puppet Labs\Puppet\bin\puppet agent -t all the 
modules will execute successfully.
If I change the Puppet service account from LOCAL SYSTEM to 
testwindows004\Administrator all the modules will execute successfully.

Has anyone else seen this behavior? Any thoughts on how to overcome this 
issue?

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


@ECHO OFF

NET USE * /DELETE /YES

IF NOT EXIST Z:\ (
ECHO Z:\ Does not exist.  Will connect to Z:\
NET USE Z: \\10.202.1.27\Data$ /PERSISTENT:NO
) ELSE (
ECHO Z:\ exists.
)

ECHO Pause 10 seconds
Ping 1.1.1.1 -n 10  NUL

ECHO NET USE
NET USE

ECHO Map Network Drive script complete.



init.pp
Description: Binary data


Re: [Puppet Users] Puppet Windows Service keeps stopping/starting

2013-02-08 Thread jim
Hello Josh

Thanks for reply so quickly, here is my manifest, thinking about it, I 
assume it because i'm installing the agent every time, do I need to do 
something like if service doesn't exist install else ignore ?

regards

James

file { 'C:/Installs/check-mk-agent-1.2.1i5.exe':
source   = 'puppet:///modules/base/check-mk-agent-1.2.1i5.exe',
mode = '0770',
owner= 'SYSTEM',
group= 'Administrators',
} -

exec { 'Check_MK_Agent':
command  = 'C:/Installs/check-mk-agent-1.2.1i5.exe /S',
} ~

service { 'Check_MK_Agent':
ensure   = 'running',
enable   = true,
require  = exec['Check_MK_Agent'],
}


On Thursday, 7 February 2013 16:24:10 UTC, Josh Cooper wrote:

 Hi Jim, 

 On Thu, Feb 7, 2013 at 7:15 AM, jim str...@gmail.com javascript: 
 wrote: 
  Hello all, 
  
  Can anyone please help, every time I push a config to my hosts, the 
 windows 
  service I have just defined keeps stopping and starting, and logging in 
 the 
  eventlog, 
  
  I only want the service to stop and start, if something has changed, and 
 to 
  my knowledge nothing has changed ? so it should stay running ? 
  
  Can some one please help or explain 
  
  regards 
  
  James 
  
  -- 
  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 javascript:. 
  To post to this group, send email to 
  puppet...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/puppet-users?hl=en. 
  For more options, visit https://groups.google.com/groups/opt_out. 
  
  

 From http://docs.puppetlabs.com/references/latest/type.html#service, 
 Note that if a service receives an event from another resource, the 
 service will get restarted. 

 Can you post your manifest? Sounds like your service is subscribed to 
 some other resource, perhaps a package whose name doesn't match its 
 name in Add/Remove Programs? 

 Josh 

 -- 
 Josh Cooper 
 Developer, Puppet Labs 


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Windows Service keeps stopping/starting

2013-02-08 Thread jcbollinger


On Friday, February 8, 2013 3:20:33 AM UTC-6, jim wrote:

 Hello Josh

 Thanks for reply so quickly, here is my manifest, thinking about it, I 
 assume it because i'm installing the agent every time, do I need to do 
 something like if service doesn't exist install else ignore ?

 regards

 James

 file { 'C:/Installs/check-mk-agent-1.2.1i5.exe':
 source   = 
 'puppet:///modules/base/check-mk-agent-1.2.1i5.exe',
 mode = '0770',
 owner= 'SYSTEM',
 group= 'Administrators',
 } -

 exec { 'Check_MK_Agent':
 command  = 'C:/Installs/check-mk-agent-1.2.1i5.exe /S',
 } ~

 service { 'Check_MK_Agent':
 ensure   = 'running',
 enable   = true,
 require  = exec['Check_MK_Agent'],
 }


It is because the Exec runs every time and has a signaling relationship 
(designated by ~)  with the service.  (And note that the Service's 
'require' of the Exec is redundant.)  An Exec changes state from not run 
to run when its command is successfully executed, and that triggers an 
event to be dispatched to any listeners.  Services restart if they receive 
events, which Puppet by default implements by stopping and then starting 
the service.

The best approach would probably be to package the install program and 
anything else associated with the service into an installable package (i.e. 
an .msi file) and have the Service depend on the package instead of 
directly on the installer program.  If that's not feasible, then you can 
use one or more of the Exec's 'onlyif', 'unless', and 'creates' parameters 
to instruct it whether it should execute the main command on any given 
catalog run.


John

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Windows Service keeps stopping/starting

2013-02-08 Thread Josh Cooper
On Fri, Feb 8, 2013 at 9:08 AM, jcbollinger john.bollin...@stjude.org wrote:


 On Friday, February 8, 2013 3:20:33 AM UTC-6, jim wrote:

 Hello Josh

 Thanks for reply so quickly, here is my manifest, thinking about it, I
 assume it because i'm installing the agent every time, do I need to do
 something like if service doesn't exist install else ignore ?

 regards

 James

 file { 'C:/Installs/check-mk-agent-1.2.1i5.exe':
 source   =
 'puppet:///modules/base/check-mk-agent-1.2.1i5.exe',
 mode = '0770',
 owner= 'SYSTEM',
 group= 'Administrators',
 } -

 exec { 'Check_MK_Agent':
 command  = 'C:/Installs/check-mk-agent-1.2.1i5.exe /S',
 } ~

 service { 'Check_MK_Agent':
 ensure   = 'running',
 enable   = true,
 require  = exec['Check_MK_Agent'],
 }


 It is because the Exec runs every time and has a signaling relationship
 (designated by ~)  with the service.  (And note that the Service's
 'require' of the Exec is redundant.)  An Exec changes state from not run
 to run when its command is successfully executed, and that triggers an
 event to be dispatched to any listeners.  Services restart if they receive
 events, which Puppet by default implements by stopping and then starting the
 service.

 The best approach would probably be to package the install program and
 anything else associated with the service into an installable package (i.e.
 an .msi file) and have the Service depend on the package instead of directly
 on the installer program.  If that's not feasible, then you can use one or
 more of the Exec's 'onlyif', 'unless', and 'creates' parameters to instruct
 it whether it should execute the main command on any given catalog run.


Also, if you are using Puppet 3, then you can use the `package`
resource to install the executable. Just make sure the package name in
the manifest matches what's in Add/Remove Programs.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Windows Service keeps stopping/starting

2013-02-07 Thread jim
Hello all,

Can anyone please help, every time I push a config to my hosts, the windows 
service I have just defined keeps stopping and starting, and logging in the 
eventlog, 

I only want the service to stop and start, if something has changed, and to 
my knowledge nothing has changed ? so it should stay running ?

Can some one please help or explain 

regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Windows Service keeps stopping/starting

2013-02-07 Thread Josh Cooper
Hi Jim,

On Thu, Feb 7, 2013 at 7:15 AM, jim stra...@gmail.com wrote:
 Hello all,

 Can anyone please help, every time I push a config to my hosts, the windows
 service I have just defined keeps stopping and starting, and logging in the
 eventlog,

 I only want the service to stop and start, if something has changed, and to
 my knowledge nothing has changed ? so it should stay running ?

 Can some one please help or explain

 regards

 James

 --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.



From http://docs.puppetlabs.com/references/latest/type.html#service,
Note that if a service receives an event from another resource, the
service will get restarted.

Can you post your manifest? Sounds like your service is subscribed to
some other resource, perhaps a package whose name doesn't match its
name in Add/Remove Programs?

Josh

--
Josh Cooper
Developer, Puppet Labs

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppet windows importing manifests twice when using puppet apply

2012-10-16 Thread Corey Osman
I am trying to create a masterless local windows installer and I have run 
into an issue where puppet is importing my manfiests multiple times 
creating multiple declaration errors.
 
You may notice the importing occurs twice but with different directory 
layouts.  One import is via puppet while the other has something to do with 
the modulepath I declared.
 
 
Any ideas?
 
Corey
Here is what I am doing (somewhat abbreviated):
 
 ruby -S -- puppet apply -v --debug --noop --modulepath=dir/puppetmodules 
-e include myclass
 
debug: importing 'C:\devops\trunk/puppetmodules/myclass/manifests/init.pp' 
in environment production
debug: importing 'C:/devops/trunk/puppetmodules/myclass/manifests/init.pp' 
in environment production
debug: Automatically imported myclass from myclass into production
debug: importing 'C:\devops\trunk/puppetmodules/jdk/manifests/init.pp' in 
environment production
debug: importing 'C:/devops/trunk/puppetmodules/jdk/manifests/init.pp' in 
environment production
debug: Automatically imported jdk from jdk into production
Duplicate declaration: Exec[create_java_home] is already declared in file 
C:\devops\trunk/puppetmodules/jdk/manifests/init.pp at line 18; cannot
 redeclare at C:/devops/trunk/puppetmodules/jdk/manifests/init.pp:18 on 
node hostname_hidden
 
Here is the myclass (changed name for this email)
class myclass {
 class {myclass::install: }
 
 # Now try and use maven to run the build
 class {maven::command:
  build_dir = c:/${mvn_repo_name},
  command = verify -Ptests,
  require = [Exec[checksvnrepo],Class[myclass::install]],
 }
 
}
 
class myclass::install{
if $::operatingsystem == windows {
  class {jdk: }
  class {svn: }
  # since springsource comes with maven lets use the builtin maven package
  if $::install_sts == true {
   class {sts: 
require = Class[jdk]
   }
   $mvn_dir='C:\Program Files\springsource\apache-maven-3.0.3'
   class {maven::setup:
mvn_home = $mvn_dir
   }
  }
  else{
   # Install and Setup Maven
   class {maven: }
  }
   } 
}
Here is the jdk class being called since its the first class 
 
class jdk{
 
 class {jdk::setup:
  require = Class[jdk::install],
  java_home = 'C:/Program Files/Java/jdk1.6.0_30',
  java_bin = '%JAVA_HOME%/bin',
 }
 
}
class jdk::setup($java_home, $java_bin){
 # set the user environment variable for java_home
 exec{create_java_home:
  command = setx JAVA_HOME \${java_home}\ /M ,
  path = 'C:\Windows\System32',
  # The unless should really just check if the variable is set for the 
specific path
  unless = where javac,
  
 }
 
 # set the user environment variable for java_bin
 exec{create_java_bin:
  command = setx JAVA_BIN \${java_bin}\ /M ,
  path = 'C:\Windows\System32',
  unless = where javac,
 }
}
class jdk::install{
 exec{jdkinstaller:
  command = ${::installer_dir}/jdk-6u30-windows-i586.exe /s 
ADDLOCAL=\ToolsFeature,DemosFeature,SourceFeature\ ,
  creates = 'C:\Program Files\Java\jdk1.6.0_30\bin\javac.exe',
  logoutput = 'true',
 }

}

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/CuB0G1TQ9SkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet windows importing manifests twice when using puppet apply

2012-10-16 Thread Josh Cooper
Hi Corey,

On Tue, Oct 16, 2012 at 1:34 PM, Corey Osman co...@logicminds.biz wrote:
 I am trying to create a masterless local windows installer and I have run
 into an issue where puppet is importing my manfiests multiple times creating
 multiple declaration errors.

 You may notice the importing occurs twice but with different directory
 layouts.  One import is via puppet while the other has something to do with
 the modulepath I declared.


 Any ideas?

 Corey
 Here is what I am doing (somewhat abbreviated):

  ruby -S -- puppet apply -v --debug --noop --modulepath=dir/puppetmodules
 -e include myclass

 debug: importing 'C:\devops\trunk/puppetmodules/myclass/manifests/init.pp'
 in environment production
 debug: importing 'C:/devops/trunk/puppetmodules/myclass/manifests/init.pp'
 in environment production

I'm pretty sure this is https://projects.puppetlabs.com/issues/13055

Try specifying the modulepath as
`--modulepath=C:/devops/trunk/puppetmodules` The issue here is that
the win32-dir gem patches Dir.pwd, causing it to return a path with
backslashes. This confuses the autoloader in 2.7.x. However, this
should not be an issue in 3.0. If so, please let me know.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet windows -

2012-10-01 Thread Pavel Drobushevich
Hi Josh,

Thanks that you remember my case. Unfortunately I couldn't wait and restart
server on weekend and now puppet works fine. Before it I started

ruby -e require 'digest/sha1'

And It completed ok. I didn't change Path (and never add ruby to path, as I
understand puppet use environment.bat) or install puppet updates/patches. I
couldn't do any test now, because problem was fixed after restart. But if
it happen again I may replay and I hope provide more information.


**
*Best Regards,*
*Pavel Drobushevich*
*mailto:* p.drobushev...@gmail.com*
**skype*: pavel_drabushevich
*profile:* http://www.google.com/profiles/p.drobushevich



On Mon, Oct 1, 2012 at 11:02 PM, Josh Cooper j...@puppetlabs.com wrote:

 Hi Pavel,

 Can you try the following:

 ruby -e require 'digest/sha1'; puts Digest::SHA1.hexdigest('foo')

 If that works, try:

 ruby -e require 'digest/sha1'; puts

 Digest::SHA1.hexdigest('C:/puppet/sys/ruby/lib/ruby/1.8/i386-mingw32/digest/sha1.so')

 You should get:

 7479672868457859e36fd0a0e35fc20dc066ebe1

 Also, what is your PATH and RUBYLIB?

 Did you recently update (Patch Tuesday)?

 Josh

 On Wed, Sep 26, 2012 at 4:32 AM, Pavel Drobushevich
 p.drobushev...@gmail.com wrote:
  Hi Josh,
 
  I've installed puppet from official msi puppet-enterprise-2.5.0.msi.
 There
  are no any other ruby installation on this machine. Ruby version returns
  following info:
  1.8.7 (2011-12-28 patchlevel 357) [i386-mingw32]
  It've been working about 2 months, but suddenly yesterday stopped.
 
  Thanks, Pavel
 
 
  On Wednesday, September 26, 2012 12:55:29 AM UTC+3, Josh Cooper wrote:
 
  Hi Pavel,
 
  On Tue, Sep 25, 2012 at 2:28 PM, Pavel Drobushevich
  p.drobu...@gmail.com wrote:
   Hi all,
  
   We use puppet on many windows machines (Windows Server2008R2 x64). It
   works
   fine, but on one of them it was fail down and couldn't start work
 again.
   I
   try to reinstall, but it didn't help. May be you have any idea. Thanks
   in
   advance.
  
   Error message from puppet
   C:/puppet/puppet/lib/puppet/util/autoload.rb:85:in `load': Could not
   autoload co
   mponent: 193: %1 is not a valid Win32 application.   -
   C:/puppet/sys/ruby/lib/ru
   by/1.8/i386-mingw32/digest/sha1.so (Puppet::Error)
   from C:/puppet/puppet/lib/puppet/util/autoload.rb:73:in `each'
   from C:/puppet/puppet/lib/puppet/util/autoload.rb:73:in `load'
   from C:/puppet/puppet/lib/puppet/metatype/manager.rb:116:in
   `type'
   from C:/puppet/puppet/lib/puppet/type.rb:1966
   from
   C:/puppet/sys/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.r
   b:36:in `gem_original_require'
   from
   C:/puppet/sys/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.r
   b:36:in `require'
   from C:/puppet/puppet/lib/puppet.rb:121
   from C:/puppet/puppet/lib/puppet/application.rb:272:in
 `require'
   from C:/puppet/puppet/lib/puppet/application.rb:272:in
   `initialize'
   from C:/puppet/puppet/lib/puppet/util/command_line.rb:60:in
   `new'
   from C:/puppet/puppet/lib/puppet/util/command_line.rb:60:in
   `execute'
   from C:/puppet/puppet/bin/puppet:4
  
   --
   You received this message because you are subscribed to the Google
   Groups
   Puppet Users group.
   To view this discussion on the web visit
   https://groups.google.com/d/msg/puppet-users/-/tszwlQxzKpYJ.
   To post to this group, send email to puppet...@googlegroups.com.
   To unsubscribe from this group, send email to
   puppet-users...@googlegroups.com.
   For more options, visit this group at
   http://groups.google.com/group/puppet-users?hl=en.
 
  Are you using a different ruby version than is included in the MSI? On
  my local dev system with Puppet installed I don't see an i386-mingw32
  directory:
 
c:/puppet/sys/ruby/lib/ruby/1.8/i386-mingw32
 
  I do see the following however:
 
 installdir/puppet/sys/ruby/lib/ruby/1.8/digest/sha2.rb
 
  Also this link describes the same problem, may be a ruby 1.9.3-p0
  issue on Windows: https://github.com/oneclick/rubyinstaller/issues/102
 
  Or perhaps your system PATH and/or RUBYLIB is picking up a different
  version than the one the MSI installed.
 
  Josh
 
  --
  Josh Cooper
  Developer, Puppet Labs
 
  --
  You received this message because you are subscribed to the Google Groups
  Puppet Users group.
  To view this discussion on the web visit
  https://groups.google.com/d/msg/puppet-users/-/3K8q52uLCdsJ.
 
  To post to this group, send email to puppet-users@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.



 --
 Josh Cooper
 Developer, Puppet Labs

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send 

Re: [Puppet Users] Puppet windows -

2012-09-26 Thread Pavel Drobushevich
Hi Josh,

I've installed puppet from official msi puppet-enterprise-2.5.0.msi. There 
are no any other ruby installation on this machine. Ruby version returns 
following info:
1.8.7 (2011-12-28 patchlevel 357) [i386-mingw32]
It've been working about 2 months, but suddenly yesterday stopped.

Thanks, Pavel

On Wednesday, September 26, 2012 12:55:29 AM UTC+3, Josh Cooper wrote:

 Hi Pavel, 

 On Tue, Sep 25, 2012 at 2:28 PM, Pavel Drobushevich 
 p.drobu...@gmail.com javascript: wrote: 
  Hi all, 
  
  We use puppet on many windows machines (Windows Server2008R2 x64). It 
 works 
  fine, but on one of them it was fail down and couldn't start work again. 
 I 
  try to reinstall, but it didn't help. May be you have any idea. Thanks 
 in 
  advance. 
  
  Error message from puppet 
  C:/puppet/puppet/lib/puppet/util/autoload.rb:85:in `load': Could not 
  autoload co 
  mponent: 193: %1 is not a valid Win32 application.   - 
  C:/puppet/sys/ruby/lib/ru 
  by/1.8/i386-mingw32/digest/sha1.so (Puppet::Error) 
  from C:/puppet/puppet/lib/puppet/util/autoload.rb:73:in `each' 
  from C:/puppet/puppet/lib/puppet/util/autoload.rb:73:in `load' 
  from C:/puppet/puppet/lib/puppet/metatype/manager.rb:116:in 
 `type' 
  from C:/puppet/puppet/lib/puppet/type.rb:1966 
  from 
  C:/puppet/sys/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.r 
  b:36:in `gem_original_require' 
  from 
  C:/puppet/sys/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.r 
  b:36:in `require' 
  from C:/puppet/puppet/lib/puppet.rb:121 
  from C:/puppet/puppet/lib/puppet/application.rb:272:in `require' 
  from C:/puppet/puppet/lib/puppet/application.rb:272:in 
 `initialize' 
  from C:/puppet/puppet/lib/puppet/util/command_line.rb:60:in 
 `new' 
  from C:/puppet/puppet/lib/puppet/util/command_line.rb:60:in 
  `execute' 
  from C:/puppet/puppet/bin/puppet:4 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  Puppet Users group. 
  To view this discussion on the web visit 
  https://groups.google.com/d/msg/puppet-users/-/tszwlQxzKpYJ. 
  To post to this group, send email to 
  puppet...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
  puppet-users...@googlegroups.com javascript:. 
  For more options, visit this group at 
  http://groups.google.com/group/puppet-users?hl=en. 

 Are you using a different ruby version than is included in the MSI? On 
 my local dev system with Puppet installed I don't see an i386-mingw32 
 directory: 

   c:/puppet/sys/ruby/lib/ruby/1.8/i386-mingw32 

 I do see the following however: 

installdir/puppet/sys/ruby/lib/ruby/1.8/digest/sha2.rb 

 Also this link describes the same problem, may be a ruby 1.9.3-p0 
 issue on Windows: https://github.com/oneclick/rubyinstaller/issues/102 

 Or perhaps your system PATH and/or RUBYLIB is picking up a different 
 version than the one the MSI installed. 

 Josh 

 -- 
 Josh Cooper 
 Developer, Puppet Labs 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/3K8q52uLCdsJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet windows -

2012-09-25 Thread Pavel Drobushevich
Hi all,

We use puppet on many windows machines (Windows Server2008R2 x64). It works 
fine, but on one of them it was fail down and couldn't start work again. I 
try to reinstall, but it didn't help. May be you have any idea. Thanks in 
advance.

*Error message from puppet*
C:/puppet/puppet/lib/puppet/util/autoload.rb:85:in `load': Could not 
autoload co
mponent: 193: %1 is not a valid Win32 application.   - 
C:/puppet/sys/ruby/lib/ru
by/1.8/i386-mingw32/digest/sha1.so (Puppet::Error)
from C:/puppet/puppet/lib/puppet/util/autoload.rb:73:in `each'
from C:/puppet/puppet/lib/puppet/util/autoload.rb:73:in `load'
from C:/puppet/puppet/lib/puppet/metatype/manager.rb:116:in `type'
from C:/puppet/puppet/lib/puppet/type.rb:1966
from 
C:/puppet/sys/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.r
b:36:in `gem_original_require'
from 
C:/puppet/sys/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.r
b:36:in `require'
from C:/puppet/puppet/lib/puppet.rb:121
from C:/puppet/puppet/lib/puppet/application.rb:272:in `require'
from C:/puppet/puppet/lib/puppet/application.rb:272:in `initialize'
from C:/puppet/puppet/lib/puppet/util/command_line.rb:60:in `new'
from C:/puppet/puppet/lib/puppet/util/command_line.rb:60:in 
`execute'
from C:/puppet/puppet/bin/puppet:4

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/tszwlQxzKpYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet windows -

2012-09-25 Thread Josh Cooper
Hi Pavel,

On Tue, Sep 25, 2012 at 2:28 PM, Pavel Drobushevich
p.drobushev...@gmail.com wrote:
 Hi all,

 We use puppet on many windows machines (Windows Server2008R2 x64). It works
 fine, but on one of them it was fail down and couldn't start work again. I
 try to reinstall, but it didn't help. May be you have any idea. Thanks in
 advance.

 Error message from puppet
 C:/puppet/puppet/lib/puppet/util/autoload.rb:85:in `load': Could not
 autoload co
 mponent: 193: %1 is not a valid Win32 application.   -
 C:/puppet/sys/ruby/lib/ru
 by/1.8/i386-mingw32/digest/sha1.so (Puppet::Error)
 from C:/puppet/puppet/lib/puppet/util/autoload.rb:73:in `each'
 from C:/puppet/puppet/lib/puppet/util/autoload.rb:73:in `load'
 from C:/puppet/puppet/lib/puppet/metatype/manager.rb:116:in `type'
 from C:/puppet/puppet/lib/puppet/type.rb:1966
 from
 C:/puppet/sys/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.r
 b:36:in `gem_original_require'
 from
 C:/puppet/sys/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.r
 b:36:in `require'
 from C:/puppet/puppet/lib/puppet.rb:121
 from C:/puppet/puppet/lib/puppet/application.rb:272:in `require'
 from C:/puppet/puppet/lib/puppet/application.rb:272:in `initialize'
 from C:/puppet/puppet/lib/puppet/util/command_line.rb:60:in `new'
 from C:/puppet/puppet/lib/puppet/util/command_line.rb:60:in
 `execute'
 from C:/puppet/puppet/bin/puppet:4

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/tszwlQxzKpYJ.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.

Are you using a different ruby version than is included in the MSI? On
my local dev system with Puppet installed I don't see an i386-mingw32
directory:

  c:/puppet/sys/ruby/lib/ruby/1.8/i386-mingw32

I do see the following however:

   installdir/puppet/sys/ruby/lib/ruby/1.8/digest/sha2.rb

Also this link describes the same problem, may be a ruby 1.9.3-p0
issue on Windows: https://github.com/oneclick/rubyinstaller/issues/102

Or perhaps your system PATH and/or RUBYLIB is picking up a different
version than the one the MSI installed.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2012-07-05 Thread Greg Swift
the manifest is now attached to the ticket

On Friday, June 22, 2012 2:23:31 PM UTC-5, Josh Cooper wrote:

 Thanks Greg. Can you attach the manifest you are using (with the 
 arguments) to the ticket? 

 On Fri, Jun 22, 2012 at 12:20 PM, Greg Swift  wrote: 
  attached to the ticket.  I won't be able to work on this for about a 
 week 
  though.. other priority just came up.  But let me know and when I can 
 get 
  back on it I will. 
  
  
  On Thursday, June 21, 2012 3:02:38 PM UTC-5, Greg Swift wrote: 
  
  first thing in the morning. 
  
  On Thursday, June 21, 2012 1:15:09 PM UTC-5, Josh Cooper wrote: 
  
  Can you try running with --trace and --debug, and adding the stack 
 trace 
  to the ticket? 
  
  On Jun 21, 2012, at 10:57 AM, Greg Swift  wrote: 
  
  So.. now I'm getting your error instead of mine. 
  
  On Thursday, June 21, 2012 12:46:08 PM UTC-5, Greg Swift wrote: 
  
  I believe you are correct.  I removed the arguments key/value pair 
 and 
  it ran fine.  I'm patching in your changes to try it with the 
 arguments 
  option. 
  
  thank you very much 
  
  On Thursday, June 21, 2012 11:53:40 AM UTC-5, Josh Cooper wrote: 
  
  Hi Greg, 
  
  I believe this is issue https://projects.puppetlabs.com/issues/13008, 

  which I have fixed in my topic branch and is awaiting to be merged 
 into 
  2.7.x. It would be great if you could try it out and let me know how 
 it 
  goes. 
  
  Josh 
  
  On Thu, Jun 21, 2012 at 9:00 AM, Greg Swift wrote: 
  
  Mohamed, 
  
  Did you get anywhere with this?  I'm running into the exact same 
  issue. 
  
  -greg 
  
  
  On Wednesday, November 23, 2011 7:29:34 PM UTC-6, Jacob Helwig 
 wrote: 
  
  On 2011-11-23 15:53 , Mohamed Lrhazi wrote: 
   Thanks JacobDid that answer my TypeError  as well? 
  
  No, a stack trace would help for that. 
  
  -- 
  Jacob Helwig 
  http://about.me/jhelwig 
  
   
   Mohamed. 
  
  
   
   On Wed, Nov 23, 2011 at 5:28 PM, Jacob Helwig wrote: 
   On 2011-11-23 13:02 , Mohamed Lrhazi wrote: 
   am trying this: 
   
   scheduled_task { 'Puppet Run': 
   ensure= present, 
   enabled   = true, 
   command   = 'C:\\ruby187\\bin\\puppet.bat', 
   arguments = 'agent --verbose --logdest 
   C:\\Temp\puppet.log', 
   trigger   = { 
   schedule   = daily, 
   #every  = 2 # Defaults to 1 
   #start_date = '2011-08-31', # Defaults to 'today' 
   start_time = '16:00',  # Must be specified 
   } 
   } 
   
   And getting this error: 
   
   err: /Stage[main]/Gu_splunk/Scheduled_task[Puppet Run]/ensure: 
   change 
   from absent to present failed: Could not set 'present on 
 ensure: 
   TypeError at /etc/puppet/ 
   environments/windows/modules/gu_splunk/manifests/init.pp:84 
   
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Puppet Users group. 
  To view this discussion on the web visit 
  https://groups.google.com/d/msg/puppet-users/-/cIrGZR2XNjYJ. 
  
  To post to this group, send email to puppet-users@googlegroups.com. 

  To unsubscribe from this group, send email to 
  puppet-users+unsubscr...@googlegroups.com. 
  For more options, visit this group at 
  http://groups.google.com/group/puppet-users?hl=en. 
  
  
  
  
  -- 
  Josh Cooper 
  Developer, Puppet Labs 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  Puppet Users group. 
  To view this discussion on the web visit 
  https://groups.google.com/d/msg/puppet-users/-/CG9Sa5hf2jYJ. 
  To post to this group, send email to puppet-users@googlegroups.com. 
  To unsubscribe from this group, send email to 
  puppet-users+unsubscr...@googlegroups.com. 
  For more options, visit this group at 
  http://groups.google.com/group/puppet-users?hl=en. 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  Puppet Users group. 
  To view this discussion on the web visit 
  https://groups.google.com/d/msg/puppet-users/-/Gs01u9mrFhEJ. 
  
  To post to this group, send email to puppet-users@googlegroups.com. 
  To unsubscribe from this group, send email to 
  puppet-users+unsubscr...@googlegroups.com. 
  For more options, visit this group at 
  http://groups.google.com/group/puppet-users?hl=en. 



 -- 
 Josh Cooper 
 Developer, Puppet Labs 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/BJ-kUP8TRH8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet windows newbie: command runs but ends with failure

2012-06-28 Thread Anoop Gopalakrishnan
Hi , 
  I am new to Puppet and I just started testing it out in my windows 
machine to do a set of tasks which I do manually currently and once I get 
the hang of it would like to use it for provisioning later. My current task 
is pretty simple:
1. Run an svn update command on a folder
2. Run maven install command
3. ... a whole bunch of other tasks related to setting up a custom server 
on a users machine.

However , when I run an exec like the below, I can see that the maven runs 
successfully  but the task fails at the end as shown below:

/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Compiling 59 source 
files to 
C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console\target\classes
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 

/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] BUILD SUCCESSFUL
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 

/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Total time: 6 seconds
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Finished at: Thu Jun 
28 14:14:37 PDT 2012
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Final Memory: 
48M/229M
/Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 

/Stage[main]/Cmserver/Exec[mvninstall]/returns: 'cmd' is not recognized as 
an internal or external command,
/Stage[main]/Cmserver/Exec[mvninstall]/returns: operable program or batch 
file.
Error: C:\Windows\SysWow64\cmd.exe /c mvn.bat compile returned 1 instead of 
one of [0]
Error: /Stage[main]/Cmserver/Exec[mvninstall]/returns: change from notrun 
to 0 failed: C:\Windows\System32\cmd.exe /c mvn.bat compile returned 1 
instead of one
of [0]
/Stage[main]/Cmserver/File[testfile]: Dependency Exec[mvninstall] has 
failures:true
Warning: /Stage[main]/Cmserver/File[testfile]: Skipping because of failed 
dependencies
Finished catalog run in 9.25 seconds

The task is as below:
exec { 'mvninstall':
cwd = 
'C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console',
path = 'C:/Users/agopalakrishnan/Software/apache-maven-2.2.1/bin;%PATH%',
command = 'C:\Windows\System32\cmd.exe /c mvn.bat compile',
   provider = windows,
 logoutput = true,
timeout = 1000,
}

Any help is greatly appeciated.

Regards,
Anoop

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/E9MOpAK6U5MJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet windows newbie: command runs but ends with failure

2012-06-28 Thread Josh Cooper
Hi Anoop,

On Thu, Jun 28, 2012 at 2:26 PM, Anoop Gopalakrishnan
anoop2...@gmail.com wrote:

 Hi ,
   I am new to Puppet and I just started testing it out in my windows machine 
 to do a set of tasks which I do manually currently and once I get the hang of 
 it would like to use it for provisioning later. My current task is pretty 
 simple:
 1. Run an svn update command on a folder
 2. Run maven install command
 3. ... a whole bunch of other tasks related to setting up a custom server on 
 a users machine.

 However , when I run an exec like the below, I can see that the maven runs 
 successfully  but the task fails at the end as shown below:

 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Compiling 59 source 
 files to 
 C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console\target\classes
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] BUILD SUCCESSFUL
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Total time: 6 seconds
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Finished at: Thu Jun 
 28 14:14:37 PDT 2012
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] Final Memory: 48M/229M
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: [INFO] 
 
 /Stage[main]/Cmserver/Exec[mvninstall]/returns: 'cmd' is not recognized as an 
 internal or external command,

Your mvn.bat script is trying to invoke cmd, but failing because the
PATH environment is not correct, see more below.

 /Stage[main]/Cmserver/Exec[mvninstall]/returns: operable program or batch 
 file.
 Error: C:\Windows\SysWow64\cmd.exe /c mvn.bat compile returned 1 instead of 
 one of [0]

Just a side note, since ruby is a 32-bit executable, file system
redirection takes effect, causing puppet to launch the 32-bit cmd.exe.
This may or may not be an issue for you depending on what you are
trying to do. There's more info here[1]

 Error: /Stage[main]/Cmserver/Exec[mvninstall]/returns: change from notrun to 
 0 failed: C:\Windows\System32\cmd.exe /c mvn.bat compile returned 1 instead 
 of one
 of [0]
 /Stage[main]/Cmserver/File[testfile]: Dependency Exec[mvninstall] has 
 failures:true
 Warning: /Stage[main]/Cmserver/File[testfile]: Skipping because of failed 
 dependencies
 Finished catalog run in 9.25 seconds

 The task is as below:
 exec { 'mvninstall':
 cwd = 
 'C:\Users\agopalakrishnan\SourceCode\CM-Server\implementation\test-console',
 path = 'C:/Users/agopalakrishnan/Software/apache-maven-2.2.1/bin;%PATH%',
 command = 'C:\Windows\System32\cmd.exe /c mvn.bat compile',
       provider = windows,
         logoutput = true,
 timeout = 1000,
 }

Puppet doesn't expand environment variables the way you are thinking.
Change that to:

  path = C:/Users/agopalakrishnan/Software/apache-maven-2.2.1/bin;${path},

When compiling the catalog, the `path` parameter (for the exec
resource) will be interpolated using the `path` fact as reported by
the agent. More about using variables here[2]

 Any help is greatly appeciated.

 Regards,
 Anoop

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/E9MOpAK6U5MJ.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.

Josh

[1] https://projects.puppetlabs.com/issues/12980
[2] http://docs.puppetlabs.com/learning/variables.html
--
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] puppet windows exec successful but not really

2012-06-22 Thread Josh Cooper
Hi Michael,

On Fri, Jun 22, 2012 at 11:00 AM, Josh Cooper j...@puppetlabs.com wrote:

 Hi Michael

 On Fri, Jun 22, 2012 at 10:33 AM, Michael Baydoun indymicha...@gmail.com 
 wrote:

 My windows client is running Windows 2003 Server 32 bit


 On Wed, Jun 20, 2012 at 3:38 PM, Josh Cooper j...@puppetlabs.com wrote:

 Hi Michael,

 On Wed, Jun 20, 2012 at 10:29 AM, Michael Baydoun indymicha...@gmail.com 
 wrote:

 have the following in my manifest to delete old uninstall directories and 
 logs
 using exec since we don't have tidy for windows yet

 {code}
         exec { 'CleanupOldUninstallDirs':
           command = 'C:\Windows\system32\forfiles.exe -p C:\Windows -m 
 $NtUninstall* -d -65 -c cmd /c dev /F /S /Q @path',
         }
         exec { 'CleanupOldPatchLogs':
           command = 'C:\Windows\system32\forfiles.exe -p C:\Windows -m 
 KB*.log -d -365 -c cmd /c dev /F /S /Q @path',
         }
 {code}


 Puppet requires that exec resources return non-zero exit status if the 
 command fails. If I run the following, it still returns 0:

 C:\forfiles -p c:\windows -m $NtUninstall* -d -65 -c cmd /c foo
 'foo' is not recognized as an internal or external command,
 operable program or batch file.
 ...
 C:\echo %ERRORLEVEL%
 0

 I think the issue is that dev is in your PATH when run from the command line, 
 but is not in the PATH that puppet is running with. Try specifying the `path` 
 parameter in your exec resources, e.g.

 path = 'c:\windows\system32;c:\windows;c:\path\to\dev;etc'


Or is that a typo? Should that be `del` instead of `dev`?


 runs correctly debug output below


 however, files are not deleted, as evidenced by running the same forfiles 
 at the command line



 yet the forfiles with delete works if I run it from the windows command 
 line

 Suggestions?  Bug?


 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.


 If this is a 64-bit OS, then I'm guessing it's an issue with filesystem 
 redirection. Ruby is a 32-bit app, so any filesystem access to 
 c:\windows\system32 is redirected to c:\windows\syswow64. You can avoid 
 this by specifying c:\windows\sysnative instead.

 Josh

 --
 Josh Cooper
 Developer, Puppet Labs

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.


 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.




 --
 Josh Cooper
 Developer, Puppet Labs




--
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2012-06-22 Thread Greg Swift
attached to the ticket.  I won't be able to work on this for about a week 
though.. other priority just came up.  But let me know and when I can get 
back on it I will.

On Thursday, June 21, 2012 3:02:38 PM UTC-5, Greg Swift wrote:

 first thing in the morning.

 On Thursday, June 21, 2012 1:15:09 PM UTC-5, Josh Cooper wrote:

 Can you try running with --trace and --debug, and adding the stack trace 
 to the ticket?

 On Jun 21, 2012, at 10:57 AM, Greg Swift  wrote:

 So.. now I'm getting your error instead of mine.

 On Thursday, June 21, 2012 12:46:08 PM UTC-5, Greg Swift wrote:

 I believe you are correct.  I removed the arguments key/value pair and 
 it ran fine.  I'm patching in your changes to try it with the arguments 
 option.

 thank you very much

 On Thursday, June 21, 2012 11:53:40 AM UTC-5, Josh Cooper wrote:

 Hi Greg,

 I believe this is issue https://projects.puppetlabs.com/issues/13008, 
 which I have fixed in my topic branch and is awaiting to be merged into 
 2.7.x. It would be great if you could try it out and let me know how it 
 goes.

 Josh

 On Thu, Jun 21, 2012 at 9:00 AM, Greg Swift wrote:

 Mohamed,

 Did you get anywhere with this?  I'm running into the exact same issue.

 -greg


 On Wednesday, November 23, 2011 7:29:34 PM UTC-6, Jacob Helwig wrote:

 On 2011-11-23 15:53 , Mohamed Lrhazi wrote:
  Thanks JacobDid that answer my TypeError  as well?

 No, a stack trace would help for that.

 -- 
 Jacob Helwig
 http://about.me/jhelwig

  
  Mohamed.

  
  On Wed, Nov 23, 2011 at 5:28 PM, Jacob Helwig wrote:
  On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
  am trying this:
 
  scheduled_task { 'Puppet Run':
  ensure= present,
  enabled   = true,
  command   = 'C:\\ruby187\\bin\\puppet.bat'**,
  arguments = 'agent --verbose --logdest 
 C:\\Temp\puppet.log',
  trigger   = {
  schedule   = daily,
  #every  = 2 # Defaults to 1
  #start_date = '2011-08-31', # Defaults to 'today'
  start_time = '16:00',  # Must be specified
  }
  }
 
  And getting this error:
 
  err: /Stage[main]/Gu_splunk/**Scheduled_task[Puppet Run]/ensure: 
 change
  from absent to present failed: Could not set 'present on ensure:
  TypeError at /etc/puppet/
  environments/windows/modules/**gu_splunk/manifests/init.pp:84
 

  -- 
 You received this message because you are subscribed to the Google 
 Groups Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/cIrGZR2XNjYJ.

 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.




 -- 
 Josh Cooper
 Developer, Puppet Labs

   -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/CG9Sa5hf2jYJ.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Gs01u9mrFhEJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2012-06-22 Thread Josh Cooper
Thanks Greg. Can you attach the manifest you are using (with the
arguments) to the ticket?

On Fri, Jun 22, 2012 at 12:20 PM, Greg Swift gregsw...@gmail.com wrote:
 attached to the ticket.  I won't be able to work on this for about a week
 though.. other priority just came up.  But let me know and when I can get
 back on it I will.


 On Thursday, June 21, 2012 3:02:38 PM UTC-5, Greg Swift wrote:

 first thing in the morning.

 On Thursday, June 21, 2012 1:15:09 PM UTC-5, Josh Cooper wrote:

 Can you try running with --trace and --debug, and adding the stack trace
 to the ticket?

 On Jun 21, 2012, at 10:57 AM, Greg Swift  wrote:

 So.. now I'm getting your error instead of mine.

 On Thursday, June 21, 2012 12:46:08 PM UTC-5, Greg Swift wrote:

 I believe you are correct.  I removed the arguments key/value pair and
 it ran fine.  I'm patching in your changes to try it with the arguments
 option.

 thank you very much

 On Thursday, June 21, 2012 11:53:40 AM UTC-5, Josh Cooper wrote:

 Hi Greg,

 I believe this is issue https://projects.puppetlabs.com/issues/13008,
 which I have fixed in my topic branch and is awaiting to be merged into
 2.7.x. It would be great if you could try it out and let me know how it
 goes.

 Josh

 On Thu, Jun 21, 2012 at 9:00 AM, Greg Swift wrote:

 Mohamed,

 Did you get anywhere with this?  I'm running into the exact same
 issue.

 -greg


 On Wednesday, November 23, 2011 7:29:34 PM UTC-6, Jacob Helwig wrote:

 On 2011-11-23 15:53 , Mohamed Lrhazi wrote:
  Thanks JacobDid that answer my TypeError  as well?

 No, a stack trace would help for that.

 --
 Jacob Helwig
 http://about.me/jhelwig

 
  Mohamed.


 
  On Wed, Nov 23, 2011 at 5:28 PM, Jacob Helwig wrote:
  On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
  am trying this:
 
      scheduled_task { 'Puppet Run':
          ensure    = present,
          enabled   = true,
          command   = 'C:\\ruby187\\bin\\puppet.bat',
          arguments = 'agent --verbose --logdest
  C:\\Temp\puppet.log',
          trigger   = {
              schedule   = daily,
              #every      = 2             # Defaults to 1
              #start_date = '2011-08-31', # Defaults to 'today'
              start_time = '16:00',      # Must be specified
          }
      }
 
  And getting this error:
 
  err: /Stage[main]/Gu_splunk/Scheduled_task[Puppet Run]/ensure:
  change
  from absent to present failed: Could not set 'present on ensure:
  TypeError at /etc/puppet/
  environments/windows/modules/gu_splunk/manifests/init.pp:84
 

 --
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/cIrGZR2XNjYJ.

 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.




 --
 Josh Cooper
 Developer, Puppet Labs

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/CG9Sa5hf2jYJ.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/Gs01u9mrFhEJ.

 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.



-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2012-06-21 Thread Josh Cooper
Hi Greg,

I believe this is issue https://projects.puppetlabs.com/issues/13008, which
I have fixed in my topic branch and is awaiting to be merged into 2.7.x. It
would be great if you could try it out and let me know how it goes.

Josh

On Thu, Jun 21, 2012 at 9:00 AM, Greg Swift gregsw...@gmail.com wrote:

 Mohamed,

 Did you get anywhere with this?  I'm running into the exact same issue.

 -greg


 On Wednesday, November 23, 2011 7:29:34 PM UTC-6, Jacob Helwig wrote:

 On 2011-11-23 15:53 , Mohamed Lrhazi wrote:
  Thanks JacobDid that answer my TypeError  as well?

 No, a stack trace would help for that.

 --
 Jacob Helwig
 http://about.me/jhelwig

 
  Mohamed.

 
  On Wed, Nov 23, 2011 at 5:28 PM, Jacob Helwig wrote:
  On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
  am trying this:
 
  scheduled_task { 'Puppet Run':
  ensure= present,
  enabled   = true,
  command   = 'C:\\ruby187\\bin\\puppet.bat'**,
  arguments = 'agent --verbose --logdest C:\\Temp\puppet.log',
  trigger   = {
  schedule   = daily,
  #every  = 2 # Defaults to 1
  #start_date = '2011-08-31', # Defaults to 'today'
  start_time = '16:00',  # Must be specified
  }
  }
 
  And getting this error:
 
  err: /Stage[main]/Gu_splunk/**Scheduled_task[Puppet Run]/ensure:
 change
  from absent to present failed: Could not set 'present on ensure:
  TypeError at /etc/puppet/
  environments/windows/modules/**gu_splunk/manifests/init.pp:84
 

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/cIrGZR2XNjYJ.

 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.




-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2012-06-21 Thread Greg Swift
So.. now I'm getting your error instead of mine.

On Thursday, June 21, 2012 12:46:08 PM UTC-5, Greg Swift wrote:

 I believe you are correct.  I removed the arguments key/value pair and it 
 ran fine.  I'm patching in your changes to try it with the arguments option.

 thank you very much

 On Thursday, June 21, 2012 11:53:40 AM UTC-5, Josh Cooper wrote:

 Hi Greg,

 I believe this is issue https://projects.puppetlabs.com/issues/13008, 
 which I have fixed in my topic branch and is awaiting to be merged into 
 2.7.x. It would be great if you could try it out and let me know how it 
 goes.

 Josh

 On Thu, Jun 21, 2012 at 9:00 AM, Greg Swift wrote:

 Mohamed,

 Did you get anywhere with this?  I'm running into the exact same issue.

 -greg


 On Wednesday, November 23, 2011 7:29:34 PM UTC-6, Jacob Helwig wrote:

 On 2011-11-23 15:53 , Mohamed Lrhazi wrote:
  Thanks JacobDid that answer my TypeError  as well?

 No, a stack trace would help for that.

 -- 
 Jacob Helwig
 http://about.me/jhelwig

  
  Mohamed.

  
  On Wed, Nov 23, 2011 at 5:28 PM, Jacob Helwig wrote:
  On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
  am trying this:
 
  scheduled_task { 'Puppet Run':
  ensure= present,
  enabled   = true,
  command   = 'C:\\ruby187\\bin\\puppet.bat'**,
  arguments = 'agent --verbose --logdest 
 C:\\Temp\puppet.log',
  trigger   = {
  schedule   = daily,
  #every  = 2 # Defaults to 1
  #start_date = '2011-08-31', # Defaults to 'today'
  start_time = '16:00',  # Must be specified
  }
  }
 
  And getting this error:
 
  err: /Stage[main]/Gu_splunk/**Scheduled_task[Puppet Run]/ensure: 
 change
  from absent to present failed: Could not set 'present on ensure:
  TypeError at /etc/puppet/
  environments/windows/modules/**gu_splunk/manifests/init.pp:84
 

  -- 
 You received this message because you are subscribed to the Google 
 Groups Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/cIrGZR2XNjYJ.

 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.




 -- 
 Josh Cooper
 Developer, Puppet Labs

  

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/CG9Sa5hf2jYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2012-06-21 Thread Josh Cooper
Can you try running with --trace and --debug, and adding the stack trace to the 
ticket?

On Jun 21, 2012, at 10:57 AM, Greg Swift gregsw...@gmail.com wrote:

 So.. now I'm getting your error instead of mine.
 
 On Thursday, June 21, 2012 12:46:08 PM UTC-5, Greg Swift wrote:
 I believe you are correct.  I removed the arguments key/value pair and it ran 
 fine.  I'm patching in your changes to try it with the arguments option.
 
 thank you very much
 
 On Thursday, June 21, 2012 11:53:40 AM UTC-5, Josh Cooper wrote:
 Hi Greg,
 
 I believe this is issue https://projects.puppetlabs.com/issues/13008, which I 
 have fixed in my topic branch and is awaiting to be merged into 2.7.x. It 
 would be great if you could try it out and let me know how it goes.
 
 Josh
 
 On Thu, Jun 21, 2012 at 9:00 AM, Greg Swift wrote:
 Mohamed,
 
 Did you get anywhere with this?  I'm running into the exact same issue.
 
 -greg
 
 
 On Wednesday, November 23, 2011 7:29:34 PM UTC-6, Jacob Helwig wrote:
 On 2011-11-23 15:53 , Mohamed Lrhazi wrote:
  Thanks JacobDid that answer my TypeError  as well?
 No, a stack trace would help for that.
 
 -- 
 Jacob Helwig
 http://about.me/jhelwig
 
  
  Mohamed.
 
 
  
  On Wed, Nov 23, 2011 at 5:28 PM, Jacob Helwig wrote:
  On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
  am trying this:
 
  scheduled_task { 'Puppet Run':
  ensure= present,
  enabled   = true,
  command   = 'C:\\ruby187\\bin\\puppet.bat',
  arguments = 'agent --verbose --logdest C:\\Temp\puppet.log',
  trigger   = {
  schedule   = daily,
  #every  = 2 # Defaults to 1
  #start_date = '2011-08-31', # Defaults to 'today'
  start_time = '16:00',  # Must be specified
  }
  }
 
  And getting this error:
 
  err: /Stage[main]/Gu_splunk/Scheduled_task[Puppet Run]/ensure: change
  from absent to present failed: Could not set 'present on ensure:
  TypeError at /etc/puppet/
  environments/windows/modules/gu_splunk/manifests/init.pp:84
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/cIrGZR2XNjYJ.
 
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 
 
 
 -- 
 Josh Cooper
 Developer, Puppet Labs
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/CG9Sa5hf2jYJ.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet Windows exec

2012-03-23 Thread Jay Ze
Hi,

Is it correct that it's not possible to excecute Windows Commands
directly with the puppet run?

For example:

exec { 'ExecCreatedFolder':
   command = mkdir C:\PuppetOrdner\ExecCreatedFolder,
}




I allways have to bind it with a .bat file right?




file { 'c:/PuppetFolder/puppettest.bat':
  ensure  = file,
  owner = 'administrator',
  content  = mkdir C:\PuppetFolder\BatchCreatedFolder,
  }


exec { 'c:/PuppetFolder/puppettest.bat':
   require = File['c:/PuppetFolder/puppettest.bat'],
}

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet windows File permissions

2012-03-01 Thread Josh Cooper
Hi Marco,

On Thu, Mar 1, 2012 at 6:17 AM, Marco Parra D. marco.parr...@gmail.comwrote:

  Hi Josh, thank you for reply,

 On 29-02-2012 19:12, Josh Cooper wrote:

 Hi Marco,

 On Wed, Feb 29, 2012 at 10:52 AM, Marco Parra D. 
 marco.parr...@gmail.comwrote:

  Hi Josh,
 I'm runnig from cmd.exe, I'm using Administrator account on the windows
 box, this is the output for the command that you asked:

 C:\Users\Administratorwhoami /groups

 GROUP INFORMATION
 -

 Group Name   Type SID
 Attributes
   
 ===
 Everyone Well-known group S-1-1-0
 Mandatory group, Enabled by default, Enabled group
 BUILTIN\Administrators   AliasS-1-5-32-544
 Mandatory group, Enabled by default, Enabled group, Group owner


  This shows that you are running elevated, which is good.


  BUILTIN\UsersAliasS-1-5-32-545
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\INTERACTIVE Well-known group S-1-5-4
 Mandatory group, Enabled by default, Enabled group
 CONSOLE LOGONWell-known group S-1-2-1
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\Authenticated Users Well-known group S-1-5-11
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\This Organization   Well-known group S-1-5-15
 Mandatory group, Enabled by default, Enabled group
 LOCALWell-known group S-1-2-0
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\NTLM Authentication Well-known group S-1-5-64-10
 Mandatory group, Enabled by default, Enabled group
 Mandatory Label\High Mandatory Level LabelS-1-16-12288
 Mandatory group, Enabled by default, Enabled group

 C:\Users\Administrator


 I found a page that talks about security on windows 2008, and I tried
 changing a configuration for the IIS, On the Ineternet Information Services
 Manager, under Management, Configuration Editor, selecting Providers, click
 on Edit Items, selecting DataProtectionConfigurationProvider, I change
 useMachineProtection, and save the change.

 On Windows 7 the scripts run perfect, but on Windows 2008 R2 still didn't
 work, still the execution said that the file was modified, but nothing
 happens on the file. no errors it's showed


  Is your Windows 7 box 32-bit? If you're using 32-bit ruby on a 64-bit
 Windows 2008 R2 to edit 
 C:\Windows\System32\inetsrv\config\applicationHost.config,
 Windows may be redirecting you to %windir%\syswow64\inetsrv instead:
 http://forums.iis.net/p/1150832/1875622.aspx


 Yeah, I'm using a Windows 7 32 bits box, and it's works fine... in the
 other hand, I've testing on Windows 2008 R2 64 bits server, I checked on
 the path tha you said, and your right, the file is changed on
 c:\windows\SysWOW64\inetsrv\config\applicationHost.config, but IIS uses the
 file on c:\windows\system32\inetsrv\config\applicationHost.config

 C:\Windows\SysWOW64\inetsrv\Configdir applicationHost.config
  Volume in drive C has no label.
  Volume Serial Number is F4D5-2946

  Directory of C:\Windows\SysWOW64\inetsrv\Config

 03/01/2012  06:01 AM82,384 applicationHost.config
1 File(s) 82,384 bytes
0 Dir(s)   6,910,136,320 bytes free

 C:\Windows\SysWOW64\inetsrv\Configdir
 c:\Windows\System32\inetsrv\config\applicationHost.config
  Volume in drive C has no label.
  Volume Serial Number is F4D5-2946

  Directory of c:\Windows\System32\inetsrv\config

 02/29/2012  11:01 AM82,122 applicationHost.config
1 File(s) 82,122 bytes
0 Dir(s)   6,910,136,320 bytes free


 How can I tell ruby that don't uses c:\windows\SysWOW64\inetsrv\config
 path? Is this posible?...


You can disable file system redirection using the special 'sysnative'
alias: C:\Windows\Sysnative\inetsrv\config\applicationHost.config. But
acccording to MS this is not available on 2003[1], which is odd, because
then 32-bit processes in 64-bit 2003 can't disable file system redirection
on a per-file basis. There are APIs for disabling file system redirection
for the entire process, but that would probably break 32-bit ruby.exe

Perhaps the best option is to create a symlink to the IIS configuration
directory[2]. However, 2003 doesn't support symlinks, so again I'm not sure
how to do this on 64-bit 2003. Also puppet cannot currently manage symlinks
on Windows, so you'd have to use an exec resource to do that.

I'll add a note to our troubleshooting guide about 32vs64bit. I'd be
curious to hear about which approach you end up taking.

Josh

http://msdn.microsoft.com/en-us/library/aa384187(v=vs.85).aspx

Re: [Puppet Users] Puppet windows File permissions

2012-03-01 Thread Marco Parra D.
Hi Josh, Looking in the web, I found the solution that you mentioned, 
c:\windows\Sysnative, and works perfect to me! thank you for your help


C:\Users\Administratorpuppet agent --test
notice: Ignoring --listen on onetime run
info: Retrieving plugin
info: Caching catalog for cscltest01.office.com
info: Applying configuration version '1330601351'
notice: 
/Stage[main]/Iisconfig/File[C:\Windows\Sysnative\inetsrv\config\applicationHost.config]/content:

info: FileBucket adding {md5}e32032ed7a6f5cce9895058575ff1997
info: 
/Stage[main]/Iisconfig/File[C:\Windows\Sysnative\inetsrv\config\applicationHost.config]: 
Filebucketed C:/Windows/Sysnative/inetsrv/config/applicationHost.config 
to puppet with sum e32032ed7a6f5cce9895058575ff1997
notice: 
/Stage[main]/Iisconfig/File[C:\Windows\Sysnative\inetsrv\config\applicationHost.config]/content: 
content changed '{md5}e32032ed7a6f5cce9895058575ff1997' to 
'{md5}a3680ad2f20f19e8c2593feccd0dc5f6'

notice: Finished catalog run in 0.30 seconds
notice: 
/File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content:



Best Regards

On 01-03-2012 14:47, Josh Cooper wrote:

Hi Marco,

On Thu, Mar 1, 2012 at 6:17 AM, Marco Parra D. 
marco.parr...@gmail.com mailto:marco.parr...@gmail.com wrote:


Hi Josh, thank you for reply,

On 29-02-2012 19:12, Josh Cooper wrote:

Hi Marco,

On Wed, Feb 29, 2012 at 10:52 AM, Marco Parra D.
marco.parr...@gmail.com mailto:marco.parr...@gmail.com wrote:

Hi Josh,
I'm runnig from cmd.exe, I'm using Administrator account on
the windows box, this is the output for the command that you
asked:

C:\Users\Administratorwhoami /groups

GROUP INFORMATION
-

Group Name   Type
SID  Attributes

 

===
Everyone Well-known group
S-1-1-0  Mandatory group, Enabled by default, Enabled group
BUILTIN\Administrators   Alias   
S-1-5-32-544 Mandatory group, Enabled by default, Enabled

group, Group owner


This shows that you are running elevated, which is good.

BUILTIN\UsersAlias   
S-1-5-32-545 Mandatory group, Enabled by default, Enabled group

NT AUTHORITY\INTERACTIVE Well-known group
S-1-5-4  Mandatory group, Enabled by default, Enabled group
CONSOLE LOGONWell-known group
S-1-2-1  Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users Well-known group
S-1-5-11 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization   Well-known group
S-1-5-15 Mandatory group, Enabled by default, Enabled group
LOCALWell-known group
S-1-2-0  Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NTLM Authentication Well-known group
S-1-5-64-10  Mandatory group, Enabled by default, Enabled group
Mandatory Label\High Mandatory Level Label   
S-1-16-12288 Mandatory group, Enabled by default, Enabled group


C:\Users\Administrator


I found a page that talks about security on windows 2008, and
I tried changing a configuration for the IIS, On the
Ineternet Information Services Manager, under Management,
Configuration Editor, selecting Providers, click on Edit
Items, selecting DataProtectionConfigurationProvider, I
change useMachineProtection, and save the change.

On Windows 7 the scripts run perfect, but on Windows 2008 R2
still didn't work, still the execution said that the file was
modified, but nothing happens on the file. no errors it's
showed


Is your Windows 7 box 32-bit? If you're using 32-bit ruby on a
64-bit Windows 2008 R2 to edit
C:\Windows\System32\inetsrv\config\applicationHost.config,
Windows may be redirecting you to %windir%\syswow64\inetsrv
instead: http://forums.iis.net/p/1150832/1875622.aspx



Yeah, I'm using a Windows 7 32 bits box, and it's works fine... in
the other hand, I've testing on Windows 2008 R2 64 bits server, I
checked on the path tha you said, and your right, the file is
changed on
c:\windows\SysWOW64\inetsrv\config\applicationHost.config, but IIS
uses the file on
c:\windows\system32\inetsrv\config\applicationHost.config

C:\Windows\SysWOW64\inetsrv\Configdir applicationHost.config
 Volume in drive C has no label.
 Volume Serial Number is F4D5-2946

 Directory of C:\Windows\SysWOW64\inetsrv\Config

03/01/2012  06:01 AM82,384 

Re: [Puppet Users] Puppet windows File permissions

2012-03-01 Thread Marco Parra D.
Hi Josh, by the way, this is the link that I found to solve my trouble, 
works perfect on Windows 2008 R2 64 bits.


http://www.ghisler.ch/wiki/index.php/On_64-bit_Windows_versions,_some_files_and_folders_shown_by_Windows_Explorer_are_not_shown_by_Total_Commander!#Affected_files_and_folders

Regards...!

On 01-03-2012 14:57, Marco Parra D. wrote:
Hi Josh, Looking in the web, I found the solution that you mentioned, 
c:\windows\Sysnative, and works perfect to me! thank you for your help


C:\Users\Administratorpuppet agent --test
notice: Ignoring --listen on onetime run
info: Retrieving plugin
info: Caching catalog for cscltest01.office.com
info: Applying configuration version '1330601351'
notice: 
/Stage[main]/Iisconfig/File[C:\Windows\Sysnative\inetsrv\config\applicationHost.config]/content:

info: FileBucket adding {md5}e32032ed7a6f5cce9895058575ff1997
info: 
/Stage[main]/Iisconfig/File[C:\Windows\Sysnative\inetsrv\config\applicationHost.config]: 
Filebucketed 
C:/Windows/Sysnative/inetsrv/config/applicationHost.config to puppet 
with sum e32032ed7a6f5cce9895058575ff1997
notice: 
/Stage[main]/Iisconfig/File[C:\Windows\Sysnative\inetsrv\config\applicationHost.config]/content: 
content changed '{md5}e32032ed7a6f5cce9895058575ff1997' to 
'{md5}a3680ad2f20f19e8c2593feccd0dc5f6'

notice: Finished catalog run in 0.30 seconds
notice: 
/File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content:



Best Regards

On 01-03-2012 14:47, Josh Cooper wrote:

Hi Marco,

On Thu, Mar 1, 2012 at 6:17 AM, Marco Parra D. 
marco.parr...@gmail.com mailto:marco.parr...@gmail.com wrote:


Hi Josh, thank you for reply,

On 29-02-2012 19:12, Josh Cooper wrote:

Hi Marco,

On Wed, Feb 29, 2012 at 10:52 AM, Marco Parra D.
marco.parr...@gmail.com mailto:marco.parr...@gmail.com wrote:

Hi Josh,
I'm runnig from cmd.exe, I'm using Administrator account on
the windows box, this is the output for the command that you
asked:

C:\Users\Administratorwhoami /groups

GROUP INFORMATION
-

Group Name   Type
SID  Attributes

 

===
Everyone Well-known group
S-1-1-0  Mandatory group, Enabled by default, Enabled group
BUILTIN\Administrators   Alias   
S-1-5-32-544 Mandatory group, Enabled by default, Enabled

group, Group owner


This shows that you are running elevated, which is good.

BUILTIN\UsersAlias   
S-1-5-32-545 Mandatory group, Enabled by default, Enabled group

NT AUTHORITY\INTERACTIVE Well-known group
S-1-5-4  Mandatory group, Enabled by default, Enabled group
CONSOLE LOGONWell-known group
S-1-2-1  Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users Well-known group
S-1-5-11 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization   Well-known group
S-1-5-15 Mandatory group, Enabled by default, Enabled group
LOCALWell-known group
S-1-2-0  Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NTLM Authentication Well-known group
S-1-5-64-10  Mandatory group, Enabled by default, Enabled group
Mandatory Label\High Mandatory Level Label   
S-1-16-12288 Mandatory group, Enabled by default, Enabled group


C:\Users\Administrator


I found a page that talks about security on windows 2008,
and I tried changing a configuration for the IIS, On the
Ineternet Information Services Manager, under Management,
Configuration Editor, selecting Providers, click on Edit
Items, selecting DataProtectionConfigurationProvider, I
change useMachineProtection, and save the change.

On Windows 7 the scripts run perfect, but on Windows 2008 R2
still didn't work, still the execution said that the file
was modified, but nothing happens on the file. no errors
it's showed


Is your Windows 7 box 32-bit? If you're using 32-bit ruby on a
64-bit Windows 2008 R2 to edit
C:\Windows\System32\inetsrv\config\applicationHost.config,
Windows may be redirecting you to %windir%\syswow64\inetsrv
instead: http://forums.iis.net/p/1150832/1875622.aspx



Yeah, I'm using a Windows 7 32 bits box, and it's works fine...
in the other hand, I've testing on Windows 2008 R2 64 bits
server, I checked on the path tha you said, and your right, the
file is changed on

[Puppet Users] Puppet windows File permissions

2012-02-29 Thread mparrad
Hi Guys, I'm recently start working with puppet and mostly puppet for 
windows, On linux works perfect, but on windows works fine!, but I got a 
issue working on c:\windows\system32\inetsrv\config folder, I need modify 
the file applicationHost.config using puppet, to keep centralized the 
config for IIS, but when I run the puppet agent for windows the behavior 
it's real weird, The execution finish without errors, also said the file 
was updated, or created, but when I take a look to the file, it's remain 
without changes.

I'm working with puppet master 2.7.1 on CentOS 5.7 server, and puppet for 
windows 2.7.1 on Windows 2008 R2 server... 

I tried changing the permissions to the folder, I put read/write 
permission, I put Full control, I take ownership, but nothing, when I run 
the puppet agent I got the next:

On puppet master i wrote this init.pp for a module called iisconfig:

class iisconfig()
{
file { 'C:\Windows\System32\drivers\etc\hosts':
ensure = present,
content = template(/etc/puppet/modules/iisconfig/files/hosts),
}

file { 'C:\Windows\System32\inetsrv\config\applicationHost.config':
ensure = 'present',
content = 
template('/etc/puppet/modules/iisconfig/files/applicationHost.config'),
}

file { c:/temp/test.txt:
ensure = 'file',
mode = '660',
owner = 'Administrator',
group = 'Administrators',
content = 
template('/etc/puppet/modules/iisconfig/files/applicationHost.config'),
}
}

This is the execution
C:\temppuppet agent --test
notice: Ignoring --listen on onetime run
info: Retrieving plugin
info: Caching catalog for test01.office.com
info: Applying configuration version '1330497348'
notice: 
/Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]/content:
info: FileBucket adding {md5}f6b9e9fce03e4bbd9952814d55353857
info: /Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]: 
Filebucketed C:/Windows/System32/drivers/etc/hosts to puppet sum 
f6b9e9fce03e4bbd9952814d55353857
notice: 
/Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]/content: 
content changed '{md5}f6b9e9fce03e4bbd9952814d55353 to 
'{md5}32aca7ae45f022642e2f5b0156dcb3ca'
notice: /Stage[main]/Iisconfig/File[c:/temp/test.txt]/content:
info: FileBucket adding {md5}b3589a284c00ce9a67dd42ccaf15e46d
info: /Stage[main]/Iisconfig/File[c:/temp/test.txt]: Filebucketed 
c:/temp/test.txt to puppet with sum b3589a284c00ce9a67dd42ccaf15e46d
notice: /Stage[main]/Iisconfig/File[c:/temp/test.txt]/content: content 
changed '{md5}b3589a284c00ce9a67dd42ccaf15e46d' to 
'{md5}881bfbf113937635f5c35241ed2'
notice: Finished catalog run in 8.25 seconds
notice: 
/File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content:


The first file and the last one works fine, but the file I need to modify 
didn't works, but also didn't show any error message or something

Could you please give me any directions? or tell me What I doing wrong?

Thanks..

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ZUxK5U-yWZYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet windows File permissions

2012-02-29 Thread Josh Cooper
Hi Marco,

On Wed, Feb 29, 2012 at 5:46 AM, mparrad marco.parr...@gmail.com wrote:

 Hi Guys, I'm recently start working with puppet and mostly puppet for
 windows, On linux works perfect, but on windows works fine!, but I got a
 issue working on c:\windows\system32\inetsrv\config folder, I need modify
 the file applicationHost.config using puppet, to keep centralized the
 config for IIS, but when I run the puppet agent for windows the behavior
 it's real weird, The execution finish without errors, also said the file
 was updated, or created, but when I take a look to the file, it's remain
 without changes.

 I'm working with puppet master 2.7.1 on CentOS 5.7 server, and puppet for
 windows 2.7.1 on Windows 2008 R2 server...


Are you running puppet agent from cmd.exe? or as a service? If the former,
can you run: whoami /groups

I tried changing the permissions to the folder, I put read/write
 permission, I put Full control, I take ownership, but nothing, when I run
 the puppet agent I got the next:

 On puppet master i wrote this init.pp for a module called iisconfig:

 class iisconfig()
 {
 file { 'C:\Windows\System32\drivers\etc\hosts':
 ensure = present,
 content = template(/etc/puppet/modules/iisconfig/files/hosts),
 }

 file { 'C:\Windows\System32\inetsrv\config\applicationHost.config':
 ensure = 'present',
 content =
 template('/etc/puppet/modules/iisconfig/files/applicationHost.config'),
 }


Can you try changing content = 'some literal string'? I'm curious if this
is a templating issue.


 file { c:/temp/test.txt:
 ensure = 'file',
 mode = '660',
 owner = 'Administrator',
 group = 'Administrators',
 content =
 template('/etc/puppet/modules/iisconfig/files/applicationHost.config'),
 }
 }

 This is the execution
 C:\temppuppet agent --test
 notice: Ignoring --listen on onetime run
 info: Retrieving plugin
 info: Caching catalog for test01.office.com
 info: Applying configuration version '1330497348'
 notice:
 /Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]/content:
 info: FileBucket adding {md5}f6b9e9fce03e4bbd9952814d55353857
 info: /Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]:
 Filebucketed C:/Windows/System32/drivers/etc/hosts to puppet sum
 f6b9e9fce03e4bbd9952814d55353857
 notice:
 /Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]/content:
 content changed '{md5}f6b9e9fce03e4bbd9952814d55353 to
 '{md5}32aca7ae45f022642e2f5b0156dcb3ca'
 notice: /Stage[main]/Iisconfig/File[c:/temp/test.txt]/content:
 info: FileBucket adding {md5}b3589a284c00ce9a67dd42ccaf15e46d
 info: /Stage[main]/Iisconfig/File[c:/temp/test.txt]: Filebucketed
 c:/temp/test.txt to puppet with sum b3589a284c00ce9a67dd42ccaf15e46d
 notice: /Stage[main]/Iisconfig/File[c:/temp/test.txt]/content: content
 changed '{md5}b3589a284c00ce9a67dd42ccaf15e46d' to
 '{md5}881bfbf113937635f5c35241ed2'
 notice: Finished catalog run in 8.25 seconds
 notice:
 /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content:


 The first file and the last one works fine, but the file I need to modify
 didn't works, but also didn't show any error message or something


Yeah, that's no good. Hopefully the above will shed some light on what's
going on.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet windows File permissions

2012-02-29 Thread Marco Parra D.

Hi Josh,
I'm runnig from cmd.exe, I'm using Administrator account on the windows 
box, this is the output for the command that you asked:


C:\Users\Administratorwhoami /groups

GROUP INFORMATION
-

Group Name   Type SID  
Attributes
   
===
Everyone Well-known group S-1-1-0  
Mandatory group, Enabled by default, Enabled group
BUILTIN\Administrators   AliasS-1-5-32-544 
Mandatory group, Enabled by default, Enabled group, Group owner
BUILTIN\UsersAliasS-1-5-32-545 
Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\INTERACTIVE Well-known group S-1-5-4  
Mandatory group, Enabled by default, Enabled group
CONSOLE LOGONWell-known group S-1-2-1  
Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users Well-known group S-1-5-11 
Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization   Well-known group S-1-5-15 
Mandatory group, Enabled by default, Enabled group
LOCALWell-known group S-1-2-0  
Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NTLM Authentication Well-known group S-1-5-64-10  
Mandatory group, Enabled by default, Enabled group
Mandatory Label\High Mandatory Level LabelS-1-16-12288 
Mandatory group, Enabled by default, Enabled group


C:\Users\Administrator


I found a page that talks about security on windows 2008, and I tried 
changing a configuration for the IIS, On the Ineternet Information 
Services Manager, under Management, Configuration Editor, selecting 
Providers, click on Edit Items, selecting 
DataProtectionConfigurationProvider, I change useMachineProtection, and 
save the change.


On Windows 7 the scripts run perfect, but on Windows 2008 R2 still 
didn't work, still the execution said that the file was modified, but 
nothing happens on the file. no errors it's showed


Regards

On 29-02-2012 13:43, Josh Cooper wrote:

Hi Marco,

On Wed, Feb 29, 2012 at 5:46 AM, mparrad marco.parr...@gmail.com 
mailto:marco.parr...@gmail.com wrote:


Hi Guys, I'm recently start working with puppet and mostly puppet
for windows, On linux works perfect, but on windows works fine!,
but I got a issue working on c:\windows\system32\inetsrv\config
folder, I need modify the file applicationHost.config using
puppet, to keep centralized the config for IIS, but when I run the
puppet agent for windows the behavior it's real weird, The
execution finish without errors, also said the file was updated,
or created, but when I take a look to the file, it's remain
without changes.

I'm working with puppet master 2.7.1 on CentOS 5.7 server, and
puppet for windows 2.7.1 on Windows 2008 R2 server...


Are you running puppet agent from cmd.exe? or as a service? If the 
former, can you run: whoami /groups


I tried changing the permissions to the folder, I put read/write
permission, I put Full control, I take ownership, but nothing,
when I run the puppet agent I got the next:

On puppet master i wrote this init.pp for a module called iisconfig:

class iisconfig()
{
file { 'C:\Windows\System32\drivers\etc\hosts':
ensure = present,
content =
template(/etc/puppet/modules/iisconfig/files/hosts),
}

file { 'C:\Windows\System32\inetsrv\config\applicationHost.config':
ensure = 'present',
content =
template('/etc/puppet/modules/iisconfig/files/applicationHost.config'),
}


Can you try changing content = 'some literal string'? I'm curious if 
this is a templating issue.


file { c:/temp/test.txt:
ensure = 'file',
mode = '660',
owner = 'Administrator',
group = 'Administrators',
content =
template('/etc/puppet/modules/iisconfig/files/applicationHost.config'),
}
}

This is the execution
C:\temppuppet agent --test
notice: Ignoring --listen on onetime run
info: Retrieving plugin
info: Caching catalog for test01.office.com http://test01.office.com
info: Applying configuration version '1330497348'
notice:
/Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]/content:
info: FileBucket adding {md5}f6b9e9fce03e4bbd9952814d55353857
info:
/Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]: 
Filebucketed
C:/Windows/System32/drivers/etc/hosts to puppet sum
f6b9e9fce03e4bbd9952814d55353857
notice:
/Stage[main]/Iisconfig/File[C:\Windows\System32\drivers\etc\hosts]/content:
content changed '{md5}f6b9e9fce03e4bbd9952814d55353 to

Re: [Puppet Users] Puppet windows File permissions

2012-02-29 Thread Josh Cooper
Hi Marco,

On Wed, Feb 29, 2012 at 10:52 AM, Marco Parra D. marco.parr...@gmail.comwrote:

  Hi Josh,
 I'm runnig from cmd.exe, I'm using Administrator account on the windows
 box, this is the output for the command that you asked:

 C:\Users\Administratorwhoami /groups

 GROUP INFORMATION
 -

 Group Name   Type SID
 Attributes
   
 ===
 Everyone Well-known group S-1-1-0
 Mandatory group, Enabled by default, Enabled group
 BUILTIN\Administrators   AliasS-1-5-32-544
 Mandatory group, Enabled by default, Enabled group, Group owner


This shows that you are running elevated, which is good.


 BUILTIN\UsersAliasS-1-5-32-545
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\INTERACTIVE Well-known group S-1-5-4
 Mandatory group, Enabled by default, Enabled group
 CONSOLE LOGONWell-known group S-1-2-1
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\Authenticated Users Well-known group S-1-5-11
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\This Organization   Well-known group S-1-5-15
 Mandatory group, Enabled by default, Enabled group
 LOCALWell-known group S-1-2-0
 Mandatory group, Enabled by default, Enabled group
 NT AUTHORITY\NTLM Authentication Well-known group S-1-5-64-10
 Mandatory group, Enabled by default, Enabled group
 Mandatory Label\High Mandatory Level LabelS-1-16-12288
 Mandatory group, Enabled by default, Enabled group

 C:\Users\Administrator


 I found a page that talks about security on windows 2008, and I tried
 changing a configuration for the IIS, On the Ineternet Information Services
 Manager, under Management, Configuration Editor, selecting Providers, click
 on Edit Items, selecting DataProtectionConfigurationProvider, I change
 useMachineProtection, and save the change.

 On Windows 7 the scripts run perfect, but on Windows 2008 R2 still didn't
 work, still the execution said that the file was modified, but nothing
 happens on the file. no errors it's showed


Is your Windows 7 box 32-bit? If you're using 32-bit ruby on a 64-bit
Windows 2008 R2 to edit
C:\Windows\System32\inetsrv\config\applicationHost.config,
Windows may be redirecting you to %windir%\syswow64\inetsrv instead:
http://forums.iis.net/p/1150832/1875622.aspx

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet Windows: Spaces in file paths a problem?

2011-11-28 Thread Mohamed Lrhazi
I thought I read somewhere in Puppet docs/wiki... that it is
recommended to avoid spaces in file paths, or some similar verbiage,
but now I cant find it.

Does Puppet have any known issues with spaces in file paths? It would
of course scare Windows admins away... So I hope I am wrong in
thinking I read that.

Thanks a lot,
Mohamed.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet Windows: scheduled_task : TypeError

2011-11-23 Thread Mohamed Lrhazi
am trying this:

scheduled_task { 'Puppet Run':
ensure= present,
enabled   = true,
command   = 'C:\\ruby187\\bin\\puppet.bat',
arguments = 'agent --verbose --logdest C:\\Temp\puppet.log',
trigger   = {
schedule   = daily,
#every  = 2 # Defaults to 1
#start_date = '2011-08-31', # Defaults to 'today'
start_time = '16:00',  # Must be specified
}
}

And getting this error:

err: /Stage[main]/Gu_splunk/Scheduled_task[Puppet Run]/ensure: change
from absent to present failed: Could not set 'present on ensure:
TypeError at /etc/puppet/
environments/windows/modules/gu_splunk/manifests/init.pp:84

Another question I have is how do I schedule for every 30 minutes? or
every one hour?

Thanks a lot,
Mohamed.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2011-11-23 Thread Jacob Helwig
On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
 am trying this:
 
 scheduled_task { 'Puppet Run':
 ensure= present,
 enabled   = true,
 command   = 'C:\\ruby187\\bin\\puppet.bat',
 arguments = 'agent --verbose --logdest C:\\Temp\puppet.log',
 trigger   = {
 schedule   = daily,
 #every  = 2 # Defaults to 1
 #start_date = '2011-08-31', # Defaults to 'today'
 start_time = '16:00',  # Must be specified
 }
 }
 
 And getting this error:
 
 err: /Stage[main]/Gu_splunk/Scheduled_task[Puppet Run]/ensure: change
 from absent to present failed: Could not set 'present on ensure:
 TypeError at /etc/puppet/
 environments/windows/modules/gu_splunk/manifests/init.pp:84
 
 Another question I have is how do I schedule for every 30 minutes? or
 every one hour?
 
 Thanks a lot,
 Mohamed.
 

Since the scheduled_task type uses the v1 Windows API, being able to set
repetitions at resolutions more fine grained than the daily level isn't
possible, without creating multiple triggers to create the within a day
repetition manually.

If you know of a good Ruby interface to the newer Task Scheduler APIs,
which support this, then it would be possible for someone to write
another provider that supported this.

-- 
Jacob Helwig
http://about.me/jhelwig



signature.asc
Description: OpenPGP digital signature


Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2011-11-23 Thread Mohamed Lrhazi
Thanks JacobDid that answer my TypeError  as well?

Mohamed.

On Wed, Nov 23, 2011 at 5:28 PM, Jacob Helwig ja...@puppetlabs.com wrote:
 On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
 am trying this:

     scheduled_task { 'Puppet Run':
         ensure    = present,
         enabled   = true,
         command   = 'C:\\ruby187\\bin\\puppet.bat',
         arguments = 'agent --verbose --logdest C:\\Temp\puppet.log',
         trigger   = {
             schedule   = daily,
             #every      = 2             # Defaults to 1
             #start_date = '2011-08-31', # Defaults to 'today'
             start_time = '16:00',      # Must be specified
         }
     }

 And getting this error:

 err: /Stage[main]/Gu_splunk/Scheduled_task[Puppet Run]/ensure: change
 from absent to present failed: Could not set 'present on ensure:
 TypeError at /etc/puppet/
 environments/windows/modules/gu_splunk/manifests/init.pp:84

 Another question I have is how do I schedule for every 30 minutes? or
 every one hour?

 Thanks a lot,
 Mohamed.


 Since the scheduled_task type uses the v1 Windows API, being able to set
 repetitions at resolutions more fine grained than the daily level isn't
 possible, without creating multiple triggers to create the within a day
 repetition manually.

 If you know of a good Ruby interface to the newer Task Scheduler APIs,
 which support this, then it would be possible for someone to write
 another provider that supported this.

 --
 Jacob Helwig
 http://about.me/jhelwig



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: scheduled_task : TypeError

2011-11-23 Thread Jacob Helwig
On 2011-11-23 15:53 , Mohamed Lrhazi wrote:
 Thanks JacobDid that answer my TypeError  as well?

No, a stack trace would help for that.

-- 
Jacob Helwig
http://about.me/jhelwig

 
 Mohamed.
 
 On Wed, Nov 23, 2011 at 5:28 PM, Jacob Helwig ja...@puppetlabs.com wrote:
 On 2011-11-23 13:02 , Mohamed Lrhazi wrote:
 am trying this:

 scheduled_task { 'Puppet Run':
 ensure= present,
 enabled   = true,
 command   = 'C:\\ruby187\\bin\\puppet.bat',
 arguments = 'agent --verbose --logdest C:\\Temp\puppet.log',
 trigger   = {
 schedule   = daily,
 #every  = 2 # Defaults to 1
 #start_date = '2011-08-31', # Defaults to 'today'
 start_time = '16:00',  # Must be specified
 }
 }

 And getting this error:

 err: /Stage[main]/Gu_splunk/Scheduled_task[Puppet Run]/ensure: change
 from absent to present failed: Could not set 'present on ensure:
 TypeError at /etc/puppet/
 environments/windows/modules/gu_splunk/manifests/init.pp:84




signature.asc
Description: OpenPGP digital signature


[Puppet Users] Puppet Windows: msi packages removal

2011-11-22 Thread Mohamed Lrhazi
I noticed that is if I uninstall an MSI that was installed by Puppet,
Puppet does not notice.

Looking at the source I see it might be checking for a state file to
know whether a package is installed or not:
C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml

So one has to rememebr to delete that too Is this design not a problem?

Thanks,
Mohamed.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: msi packages removal

2011-11-22 Thread Jacob Helwig
On 2011-11-22 07:10 , Mohamed Lrhazi wrote:
 I noticed that is if I uninstall an MSI that was installed by Puppet,
 Puppet does not notice.
 
 Looking at the source I see it might be checking for a state file to
 know whether a package is installed or not:
 C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml
 
 So one has to rememebr to delete that too Is this design not a problem?
 
 Thanks,
 Mohamed.
 

It's certainly a limitation, and not ideal.  This is currently how the
appdmg provider behaves on OS X, so it's not entirely unexpected
behavior (for people that are used to how Puppet works on systems
without centralized package management systems).

An alternative would be to create a parameter along the lines of exec's
'creates' where you would need to specify a file that would only exist
iff the 'package' had been successfully installed.

When we were investigating things initially I believe that the reason we
had to rule out things like checking the registry was that there were
too many ways for an installer to misbehave that would break any of the
detection that we would need to do.

I don't know whether or not a 'creates' parameter would end up being
more problematic or not, but I certainly welcome discussion from people
who are actually doing real systems management using Puppet on Windows.

-- 
Jacob Helwig
http://about.me/jhelwig



signature.asc
Description: OpenPGP digital signature


Re: [Puppet Users] Puppet Windows: msi packages removal

2011-11-22 Thread Mohamed Lrhazi
I think the documentation about package providers should include
something about this...
Right now a provider has these features:

holdableinstall_options installable purgeable   uninstallable   
upgradeable versionable

Maybe something like: detectable

Meaning the provider can effectively detect whether the package is
installed or not, as opposed to can remember if it did install it or
not.

Thanks a lot,
Mohamed.


On Tue, Nov 22, 2011 at 2:25 PM, Jacob Helwig ja...@puppetlabs.com wrote:
 On 2011-11-22 07:10 , Mohamed Lrhazi wrote:
 I noticed that is if I uninstall an MSI that was installed by Puppet,
 Puppet does not notice.

 Looking at the source I see it might be checking for a state file to
 know whether a package is installed or not:
 C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml

 So one has to rememebr to delete that too Is this design not a problem?

 Thanks,
 Mohamed.


 It's certainly a limitation, and not ideal.  This is currently how the
 appdmg provider behaves on OS X, so it's not entirely unexpected
 behavior (for people that are used to how Puppet works on systems
 without centralized package management systems).

 An alternative would be to create a parameter along the lines of exec's
 'creates' where you would need to specify a file that would only exist
 iff the 'package' had been successfully installed.

 When we were investigating things initially I believe that the reason we
 had to rule out things like checking the registry was that there were
 too many ways for an installer to misbehave that would break any of the
 detection that we would need to do.

 I don't know whether or not a 'creates' parameter would end up being
 more problematic or not, but I certainly welcome discussion from people
 who are actually doing real systems management using Puppet on Windows.

 --
 Jacob Helwig
 http://about.me/jhelwig



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: msi packages removal

2011-11-22 Thread Mohamed Lrhazi
and then, indeed, maybe the provider could take a helper hint about
how to go about detecting the presence of a package, kind of like
Service takes hints about how to detect a service is running or not...

Then maybe: detect_with_file = C:\\Program Files\\Splunk\\bin\\splunk.exe

Thanks,
Mohamed.

On Tue, Nov 22, 2011 at 7:32 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 I think the documentation about package providers should include
 something about this...
 Right now a provider has these features:

 holdable        install_options installable     purgeable       uninstallable 
   upgradeable     versionable

 Maybe something like: detectable

 Meaning the provider can effectively detect whether the package is
 installed or not, as opposed to can remember if it did install it or
 not.

 Thanks a lot,
 Mohamed.


 On Tue, Nov 22, 2011 at 2:25 PM, Jacob Helwig ja...@puppetlabs.com wrote:
 On 2011-11-22 07:10 , Mohamed Lrhazi wrote:
 I noticed that is if I uninstall an MSI that was installed by Puppet,
 Puppet does not notice.

 Looking at the source I see it might be checking for a state file to
 know whether a package is installed or not:
 C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml

 So one has to rememebr to delete that too Is this design not a problem?

 Thanks,
 Mohamed.


 It's certainly a limitation, and not ideal.  This is currently how the
 appdmg provider behaves on OS X, so it's not entirely unexpected
 behavior (for people that are used to how Puppet works on systems
 without centralized package management systems).

 An alternative would be to create a parameter along the lines of exec's
 'creates' where you would need to specify a file that would only exist
 iff the 'package' had been successfully installed.

 When we were investigating things initially I believe that the reason we
 had to rule out things like checking the registry was that there were
 too many ways for an installer to misbehave that would break any of the
 detection that we would need to do.

 I don't know whether or not a 'creates' parameter would end up being
 more problematic or not, but I certainly welcome discussion from people
 who are actually doing real systems management using Puppet on Windows.

 --
 Jacob Helwig
 http://about.me/jhelwig




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: Should I use dedicated environment ?

2011-11-21 Thread Evan Hisey
On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 I stated tweaking my puppet modules and site.pp to support the new
 OS.. things like:

 if ( $operatingsystem == windows ) {
    Exec { path =
 C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin
 }
 } else {

 And now am thinking, would be better to just have an independent
 environment for all my Windows clients? what would be the draw backs
 of that?

 Thanks a lot,
 Mohamed.


I use multiple environments for separating development and production
systems. The only really draw back I encounter is the need to make the
same change twice for certain things that are shared between both
environments. I ma sure there is wa way around that, but it has not
become enough of an issue to make me find it.

evan

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: Should I use dedicated environment ?

2011-11-21 Thread Aaron Grewell
Another way to handle this is to have class-level logic:
class something {
 if ( $operatingsystem == windows ) { include something::windows }
 if ( $operatingsystem == redhat ) { include something::redhat }
}

Then put your resources in something::windows, something::redhat, etc.
 You may duplicate some code this way, but when the OS'es are very
different you'll ultimately save coding time and increase readability
by avoiding resource-level logic.

On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey ehi...@gmail.com wrote:
 On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 I stated tweaking my puppet modules and site.pp to support the new
 OS.. things like:

 if ( $operatingsystem == windows ) {
    Exec { path =
 C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin
 }
 } else {

 And now am thinking, would be better to just have an independent
 environment for all my Windows clients? what would be the draw backs
 of that?

 Thanks a lot,
 Mohamed.


 I use multiple environments for separating development and production
 systems. The only really draw back I encounter is the need to make the
 same change twice for certain things that are shared between both
 environments. I ma sure there is wa way around that, but it has not
 become enough of an issue to make me find it.

 evan

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: Should I use dedicated environment ?

2011-11-21 Thread Mohamed Lrhazi
Thanks guys. We do use environments already, and we also do use this
pattern for separating operating system specific details to sub
classes... but we only had to deal with Red Hat/CentOS/Oracle
Enterprise Linux, and Solaris

I guess I was thinking that windows is so different that it should
be totally separate :)

Thanks.
Mohamed.

On Mon, Nov 21, 2011 at 1:26 PM, Aaron Grewell aaron.grew...@gmail.com wrote:
 Another way to handle this is to have class-level logic:
 class something {
     if ( $operatingsystem == windows ) { include something::windows }
     if ( $operatingsystem == redhat ) { include something::redhat }
 }

 Then put your resources in something::windows, something::redhat, etc.
  You may duplicate some code this way, but when the OS'es are very
 different you'll ultimately save coding time and increase readability
 by avoiding resource-level logic.

 On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey ehi...@gmail.com wrote:
 On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 I stated tweaking my puppet modules and site.pp to support the new
 OS.. things like:

 if ( $operatingsystem == windows ) {
    Exec { path =
 C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin
 }
 } else {

 And now am thinking, would be better to just have an independent
 environment for all my Windows clients? what would be the draw backs
 of that?

 Thanks a lot,
 Mohamed.


 I use multiple environments for separating development and production
 systems. The only really draw back I encounter is the need to make the
 same change twice for certain things that are shared between both
 environments. I ma sure there is wa way around that, but it has not
 become enough of an issue to make me find it.

 evan

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: Should I use dedicated environment ?

2011-11-21 Thread Aaron Grewell
I wouldn't expect a lot of class overlap, so it might be simpler to do
it that way, but it also means a completely different directory tree.
It's going to come down to the personal taste of the admins I expect.

On Mon, Nov 21, 2011 at 11:31 AM, Mohamed Lrhazi lrh...@gmail.com wrote:
 Thanks guys. We do use environments already, and we also do use this
 pattern for separating operating system specific details to sub
 classes... but we only had to deal with Red Hat/CentOS/Oracle
 Enterprise Linux, and Solaris

 I guess I was thinking that windows is so different that it should
 be totally separate :)

 Thanks.
 Mohamed.

 On Mon, Nov 21, 2011 at 1:26 PM, Aaron Grewell aaron.grew...@gmail.com 
 wrote:
 Another way to handle this is to have class-level logic:
 class something {
     if ( $operatingsystem == windows ) { include something::windows }
     if ( $operatingsystem == redhat ) { include something::redhat }
 }

 Then put your resources in something::windows, something::redhat, etc.
  You may duplicate some code this way, but when the OS'es are very
 different you'll ultimately save coding time and increase readability
 by avoiding resource-level logic.

 On Mon, Nov 21, 2011 at 10:11 AM, Evan Hisey ehi...@gmail.com wrote:
 On Sun, Nov 20, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 I stated tweaking my puppet modules and site.pp to support the new
 OS.. things like:

 if ( $operatingsystem == windows ) {
    Exec { path =
 C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Ruby187\\bin
 }
 } else {

 And now am thinking, would be better to just have an independent
 environment for all my Windows clients? what would be the draw backs
 of that?

 Thanks a lot,
 Mohamed.


 I use multiple environments for separating development and production
 systems. The only really draw back I encounter is the need to make the
 same change twice for certain things that are shared between both
 environments. I ma sure there is wa way around that, but it has not
 become enough of an issue to make me find it.

 evan

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: test if non-MSI package already installed

2011-11-18 Thread Andrew Ring

Thank you.


On 11/11/2011 10:30 AM, Josh Cooper wrote:

Hi Andrew,

On Fri, Nov 11, 2011 at 9:19 AM, ar...@berkeley.edu
mailto:ar...@berkeley.edu wrote:

Hello Puppet Cohorts,

I wish to install programs on Windows that do not use the MSI installer.

After finding a guide on-line for silencing most installers
(http://unattended.sourceforge.net/installers.php) I feel confident
I can
write a short script for Puppet to exec on my hosts to silently
install
most of what I need.

What I can't decide on a best way to test if the software has already
been installed.  I am likely off in the weeds and could use some help
getting back.

Here are what I think my choices are, I make no claim to their sanity.
  0.) I think using the package provider in puppet will not work
if the
program installed did not use the MSI installer.(?)


Correct, there is only an 'msi' package provider.

  1.) Check for existence of a file known to be installed from the
relevant
installer.  If the file is found, the script exits.
  2.) Some method to check the registry at

SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
for the existence of the program.
  3.) Run Puppet Agent less often on the client so it is not such a big
deal.


If the packages are well-behaving they should follow these guidelines
during install/uninstall[1]. In particular, they should add the
appropriate registry entries under:

   HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

Josh

[1] http://msdn.microsoft.com/en-us/library/ms954376.aspx

--
Josh Cooper
Developer, Puppet Labs

--
You received this message because you are subscribed to the Google
Groups Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.


--
===
Andrew Ring
System Administrator
Kuriyan Laboratory
http://jkweb.qb3.berkeley.edu/
Doudna Laboratory
http://rna.berkeley.edu/
University of California, Berkeley
Office:
542 Stanley Hall
Shipping:
176 Stanley Hall, QB3
Berkeley, CA 94720-3220
tel: (510) 643 0166
fax: (510) 643 2352


--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet Windows: test if non-MSI package already installed

2011-11-11 Thread aring
Hello Puppet Cohorts,

I wish to install programs on Windows that do not use the MSI installer.

After finding a guide on-line for silencing most installers
(http://unattended.sourceforge.net/installers.php) I feel confident I can
write a short script for Puppet to exec on my hosts to silently install
most of what I need.

What I can't decide on a best way to test if the software has already
been installed.  I am likely off in the weeds and could use some help
getting back.

Here are what I think my choices are, I make no claim to their sanity.
 0.) I think using the package provider in puppet will not work if the
program installed did not use the MSI installer.(?)
 1.) Check for existence of a file known to be installed from the relevant
installer.  If the file is found, the script exits.
 2.) Some method to check the registry at
SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
for the existence of the program.
 3.) Run Puppet Agent less often on the client so it is not such a big
deal.


Thank you,
Andrew




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows: test if non-MSI package already installed

2011-11-11 Thread Josh Cooper
Hi Andrew,

On Fri, Nov 11, 2011 at 9:19 AM, ar...@berkeley.edu wrote:

 Hello Puppet Cohorts,

 I wish to install programs on Windows that do not use the MSI installer.

 After finding a guide on-line for silencing most installers
 (http://unattended.sourceforge.net/installers.php) I feel confident I can
 write a short script for Puppet to exec on my hosts to silently install
 most of what I need.

 What I can't decide on a best way to test if the software has already
 been installed.  I am likely off in the weeds and could use some help
 getting back.

 Here are what I think my choices are, I make no claim to their sanity.
  0.) I think using the package provider in puppet will not work if the
 program installed did not use the MSI installer.(?)


Correct, there is only an 'msi' package provider.


  1.) Check for existence of a file known to be installed from the relevant
 installer.  If the file is found, the script exits.
  2.) Some method to check the registry at

 SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
 for the existence of the program.
  3.) Run Puppet Agent less often on the client so it is not such a big
 deal.


If the packages are well-behaving they should follow these guidelines
during install/uninstall[1]. In particular, they should add the appropriate
registry entries under:

  HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

Josh

[1] http://msdn.microsoft.com/en-us/library/ms954376.aspx

-- 
Josh Cooper
Developer, Puppet Labs

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet Windows support

2011-08-10 Thread Maven User
Hi all -

I'm pretty new to puppet and have started diving into the deep end -
very excited to ditch crappy scripts for the manifest concept!

I have a couple of questions around windows support.

I followed the windows support wiki entry to the bitter end and then
realized there's no agent support.  If I understand correctly, agents
are installed on the machines you want to manage and the master server
pushes out details to that agent about how that agent should configure
that server.

If there's currently no agent support, is there any point?  The
Platforms we support page for puppet claims Windows support -
leaving me very confused.

I also have found this ticket:

http://projects.puppetlabs.com/issues/8268

That also suggests there's no agent support.

PS - love what I'm seeing but it'd be HUGE if Windows was treated as a
first class citizen.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows support

2011-08-10 Thread Craig White
I think if you look through the mail list for the past 6 weeks, you'll see 
several postings about the progress that they have made towards a Windows 
client. I gather that this is on the high priority agenda.

Craig

On Aug 10, 2011, at 12:37 PM, Maven User wrote:

 Hi all -
 
 I'm pretty new to puppet and have started diving into the deep end -
 very excited to ditch crappy scripts for the manifest concept!
 
 I have a couple of questions around windows support.
 
 I followed the windows support wiki entry to the bitter end and then
 realized there's no agent support.  If I understand correctly, agents
 are installed on the machines you want to manage and the master server
 pushes out details to that agent about how that agent should configure
 that server.
 
 If there's currently no agent support, is there any point?  The
 Platforms we support page for puppet claims Windows support -
 leaving me very confused.
 
 I also have found this ticket:
 
 http://projects.puppetlabs.com/issues/8268
 
 That also suggests there's no agent support.
 
 PS - love what I'm seeing but it'd be HUGE if Windows was treated as a
 first class citizen.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 

-- 
Craig White ~~  craig.wh...@ttiltd.com
1.800.869.6908 ~~~ www.ttiassessments.com 

Need help communicating between generations at work to achieve your desired 
success? Let us help!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Puppet Windows support

2011-08-10 Thread Josh Cooper
Yeah, Windows users!

The 2.6 release introduced preliminary support for Windows (limited to just
managing files).

  http://www.puppetlabs.com/2dot6/

The ticket you found provides a good view of the work we have completed and
are targeting for the release.

  http://projects.puppetlabs.com/issues/8268

In particular, we will be adding providers for file, exec, user, group,
service, etc types. Some of these providers have already been implemented,
others are actively being worked on.

If you are interested in trying it out, you can download the source for
facter and puppet from github (ignore the step about installing puppet and
facter as gems as described in the wiki). Lets us know if you run into any
issues.

Josh
-- 
Join us for PuppetConf http://bit.ly/puppetconfsig, September 22nd and
23rd in Portland, OR.

On Wed, Aug 10, 2011 at 2:15 PM, Craig White craig.wh...@ttiltd.com wrote:

 I think if you look through the mail list for the past 6 weeks, you'll see
 several postings about the progress that they have made towards a Windows
 client. I gather that this is on the high priority agenda.

 Craig

 On Aug 10, 2011, at 12:37 PM, Maven User wrote:

  Hi all -
 
  I'm pretty new to puppet and have started diving into the deep end -
  very excited to ditch crappy scripts for the manifest concept!
 
  I have a couple of questions around windows support.
 
  I followed the windows support wiki entry to the bitter end and then
  realized there's no agent support.  If I understand correctly, agents
  are installed on the machines you want to manage and the master server
  pushes out details to that agent about how that agent should configure
  that server.
 
  If there's currently no agent support, is there any point?  The
  Platforms we support page for puppet claims Windows support -
  leaving me very confused.
 
  I also have found this ticket:
 
  http://projects.puppetlabs.com/issues/8268
 
  That also suggests there's no agent support.
 
  PS - love what I'm seeing but it'd be HUGE if Windows was treated as a
  first class citizen.
 
  --
  You received this message because you are subscribed to the Google Groups
 Puppet Users group.
  To post to this group, send email to puppet-users@googlegroups.com.
  To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.
 

 --
 Craig White ~~  craig.wh...@ttiltd.com
 1.800.869.6908 ~~~ www.ttiassessments.com

 Need help communicating between generations at work to achieve your desired
 success? Let us help!

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.