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 UT
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 abo
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
comm
On Sat, Aug 29, 2015 at 9:22 AM, Rob Reynolds 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
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 c
On Thu, Aug 27, 2015 at 9:26 AM, 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 variable
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
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 famil
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,
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
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 return
11 matches
Mail list logo