[Puppet Users] Re: Template with array and nested hash

2013-04-16 Thread Daniele Sluijters
Hi,

So you have an array containing one or multiple hashes which in turn 
contains an array of rules which are hashes by themselves.

In templates you use erb, so embedded ruby. Therefor you can use just about 
any construct from the Ruby language, including how you can do things with 
Arrays and Hashes.

So, we start:

<% @squid_acls.each do |acl| %>
  so now we have a loop for the outer part of the array

  # <%= acl['comment'] =%>
  here we just outputted what comment contained

  <% acl['rules']. each do |rule| %>
  now we're accessing the contents of the rules key. Since we know it's an 
array you can loop over it 

   acl <%= rule['aclname'] =%> <%= rule['acltype'] =%> <%= rule['arg'] =%>
  <% end %>
<% end %>

This probably won't work out of the box like this but it should give you an 
idea on how to get started.

-- 
Daniele Sluijters


On Tuesday, 16 April 2013 06:26:25 UTC+2, Matthew Ceroni wrote:
>
> I have the following 
>
> http://pastebin.com/dphfbV7z
>
> As outlined in the above I want to turn the data structure I have into 
> what is outlined in a template. Not sure how to go about accessing and 
> looping over the multiple levels in the data structure.
>
> Thanks
>


On Tuesday, 16 April 2013 06:26:25 UTC+2, Matthew Ceroni wrote:
>
> I have the following 
>
> http://pastebin.com/dphfbV7z
>
> As outlined in the above I want to turn the data structure I have into 
> what is outlined in a template. Not sure how to go about accessing and 
> looping over the multiple levels in the data structure.
>
> Thanks
>

-- 
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] Re: Module structure for case-specific configuration

2013-04-16 Thread Boyan Tabakov
Hi John,

Thanks for your reply!

On 15.4.2013 18:02, jcbollinger wrote:
> Single point of entry does not serve well and is not a particularly
> useful goal when the desired results are very divergent.  The single
> declaration then becomes magical, and therefore difficult to understand
> and maintain.

That makes sense.

> I think your specific case is even more distinguished than that,
> however: it sounds like you are inappropriately modeling web /site/
> components (i.e. content) as part of the web /server/.  I would pull the
> projects out as completely separate modules (and that could restore your
> single point of entry, on a per-module basis).  Yes, your project
> modules might need to declare some relationships, but that is in no way
> a function of which module contains each class.

It is not website related components, but indeed web-server - vhost
definitions, special apache configuration files (e.g. module
configuration overrides, etc). Besides, the apache was just an example,
I have other cases where similar setup is required. In any case, the
project-specific definitions are *only* for resources, directly related
to the module in question (in this case, apache).

> Note also that you should /not/ be using subclasses for any of what you
> described.  It's not clear whether you actually are doing so, despite
> your use of the term, but Puppet class inheritance is a very special-
> (and limited-)purpose tool that does not apply to any of the needs you
> described.  It looks like you may simply be putting some classes in
> others' namespaces, however, and that's an /entirely/ different thing.
> 

Pardon my wording. By subclasses, I just meant a class inside some
module (apache::projectX). No inheritance involved.

If single point of entry can be avoided, then what do you think about
the second part of my question? :

> The easy solution seems to be to forget about single point of entry and
> include from manifests both the apache and the apache::projectX classes
> with appropriate parameters. However, in order to ensure proper
> sequencing all the apache::projectX classes might need to contain some
> code like this:
> 
>   Class['apache::config'] ->
>   Class['apache::projectX'] ~>
>   Class['apache::service']
> 
> I don't like the idea of having this in all project-specific classes, as
> modification of the module structure might become more difficult - i.e.
> will need to change all the apache:projectX classes if I want to add,
> let's say, a apache::modules class that needs to load before the projectX. 

BR,
Boyan



signature.asc
Description: OpenPGP digital signature


[Puppet Users] Puppet / hiera call a parametrised class from hieras yaml file?

2013-04-16 Thread Brent Clark

Good day

Im using puppet 2.7.18 and hiera 1.1.0.

I would like to ask.

For some servers I manage I use the following to pull in 'custom classes'.
hiera_include('classes')

And it all works very well.

But Im now have a class that I now need to class via hiera, and pass 
arguments too (the argument, really is where the clients DKIM keys reside).


Can I have puppet / hiera call a parametrised class from hieras yaml file.

Thanks
Brent Clark

--
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] Re: testing static manifests

2013-04-16 Thread Bernardo Costa
The closest I could get until now is something like this link about using 
vagrant: 
http://blog.codecentric.de/en/2012/02/automated-virtual-test-environments-with-vagrant-and-puppet/

In one way or another, it looks like the real test has to be done in a 
(let's say linux) box without a specific tool. Does anyone have a better 
idea ?

Em quarta-feira, 10 de abril de 2013 09h19min35s UTC-3, Bernardo Costa 
escreveu:
>
> Hey Joe !
>
> I am kind of new on developing configs on puppet. I have already taken a 
> look at rspec-puppet. It looks fine but doesn't seems to be what I really 
> need. These two passages above tells me that rspec-puppet is related to 
> module testing. What it automates is a test like this: whether your module 
> can produce a valid configuration or not. My configuration is a bunch of 
> static classes. What I'd like to test is the result of this classes I have 
> built. I don't even know if this is possible or not but I suppose it is in 
> some way. How do people do this kind of test ? Would it be called 
> accpetance tests ? Is there a way to automate this ?
>
> See the links:
>
> on https://puppetlabs.com/blog/test-driven-development-with-puppet/
>
> "...It’s true that, if you have a manifest that simply contained a 
> collection of static resources, rspec-puppet doesn’t provide much 
> additional value. It shines when you start developing define resources, 
> parametrized classes, or any module that contains complex logic..."
>
> on http://rspec-puppet.com/tutorial/
>
> "What should you be testing?
>
> There are a lot of people confused by the purpose of these tests as they 
> can’t test the result of the manifest on a live system. That is not the 
> point of rspec-puppet..."
>
> Em terça-feira, 9 de abril de 2013 20h41min34s UTC-3, joe escreveu:
>>
>> Testing of puppet manifests is done using rspec.
>>
>> http://rspec-puppet.com/
>>
>> https://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing/
>>
>> On Tuesday, April 9, 2013 1:46:32 PM UTC-6, Bernardo Costa wrote:
>>>
>>> I would like to know how do people test a manifest that is basically 
>>> static without any parameter. By testing it, I mean not only check the 
>>> syntax or any invalid directive, but if the configuration there written is 
>>> implementing the expected behaviour when used. Of course, one way is just 
>>> point a machine to my puppet master and see that it has the right 
>>> configuration. But wouldn't exist another way to check this ?
>>
>>

-- 
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] Re: Puppet / hiera call a parametrised class from hieras yaml file?

2013-04-16 Thread llowder


On Tuesday, April 16, 2013 4:19:26 AM UTC-5, Brent wrote:
>
> Good day 
>
> Im using puppet 2.7.18 and hiera 1.1.0. 
>
> I would like to ask. 
>
> For some servers I manage I use the following to pull in 'custom classes'. 
> hiera_include('classes') 
>
> And it all works very well. 
>
> But Im now have a class that I now need to class via hiera, and pass 
> arguments too (the argument, really is where the clients DKIM keys 
> reside). 
>
> Can I have puppet / hiera call a parametrised class from hieras yaml file. 
>
>
In Puppet3, there is databindings, which will do auto-lookups in hiera for 
all class params.

Only way to get this behaviour in 2.7.x is to setup the params to invoke 
hiera, such as:

class myklass(
  $param1 = hiera('myklass::param1', 'somedefault'),
  $param2 = hiera('myklass::param2', 'othervalue'),
...

The "myklass::param1" naming setup for the hiera key value is not strictly 
needed, but it is how it will be expected to be in puppet3 for 
databindings, so I would recommend that you use that naming style now, to 
ease upgrades later.

 

> Thanks 
> Brent Clark 
>

-- 
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] Re: Puppet / hiera call a parametrised class from hieras yaml file?

2013-04-16 Thread jcbollinger


On Tuesday, April 16, 2013 7:35:01 AM UTC-5, llowder wrote:
>
>
>
> On Tuesday, April 16, 2013 4:19:26 AM UTC-5, Brent wrote:
>>
>> Good day 
>>
>> Im using puppet 2.7.18 and hiera 1.1.0. 
>>
>> I would like to ask. 
>>
>> For some servers I manage I use the following to pull in 'custom 
>> classes'. 
>> hiera_include('classes') 
>>
>> And it all works very well. 
>>
>> But Im now have a class that I now need to class via hiera, and pass 
>> arguments too (the argument, really is where the clients DKIM keys 
>> reside). 
>>
>> Can I have puppet / hiera call a parametrised class from hieras yaml 
>> file. 
>>
>>
> In Puppet3, there is databindings, which will do auto-lookups in hiera for 
> all class params.
>
> Only way to get this behaviour in 2.7.x is to setup the params to invoke 
> hiera, such as:
>
> class myklass(
>   $param1 = hiera('myklass::param1', 'somedefault'),
>   $param2 = hiera('myklass::param2', 'othervalue'),
> ...
>
> The "myklass::param1" naming setup for the hiera key value is not strictly 
> needed, but it is how it will be expected to be in puppet3 for 
> databindings, so I would recommend that you use that naming style now, to 
> ease upgrades later.
>


Yes, loading the data via explicit hiera calls is a good solution.  As long 
as you're going to rely on that, however, you're not gaining any advantage 
from class parameterization.  You can therefore write it this way instead:

class myklass {
  $param1 = hiera('myklass::param1', 'somedefault')
  $param2 = hiera('myklass::param2', 'othervalue')
...
}

That is, as an ordinary unparameterized class.  I would recommend that to 
you in any case, but especially so in Puppet 2.


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] Re: Module structure for case-specific configuration

2013-04-16 Thread jcbollinger


On Tuesday, April 16, 2013 3:52:40 AM UTC-5, Boyan Tabakov wrote:
>
>
> It is not website related components, but indeed web-server - vhost 
> definitions, special apache configuration files (e.g. module 
> configuration overrides, etc). Besides, the apache was just an example, 
> I have other cases where similar setup is required. In any case, the 
> project-specific definitions are *only* for resources, directly related 
> to the module in question (in this case, apache). 
> [...]
> If single point of entry can be avoided, then what do you think about 
> the second part of my question? : 
>
> > The easy solution seems to be to forget about single point of entry and 
> > include from manifests both the apache and the apache::projectX classes 
> > with appropriate parameters. However, in order to ensure proper 
> > sequencing all the apache::projectX classes might need to contain some 
> > code like this: 
> > 
> >   Class['apache::config'] -> 
> >   Class['apache::projectX'] ~> 
> >   Class['apache::service'] 
>
>
[... which carries maintenance costs typical of such boilerplate 
repetition.]

It sounds to me like requiring an explicit declaration for each project 
class is the way to go.  As I said already, however, that's entirely 
unrelated to the question of avoiding repetitive declaration patterns.

You might be able to use collections to solve this problem.  Proceed 
carefully, as Puppet has at times had issues with collecting classes (as 
opposed to ordinary resources), but the basic idea would be for 
Class['apache'] to contain something along these lines:

Class['apache::config'] -> Class<| tag == 'apache::project' |> ~> 
Class['apache::service']

That way, you have the needed relationship declarations in one central 
place.  It should not cause project classes that you have not otherwise 
declared to be declared, and I don't think it will be sensitive to the 
order of your declarations.  You will probably find that you need to tweak 
that somewhat to get it to work is you want, however.  You might find that 
it helps to require each (top) project class to explicitly tag itself with 
some well-known tag.


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.




[Puppet Users] Re: Hiera misbehavior: Dynamic data source notation

2013-04-16 Thread jcbollinger


On Monday, April 15, 2013 12:06:25 PM UTC-5, Ygor wrote:
>
> http://docs.puppetlabs.com/hiera/1/hierarchy.html#location-and-syntax 
> Dynamic data source - It says I should use %{::variable} notation for the 
> hierarchy in the hiera.yaml file. 
>


Well, that overstates the case slightly.  The docs give an example with :: 
notation, so one would expect that to work, but that's not the same thing 
as saying that you should prefer that style to any other.

 

>
> RHEL 5, Puppet 3.1.1, Hiera 1.2.0 
>
> /etc/puppet/hiera.yaml : 
> --- 
> :backends: 
>   - yaml   
> :yaml: 
>   :datadir: '/etc/puppet/hieradata' 
> :logger: console 
> :hierarchy: 
>   - %{environment}/common 
>   - common 
>
> /etc/puppet/hieradata/common.yaml : 
> --- 
> #foo:  barr 
>
> /etc/puppet/hieradata/dev/common.yaml : 
> --- 
> foo:  boo 
>
>
> If I use the "::" top level scope, it does not work. 
>
> [root puppet]# hiera foo -d -c /etc/puppet/hiera.yaml environment=dev 
> DEBUG: Mon Apr 15 12:52:51 -0400 2013: Hiera YAML backend starting 
> DEBUG: Mon Apr 15 12:52:51 -0400 2013: Looking up foo in YAML backend 
> DEBUG: Mon Apr 15 12:52:51 -0400 2013: Looking for data source common 
> nil 
>
> If I remove the double-colon, (and restart puppetmaster) it works. 
>
> [root puppet]# hiera foo -d -c /etc/puppet/hiera.yaml environment=dev 
> DEBUG: Mon Apr 15 12:53:11 -0400 2013: Hiera YAML backend starting 
> DEBUG: Mon Apr 15 12:53:11 -0400 2013: Looking up foo in YAML backend 
> DEBUG: Mon Apr 15 12:53:11 -0400 2013: Looking for data source dev/common 
> DEBUG: Mon Apr 15 12:53:11 -0400 2013: Found foo in dev/common 
> boo 
>
> The debug output from the first try even shows that it is not looking for 
> the environment. 
>
> What am I doing wrong, please ? 
>


I don't think you're doing anything wrong, per se -- either the behavior or 
the docs are buggy.  If it has not already been reported, then I would 
recommend that you file a ticket.

Meanwhile, use what works.  There isn't anything inherently wrong that, 
though in principle it may open you up to problems if ${::environment} is 
somewhere shadowed by a local ${::foo::environment} or an ${environment} 
node variable.  I would expect the former to be relevant only to explicit 
hiera() calls in the body of a class, not automated data binding.


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] Re: Puppet / hiera call a parametrised class from hieras yaml file?

2013-04-16 Thread Mohit Chawla
HI,

John, doesn't it have the advantage of a seamless upgrade to puppet 3.0 ?
Can you elaborate on why its not advantageous to use explicit hiera calls ?


On Tue, Apr 16, 2013 at 6:34 PM, jcbollinger wrote:

>
>
> On Tuesday, April 16, 2013 7:35:01 AM UTC-5, llowder wrote:
>>
>>
>>
>> On Tuesday, April 16, 2013 4:19:26 AM UTC-5, Brent wrote:
>>>
>>> Good day
>>>
>>> Im using puppet 2.7.18 and hiera 1.1.0.
>>>
>>> I would like to ask.
>>>
>>> For some servers I manage I use the following to pull in 'custom
>>> classes'.
>>> hiera_include('classes')
>>>
>>> And it all works very well.
>>>
>>> But Im now have a class that I now need to class via hiera, and pass
>>> arguments too (the argument, really is where the clients DKIM keys
>>> reside).
>>>
>>> Can I have puppet / hiera call a parametrised class from hieras yaml
>>> file.
>>>
>>>
>> In Puppet3, there is databindings, which will do auto-lookups in hiera
>> for all class params.
>>
>> Only way to get this behaviour in 2.7.x is to setup the params to invoke
>> hiera, such as:
>>
>> class myklass(
>>   $param1 = hiera('myklass::param1', 'somedefault'),
>>   $param2 = hiera('myklass::param2', 'othervalue'),
>> ...
>>
>> The "myklass::param1" naming setup for the hiera key value is not
>> strictly needed, but it is how it will be expected to be in puppet3 for
>> databindings, so I would recommend that you use that naming style now, to
>> ease upgrades later.
>>
>
>
> Yes, loading the data via explicit hiera calls is a good solution.  As
> long as you're going to rely on that, however, you're not gaining any
> advantage from class parameterization.  You can therefore write it this way
> instead:
>
> class myklass {
>   $param1 = hiera('myklass::param1', 'somedefault')
>   $param2 = hiera('myklass::param2', 'othervalue')
> ...
> }
>
> That is, as an ordinary unparameterized class.  I would recommend that to
> you in any case, but especially so in Puppet 2.
>
>
> 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.
>
>
>

-- 
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] Re: Managing uniform package baselines (declaring *many* packages) - any tricks?

2013-04-16 Thread jcbollinger


On Monday, April 15, 2013 9:13:27 AM UTC-5, Kodiak Firesmith wrote:
>
> Hello,
> Our group is currently moving from RHEL5 and an in-house baseline 
> management system and yum repositories to RHEL6, Puppet , and RHN Satellite.
>
> With our old homebrew management framework we had a lot of flexibility and 
> ease in declaring which packages should be allowed or disallowed, defined 
> either by-system or by-class/role of system.
>
> A couple examples:
>
> In Joe's server definition file: 
>   install - tomcat, java17-oracle, httpd, tomcat, confluence
>   uninstall - java16-sun
>
> Or 'class development workstation':
>   install - hg, git, subversion, eclipse, vim, ...(tens or hundreds of 
> RPMs)
>   uninstall - rcs, emacs
>
>
>
> Now for puppet it seems you can only declare/manage a package resource in 
> 1 place across all of puppet, so the only semi-viable way to manage package 
> baselines so far is to make a module for each RPM we care about managing, 
> then add those modules to node definitions or to classes, since you can 
> include a module many times and it doesn't mind.
>


That's not exactly true.  You may not declare any given resource more than 
once for any particular node, but you may choose among alternative 
declarations.  Also, you can use virtual resources to separate declaration 
of a resource's parameters from the decision of whether to actually manage 
the resource on the target node.  And there are ways to override the 
parameters (including 'ensure') of a resource declared somewhere else.

If your main objective is to be able to associate particular packages with 
the target node from more than one place, then virtual resources will be 
much lighter-weight than creating a separate class for each package.  
Example:

class site::all_packages {
  # declare all packages we care about for any node,
  # virtually

  @package {
'emacs': ensure => 'latest';
'git': ensure => 'latest';
'mercurial': ensure => 'latest';
'rcs': ensure => 'latest';
'vim': ensure => 'latest';
# ...
  }
}

class site::development_workstation {
  include 'site::all_packages'

  # These classes may be realized any number of times:
  realize Package['git', 'mercurial', 'vim']

  # This form does the same thing as the above:
  Package<| title == 'vim' |>

  # But the collection version allows parameter override, too:
  Package<| title == 'emacs' |> {
ensure => 'absent'
  }
}

You can also use subclasses of a package's declaring class 
(site::all_packages in the example) to override its parameters.  Parameter 
overrides are the key function of class inheritance in Puppet, in fact.  
Subclassing has fallen somewhat out of favor in Puppet lately, owing in 
large part to hiera's rise to prominence, but it may still fit well in the 
context of applying customizations to a common baseline configuration.

There are several variations and alternative approaches, too.  For example, 
you could explicitly tag your package declarations with keys identifying 
the node roles for which those packages are wanted, then collect them by 
tag, like so:

Package<| tag == 'development_workstation' |>

Or there are several ways to apply hiera to the problem, whether by 
recording whole package declarations to be loaded via hiera and actualized 
via create_resources(), or simply by recording arrays of the names of 
virtual packages to realize.

Consider also what level of granularity is best in any particular area.  
The idea of a separate class for each package, for instance, ignores the 
likelihood that you have groups of packages that you will always want to 
manage as a unit.  Do approach manifest design as a modeling problem, as 
opposed to a programming problem.

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.




[Puppet Users] DoDPuppet project

2013-04-16 Thread Jennings, Jared L CTR USAF AFMC 96 SK/CCI
For those inside the US Department of Defense, the DoD Puppet project on
Software.forge.mil 
has seen some activity recently.

(I apologize for posting a link to a site that most of those on the
puppet-users list can't access, but this is the place where I expect
most DoD Puppet admins will have subscribed.)

-- 
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] Re: Using onlyif for Windows exec

2013-04-16 Thread jcbollinger


On Monday, April 15, 2013 9:14:21 AM UTC-5, Gary Park wrote:
>
> Hello,
>
> I am in the process of "trying out" Puppet, and so far, it is going really 
> well, and I can see a clear line of how we can use it internally.
>
> I do have one question though with regard to the using the onlyif 
> parameter of the exec command (as per here 
> http://docs.puppetlabs.com/references/latest/type.html#exec).
>
> Ideally, what I would like to do is to only run a PowerShell exec command, 
> if a web page doesn't currently exist on the server (i.e. the PowerShell 
> script is responsible for deploying the Web Pages (into SharePoint in this 
> case) and I only want to run this step, if these pages don't already exist. 
>  To that end, I have done something like this:
>
> onlyif => '$webRequest = [System.Net.WebRequest]::Create("
> http://some-url.test.aspx";); $webRequest.UseDefaultCredentials = $true; 
> try { if([int]$webRequest.GetResponse().StatusCode -eq "200") { exit 0; } 
> else { exit 1; } } catch [System.Net.WebException] { exit 1; }'
>
> Which, at the command line, has the correct result.  However, when I try 
> to run this, I get an error saying that $webRequest is not recognised.
>
 

Puppet invokes the specified command directly, not via the [standard | 
Power] shell, so whether that works at the (some) command line is 
irrelevant.

 

>
> Which leads me to think that using variables within the onlyif is not 
> supported.  Is that correct?  If so, what is the best approach for doing 
> this, or am I going up the wrong path?
>
>

No, that's not correct.  I suppose you expect '$webRequest' to be 
meaningful to (and the whole command sequence to be executed by) 
PowerShell, but you haven't told Puppet to run it via PowerShell.  Instead, 
you've told Puppet to execute a command named literally '$webRequest'.  
Refer to the docs on the Exec type's "windows" provider for information and 
examples of how to make this sort of thing work: 
docs.puppetlabs.com/references/3.1.latest/type.html#exec .  What they say 
about the 'command' parameter applies equally to 'onlyif'.


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.




[Puppet Users] Puppet Dashboard errror

2013-04-16 Thread Jithin Xavier
Hi All,

For some reason my puppet dashborad is not starting and new node requests 
are not displaying in dashboard. I am getting following error while 
restarting Puppet dashboard.

root@PuppetMaster:/etc/puppetlabs/puppet/modules# 
/etc/init.d/pe-puppet-dashboard-workers start
 * Starting PE Puppet Dashboard 
Workers 

ERROR: there is already one or more instance(s) of the program running
ERROR: there is already one or more instance(s) of the program running
 * PE Puppet Dashboard Worker (pid ) is not running

 
[fail]
root@PuppetMaster:/etc/puppetlabs/puppet/modules#

I'm using Free enterprise version Puppet, /var/log/syslog 

 "Apr 16 15:13:04 PuppetMaster puppet-master[25026]: You have 5 active and 
no inactive nodes.
Apr 16 15:13:04 PuppetMaster puppet-master[25026]: You are currently 
licensed for 10 active nodes.
Apr 16 15:13:04 PuppetMaster puppet-master[25026]:
Apr 16 15:13:04 PuppetMaster puppet-master[25026]: This Puppet Enterprise 
distribution is licensed to:
Apr 16 15:13:04 PuppetMaster puppet-master[25026]: N/A#012#012You 
are using a complimentary ten node license provided free by Puppet Labs.
Apr 16 15:13:04 PuppetMaster puppet-master[25026]:
"

Please advise me to solve this issues.

Thanks,
Jithin

-- 
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] Re: Duplicate Declaration of resource (editing contents of same file in two diiferent module)

2013-04-16 Thread Rahul Khengare
thanks for reply,

first let me again describe my problem in detail.
I have two database server db01 and db02, on the database server (db01) i 
have to install and configure postgresql and pg_statinfo module and on 
database server(db02) i have to install and configure only postgresql.

I created postgresql module to install and configure postgresql and 
pg_statsinfo module for pg_statsinfo.
Here, "postgresql.conf" file contains the configuration for both postgresql 
and pg_statsinfo.(This is the common file which is to be edited, i use 
template to make changes),
for the pg_statsinfo module i have to add the addition contents to file 
plus change some in between contents.

I am not able to change postgresql.conf file twice in postgresql module and 
then pg_statsinfo module in case of db01, it give duplication declaration 
of file resources.
If i change the contents of postgresql.conf file in postgresql module then 
in case of db02 the postgresql not working because some addition parameters 
of pg_statsinfo in postgresql.conf.

i hope this help you to understand the scenario,  
how i maintain the modularity between to modules and change the same file 
twice for correct working.

Thanks in advance.
Rahul






  
 

On Friday, April 12, 2013 6:45:37 PM UTC+5:30, jcbollinger wrote:
>
>
>
> On Thursday, April 11, 2013 1:11:16 PM UTC-5, Rahul Khengare wrote:
>>
>> Hi all,
>>  I am writing two modules abc and xyz. In both the modules i have to 
>> change common "test.txt" file,here i use template (.erb) file to changing 
>> the contents.
>> In both abc and xyz the contents of "test.txt" file is different, if i 
>> declare file resource for "test.txt" file in two different modules it gives 
>> duplicate declaration of resource error. 
>> For the correct working of modules abc and xyz, i have to change the 
>> test.txt file twice.
>> How i overcome this situation ?   
>>
>
>
> You need to frame the problem correctly.  A File resource represents a 
> whole, specific file.  What is it even supposed to mean if you specify the 
> same target file's content differently in different places?  Your two 
> declarations cannot both be satisfied.  This sort of internal inconsistency 
> is one of the reasons for Puppet's prohibition against multiple 
> declarations of the same resource (though that prohibition applies even 
> when two or more declarations all specify exactly the same parameters).
>
> There are at least two different things you could reasonably mean:
>
>
>1. Most likely, you mean that you want to separately describe two or 
>more different parts of the same file.  In that case you are incorrect to 
>model the parts as File resources, because they are not whole files.  
> There 
>are multiple ways to handle this, but a good one would be via the Concat 
>module, which you can find on the module forge.  It will allow you to 
> model 
>individual pieces of a file, and to specify how they are to be assembled 
> to 
>form the whole.
>2. You could mean that you want to declare separate files whose 
>contents are based on the same template.  In that case it is correct to 
> use 
>separate File resources, but you must be declaring them wrongly.  Each one 
>must have a unique title and a unique absolute filename (path property); 
> if 
>not specified explicitly, the absolute filename is the same as the title.  
>There is no inherent need for the resource title or target file name to 
>have any particular relationship with the template file name (though you 
>will make it easier on yourself if you choose something that helps you 
>associate them).
>
>
> Good luck,
>
> 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.




[Puppet Users] Re: hiera & hiera-gpg

2013-04-16 Thread rashmi shiv
Hi ,

I Am new to puppet ,have setup the master and client.Now i am facing 
problem .Just cretated on module and ran the puppet on client.
I am unable to see the output.

For exaxmple :installed jboss but unable to view the output when i run 
puppettd .

I have downloaded the puppet -jboss module from github.


Can anyone asssit me.As how  to install jboss uisng puppet.

On Wednesday, 10 April 2013 14:15:39 UTC+5:30, Stefan Heijmans wrote:
>
> Hello,
>
> We are looking into using hiera with hiera-gpg, installed puppet 3.1.1 & 
> hiera 1.2.0 with rpm's.
> Installing the hiera-gpg gem, it also depends on the hiera gem (used 
> version 1.2.0).
>
> The hiera rpm installs under /usr/lib/ruby/site_ruby/1.8/
> The hiera gem installs under /usr/lib/ruby/gems/1.8/gems/
>
> So what kind of trouble can be excepted using to version of hiera 
> (rpm&gem)?
> Other then updating both with future hiera updates.
>
> Stefan
>

-- 
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] How to get return code of a command used in a custom provider.

2013-04-16 Thread Schofield
When using optional_commands in a custom provider is there a means to get 
the return code of the execution?  Something similar to "echo $?" on Linux.

For example, if I define foo

optional_commands :foo => 'foo'

I want to execute foo() and test if it was successful or not with in some 
conditional logic.

-- 
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] testing custom types?

2013-04-16 Thread Jennings, Jared L CTR USAF AFMC 96 SK/CCI
I'm having scads of fun with custom resource types. But mine are getting
complicated enough that not having automated tests for them is starting
to seem really foolish. But the latest things I've seen about that issue
are from three years ago (,
). There's a lot written
about puppet-rspec, but that's for testing your manifests, not for
testing your custom types. What am I missing? 

-- 
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] Microsoft dotNet Framework 4.0 (.net, .netfx, dotnetfx)

2013-04-16 Thread Kevin D
I noticed an issue when trying to deploy Microsoft .NET Framework 4.0 using 
Puppet's package resource type.  On first run, Puppet appropriately 
installs the package.  But on each subsequent run, puppet invokes a repair 
of the framework (see attached picture).

Has anyone else encountered this? Is there a resolution?

-Kevin

-- 
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.




init.pp
Description: Binary data
<>

[Puppet Users] Re: Using onlyif for Windows exec

2013-04-16 Thread Gary Park
Hello,
 
Thanks for getting back to me.
 
I think I forgot to mention, I am using this:
 
http://forge.puppetlabs.com/joshcooper/powershell
 
Does this "change" how the onlyif parameter interprets what it is provided?
 
Thanks

Gary

On Tuesday, April 16, 2013 3:54:19 PM UTC+1, jcbollinger wrote:

>
>
> On Monday, April 15, 2013 9:14:21 AM UTC-5, Gary Park wrote:
>>
>> Hello,
>>
>> I am in the process of "trying out" Puppet, and so far, it is going 
>> really well, and I can see a clear line of how we can use it internally.
>>
>> I do have one question though with regard to the using the onlyif 
>> parameter of the exec command (as per here 
>> http://docs.puppetlabs.com/references/latest/type.html#exec).
>>
>> Ideally, what I would like to do is to only run a PowerShell exec 
>> command, if a web page doesn't currently exist on the server (i.e. the 
>> PowerShell script is responsible for deploying the Web Pages (into 
>> SharePoint in this case) and I only want to run this step, if these pages 
>> don't already exist.  To that end, I have done something like this:
>>
>> onlyif => '$webRequest = [System.Net.WebRequest]::Create("
>> http://some-url.test.aspx";); $webRequest.UseDefaultCredentials = $true; 
>> try { if([int]$webRequest.GetResponse().StatusCode -eq "200") { exit 0; } 
>> else { exit 1; } } catch [System.Net.WebException] { exit 1; }'
>>
>> Which, at the command line, has the correct result.  However, when I try 
>> to run this, I get an error saying that $webRequest is not recognised.
>>
>  
>
> Puppet invokes the specified command directly, not via the [standard | 
> Power] shell, so whether that works at the (some) command line is 
> irrelevant.
>
>  
>
>>
>> Which leads me to think that using variables within the onlyif is not 
>> supported.  Is that correct?  If so, what is the best approach for doing 
>> this, or am I going up the wrong path?
>>
>>
>
> No, that's not correct.  I suppose you expect '$webRequest' to be 
> meaningful to (and the whole command sequence to be executed by) 
> PowerShell, but you haven't told Puppet to run it via PowerShell.  Instead, 
> you've told Puppet to execute a command named literally '$webRequest'.  
> Refer to the docs on the Exec type's "windows" provider for information and 
> examples of how to make this sort of thing work: 
> docs.puppetlabs.com/references/3.1.latest/type.html#exec .  What they say 
> about the 'command' parameter applies equally to 'onlyif'.
>
>
> 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] Microsoft dotNet Framework 4.0 (.net, .netfx, dotnetfx)

2013-04-16 Thread Josh Cooper
On Tue, Apr 16, 2013 at 12:56 PM, Kevin D wrote:

> I noticed an issue when trying to deploy Microsoft .NET Framework 4.0
> using Puppet's package resource type.  On first run, Puppet appropriately
> installs the package.  But on each subsequent run, puppet invokes a repair
> of the framework (see attached picture).
>
> Has anyone else encountered this? Is there a resolution?
>
> -Kevin
>
> --
> 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.
>
>
>

This is almost certainly because the name of the resource in your manifest
needs to match the product that was installed. Otherwise, puppet thinks the
product isn't installed and will re-install it, which results in the repair
dialog.

See http://projects.puppetlabs.com/issues/19747 and
http://docs.puppetlabs.com/windows/writing.html#packagepackage

Nearly every Windows user runs into this, and Klavs submitted a proposal to
at least warn if you get in this state:
http://projects.puppetlabs.com/issues/19782.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

*Join us at PuppetConf 2013, August 22-23 in San Francisco - *
http://bit.ly/pupconf13*
**The first 150 tickets sold will be available at a 35% discount - register
now! Offer expires April 22.*

-- 
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] [ANN] puppet-cleaner: makes puppet DSL code comply with a subset of the style guide

2013-04-16 Thread Gerardo Santana Gómez Garrido
FWIW,

I've wrote puppet-cleaner to help me make comply thousands of lines of 
puppet 2.6 DSL code to puppet 2.7 style guide and expectations. I'm 
uploading it to github today for anyone to use.

https://github.com/santana/puppet-cleaner

Externally, you run puppet-clean file.pp and it can transform this:

/*
  multiline comment
  trailing white space here ->  
*/

class someclass($version = "5", $platform = "rhel6")
{
if ! ($version in ["4", "5"] or !($platform in ["rhel5", "rhel6"]))  {
 fail("Version $version on $platform is not supported")
}
   else {
notice("Defining class for version \"$version\" on '$platform'")
  package {
[
  "package-1",
"package-2",
  ]:
  }

 sysctl2::conf {"${something}":
  settings => [
 "set key1 'value1'",
 "set key2 'value2'",
 ]
  }
   file {
"/file/a": # test
source  =>'puppet:///someclass/file/a',
   owner  =>   'root',
 ensure   =>   ensure_a,
 group=> "${group}";
"/file/b":
source  =>'puppet:///someclass/file/b',
 mode=>755,
 ensure   =>   ensure_b,
   owner  =>   'root',
 group=> "${group}";
  }

   file {
"/file/c":
source  =>'puppet:///someclass/file/c',
   owner  =>   'root',
 ensure   =>   ensure_c,
 group=> "${group}";
"/file/d":
source  =>'puppet:///someclass/file/d',
 mode=>"755",
   owner  =>   'root',
 group=> "${group}"
  }
   file {
"/file/e":
source  =>'puppet:///someclass/file/c',
   owner  =>   'root',
  alias  => ["$hostname"],
 group=> "${group}",
 ensure   =>   'absent';
"/file/f":
 ensure   =>   'ensure_f';
  }

  user {
"jdoe":
   managed_home => "true",
  }
}
}

into this:

#
#   multiline comment
#   trailing white space here ->


class someclass($version = '5', $platform = 'rhel6')
{
  if ! ($version in ['4', '5'] or !($platform in ['rhel5', 'rhel6']))  {
fail("Version ${version} on ${platform} is not supported")
  }
  else {
notice("Defining class for version \"${version}\" on '${platform}'")
package {
  [
'package-1',
'package-2',
  ]:
}

sysctl2::conf {$something:
  settings => [
'set key1 \'value1\'',
'set key2 \'value2\'',
  ]
}
file {
  '/file/a':
ensure => link, # test
source => 'puppet:///someclass/file/a',
owner  => 'root',
target => ensure_a,
group  => $group;
  '/file/b':
ensure => link,
source => 'puppet:///someclass/file/b',
mode   => '0755',
target => ensure_b,
owner  => 'root',
group  => $group;
}

file {
  '/file/c':
ensure => link,
source => 'puppet:///someclass/file/c',
owner  => 'root',
target => ensure_c,
group  => $group;
  '/file/d':
source => 'puppet:///someclass/file/d',
mode   => '0755',
owner  => 'root',
group  => $group
}
file {
  '/file/e':
ensure => 'absent',
source => 'puppet:///someclass/file/c',
owner  => 'root',
alias  => [$hostname],
group  => $group;
  '/file/f':
ensure => link,
target => 'ensure_f';
}

user {
  'jdoe':
managed_home => true,
}
  }
}

Internally, it monkey patches puppet 2.7.11 to take advantage of puppet's 
tokenizer and iterates over them like in a production line, where each 
transformation algorithm (worker) awaits for the pattern of tokens it knows 
how to transform.

I haven't had the time to refactor some stuff; feel free to ignore it, 
improve it, send me patches, etc.


-- 
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] Re: Using onlyif for Windows exec

2013-04-16 Thread Justin Stoller
On Tue, Apr 16, 2013 at 1:29 PM, Gary Park  wrote:

> Hello,
>
> Thanks for getting back to me.
>
> I think I forgot to mention, I am using this:
>
> http://forge.puppetlabs.com/joshcooper/powershell
>
> Does this "change" how the onlyif parameter interprets what it is provided?
>

yes it should. the onlyif and unless parameters should be interpreted the
same was the command parameter.

>
> Thanks
>
> Gary
>
> On Tuesday, April 16, 2013 3:54:19 PM UTC+1, jcbollinger wrote:
>
>>
>>
>> On Monday, April 15, 2013 9:14:21 AM UTC-5, Gary Park wrote:
>>>
>>> Hello,
>>>
>>> I am in the process of "trying out" Puppet, and so far, it is going
>>> really well, and I can see a clear line of how we can use it internally.
>>>
>>> I do have one question though with regard to the using the onlyif
>>> parameter of the exec command (as per here http://docs.puppetlabs.**
>>> com/references/latest/type.**html#exec
>>> ).
>>>
>>> Ideally, what I would like to do is to only run a PowerShell exec
>>> command, if a web page doesn't currently exist on the server (i.e. the
>>> PowerShell script is responsible for deploying the Web Pages (into
>>> SharePoint in this case) and I only want to run this step, if these pages
>>> don't already exist.  To that end, I have done something like this:
>>>
>>> onlyif => '$webRequest = [System.Net.WebRequest]::**Create("
>>> http://some-url.test.**aspx "); $webRequest.*
>>> *UseDefaultCredentials = $true; try { 
>>> if([int]$webRequest.**GetResponse().StatusCode
>>> -eq "200") { exit 0; } else { exit 1; } } catch [System.Net.WebException] {
>>> exit 1; }'
>>>
>>> Which, at the command line, has the correct result.  However, when I try
>>> to run this, I get an error saying that $webRequest is not recognised.
>>>
>>
>>
>> Puppet invokes the specified command directly, not via the [standard |
>> Power] shell, so whether that works at the (some) command line is
>> irrelevant.
>>
>>
>>
>>>
>>> Which leads me to think that using variables within the onlyif is not
>>> supported.  Is that correct?  If so, what is the best approach for doing
>>> this, or am I going up the wrong path?
>>>
>>>
>>
>> No, that's not correct.  I suppose you expect '$webRequest' to be
>> meaningful to (and the whole command sequence to be executed by)
>> PowerShell, but you haven't told Puppet to run it via PowerShell.  Instead,
>> you've told Puppet to execute a command named literally '$webRequest'.
>> Refer to the docs on the Exec type's "windows" provider for information and
>> examples of how to make this sort of thing work: docs.puppetlabs.com/**
>> references/3.1.latest/type.**html#exec.
>>   What they say about the 'command' parameter applies equally to 'onlyif'.
>>
>>
>> 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.
>
>
>

-- 
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] Microsoft dotNet Framework 4.0 (.net, .netfx, dotnetfx)

2013-04-16 Thread Kevin D
Josh,

Thanks for the prompt reply!  I forgot about that requirement for the 
resource name.  

This leads to an interesting issue.  The file 'dotNetFx40_Full_x86_x64.exe' 
performs, two installations:

   - Microsoft .NET Framework 4 Extended


   - Microsoft .NET Framework 4 Client Profile

Is there a suggestion other than extracting the associated MSIs 
'dotNetFx40_Full_x86_x64.exe' and writing two resources (to install each of 
the MSIs [so the resource name may match the display DisplayName])?

-Kevin

On Tuesday, April 16, 2013 2:55:19 PM UTC-6, Josh Cooper wrote:
>
>
>
>
> On Tue, Apr 16, 2013 at 12:56 PM, Kevin D 
> > wrote:
>
>> I noticed an issue when trying to deploy Microsoft .NET Framework 4.0 
>> using Puppet's package resource type.  On first run, Puppet appropriately 
>> installs the package.  But on each subsequent run, puppet invokes a repair 
>> of the framework (see attached picture).
>>
>> Has anyone else encountered this? Is there a resolution?
>>
>> -Kevin
>>
>> -- 
>> 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.
>>  
>>  
>>
>
> This is almost certainly because the name of the resource in your manifest 
> needs to match the product that was installed. Otherwise, puppet thinks the 
> product isn't installed and will re-install it, which results in the repair 
> dialog.
>
> See http://projects.puppetlabs.com/issues/19747 and 
> http://docs.puppetlabs.com/windows/writing.html#packagepackage
>
> Nearly every Windows user runs into this, and Klavs submitted a proposal 
> to at least warn if you get in this state: 
> http://projects.puppetlabs.com/issues/19782.
>
> Josh
>
> -- 
> Josh Cooper
> Developer, Puppet Labs
>
> *Join us at PuppetConf 2013, August 22-23 in San Francisco - *
> http://bit.ly/pupconf13*
> **The first 150 tickets sold will be available at a 35% discount - 
> register now! Offer expires April 22.*
>  

-- 
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] Windows Puppet waits for , then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"

2013-04-16 Thread Larry Fast
I think I found the problem.  Pluginsync seems to load ALL plugins - even 
for modules that are not included in that node's manifest.  Is this correct?

I think my problem is a plugin that runs fine in Unix but does not work 
properly in windows.  

Side issue: diagnostics could have been better.  The error did not indicate 
a source file. And Pluginsync does not indicate the source module for any 
of the files it loads.  Not even in debug mode.

Cheers,
Larry Fast

>
>
>

-- 
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.