Re: [Puppet Users] puppet agent upgrade on windows

2014-12-08 Thread Dirk Heinrichs
Am 08.12.2014 um 15:52 schrieb Jason Chinsen:

> Thanks of the update, this is great news. If you do not mind, please
> can you share your puppet manifests and chocolatey package?

I don't use chocolatey. I use the .msi from Puppetlabs (this is not PE,
btw.). However, I've attached my module. You may need to remove/replace
the "puppetstore" parts.

> More over how do you, if you have to, deal with the .net4 issue that I
> posted?

No, I don't have that issue.

HTH...

Dirk
-- 

*Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
*Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
*Tel*: +49 2226 159 (Ansage) 1149
*Email*: d...@recommind.com 
*Skype*: dirk.heinrichs.recommind
www.recommind.com 

-- 
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/54869DD3.2030204%40recommind.com.
For more options, visit https://groups.google.com/d/optout.


puppet_agent.tgz
Description: Binary data


Re: [Puppet Users] remove/purge a package

2014-12-08 Thread Spencer Krum

Well thats weird. I don't know what's going on there.

--
Spencer Krum n...@spencerkrum.com



On Mon, Dec 8, 2014, at 10:13 PM, ezzobad wrote:
> Hi Spencer,
>
> cent200 is the puppet master and cent201 is the client.
>
> the manifest: Package { ensure => "installed", allow_virtual =>
> 'false' } $unwanted_packages = [ "ypbind", "yp-tools" ] package {
> $unwanted_packages: ensure => 'purged', provider => 'yum' }
>
>
> [root@Cent201 ~]# rpm -aq | egrep "ypbind|yp-tools"
> yp-tools-2.9-12.el6.x86_64 ypbind-1.20.4-30.el6.x86_64
>
> [root@Cent201 ~]# puppet agent -t Info: Retrieving pluginfacts Info:
> Retrieving plugin Info: Loading facts
>
> ** (process:5286): WARNING **: nm_client_get_devices: error getting
> devices: The name org.freedesktop.NetworkManager was not provided by
> any .service files
>
> Info: Caching catalog for cent201.example.com Info: Applying
> configuration version '1418105294' Notice:
> /Stage[main]/Main/Package[ypbind]/ensure: ensure changed
> '1.20.4-30.el6' to 'purged' Notice:
> /Stage[main]/Main/Package[yp-tools]/ensure: ensure changed
> '2.9-12.el6' to 'purged' Notice: Finished catalog run in 23.73 seconds
>
> The two packages purged beautifully. Now run it again without any
> modification to the environment:
>
> [root@Cent201 ~]# puppet agent -t Info: Retrieving pluginfacts Info:
> Retrieving plugin Info: Loading facts
>
> ** (process:5640): WARNING **: nm_client_get_devices: error getting
> devices: The name org.freedesktop.NetworkManager was not provided by
> any .service files
>
> Info: Caching catalog for cent201.example.com Info: Applying
> configuration version '1418105392' Notice:
> /Stage[main]/Main/Package[ypbind]/ensure: *created* Notice:
> /Stage[main]/Main/Package[yp-tools]/ensure: *created* Notice: Finished
> catalog run in 8.98 seconds
>
>
> It should have ignored the two packages, because they don't exist on
> the node. And the "created" here is a fake one: [root@Cent201 ~]# rpm
> -aq | egrep "ypbind|yp-tools" [root@Cent201 ~]#
>
> Cheers,
>
> Mehdi
>


> --
>
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/2e119c79-7bfc-4eb8-835d-2033b146a480%40googlegroups.com.
>
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/1418106457.4055817.200566505.6EA2370B%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] remove/purge a package

2014-12-08 Thread ezzobad
Hi Spencer,

cent200 is the puppet master and cent201 is the client.

the manifest:
Package {
ensure => "installed",
allow_virtual => 'false'
}
$unwanted_packages = [ "ypbind", "yp-tools" ]
package { $unwanted_packages:
ensure   => 'purged',
provider => 'yum'
}


[root@Cent201 ~]# rpm -aq | egrep "ypbind|yp-tools"
yp-tools-2.9-12.el6.x86_64
ypbind-1.20.4-30.el6.x86_64

[root@Cent201 ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts

** (process:5286): WARNING **: nm_client_get_devices: error getting 
devices: The name org.freedesktop.NetworkManager was not provided by any 
.service files

Info: Caching catalog for cent201.example.com
Info: Applying configuration version '1418105294'
Notice: /Stage[main]/Main/Package[ypbind]/ensure: ensure changed 
'1.20.4-30.el6' to 'purged'
Notice: /Stage[main]/Main/Package[yp-tools]/ensure: ensure changed 
'2.9-12.el6' to 'purged'
Notice: Finished catalog run in 23.73 seconds

The two packages purged beautifully. Now run it again without any 
modification to the environment:

[root@Cent201 ~]# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts

** (process:5640): WARNING **: nm_client_get_devices: error getting 
devices: The name org.freedesktop.NetworkManager was not provided by any 
.service files

Info: Caching catalog for cent201.example.com
Info: Applying configuration version '1418105392'
Notice: /Stage[main]/Main/Package[ypbind]/ensure: *created*
Notice: /Stage[main]/Main/Package[yp-tools]/ensure: *created*
Notice: Finished catalog run in 8.98 seconds


It should have ignored the two packages, because they don't exist on the 
node. And the "created" here is a fake one:
[root@Cent201 ~]# rpm -aq | egrep "ypbind|yp-tools"
[root@Cent201 ~]#

Cheers,

Mehdi

-- 
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/2e119c79-7bfc-4eb8-835d-2033b146a480%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] remove/purge a package

2014-12-08 Thread Spencer Krum

Can you post more of your code?

--
Spencer Krum n...@spencerkrum.com



On Mon, Dec 8, 2014, at 09:09 PM, ezzobad wrote:
> Hi,
>
> I was trying to remove "ypbind" and "yp-tools" using ensure =>
> 'absent', but it looks like puppet does not support interdependency in
> this way. So I tried 'purged' and the result is what I expected,
> except the report: ... Notice:
> /Stage[main]/Main/Package[yp-tools]/ensure: *created* ...
>
> Shouldn't it being reported as "*purged*" instead "*created*" do
> you think?
>
> Regards,
>
> Mehdi
>


> --
>
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/6f6cd6ef-338a-4dbf-9423-f74f5b651f68%40googlegroups.com.
>
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/1418104167.4043419.200558721.1CBCD4FD%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Using Puppetdb-terminus via rubygems...?

2014-12-08 Thread Spencer Krum

The gem owner would be the only one who could remote the gem. That,
obviously, is not puppetlabs.

--
Spencer Krum n...@spencerkrum.com



On Mon, Dec 8, 2014, at 09:19 PM, Matt Wise wrote:
> +1
>
> Matt Wise Sr. Systems Architect Nextdoor.com
>
> On Mon, Dec 8, 2014 at 9:34 AM, Darin Perusich
>  wrote:
>> On Mon, Dec 8, 2014 at 5:01 AM, Ken Barber
>>  wrote:
>> >> We have entirely-gem based Puppet masters (no Ubuntu packages
>> >> installing
>>
>> Puppet)... we're trying to add in the puppetdb-terminus gemfile. We
>> have it
>>
>> configured, and installed:
>>
>>
>>
>>
>>
>> # gem list | grep -i puppet
>>
>> hiera-puppet (1.0.0)
>>
>> puppet (3.7.3)
>>
>> puppet-catalog-test (0.3.1)
>>
>> puppet-lint (1.0.1)
>>
>> puppet-syntax (1.3.0)
>>
>> puppetdb-terminus (1.0)
>>
>> puppetlabs_spec_helper (0.8.2)
>>
>> rspec-hiera-puppet (1.0.0)
>>
>
>>
> That is not an official gem for puppetdb-terminus :-). Someone
>>
> uploaded it in the past, I think its a dud.
>>
>> If this isn't official, would Puppet Labs be willing to have it
>>
removed or publish the gem?
>>
>>
> We don't really ship a rubygem, we do have a gemfile however:
>>
> https://github.com/puppetlabs/puppetdb/tree/master/contrib/gem
>>
>
>>
> That can be used to create your own gem.
>>
>
>>
>> We're running into a problem with our Unicorn/Nginx config though...
>>
>>
>>
>> puppet-master[17213]: Could not configure routes from
>>
>> /etc/puppet/routes.yaml: Could not find terminus puppetdb for
>> indirection
>>
>> facts
>>
>>
>>
>> Is there something special we need to do to the config.ru or
>> something so
>>
>> that it can find the puppetdb terminus from the gem thats installed?
>>
>
>>
> That just looks like the necessary ruby library files aren't in place,
>>
> probably due to the bad gem.
>>
>
>>
> ken.
>>
>
>>
> --
>> > 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/CAE4bNTnH4ZQXnsGJpxB-W6SAypsJAsXtU0F%3DFoFXtcoRmTJbTA%40mail.gmail.com.
>>
> For more options, visit https://groups.google.com/d/optout.
>>
>>
--
>>
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/830HwH-1JCY/unsubscribe.
>>
To unsubscribe from this group and all its topics, 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/CADaviKuX8s3cUms_d7LP7QHR-dtyT%3DMG%3D%3DPz85WJrohiVPqUJA%40mail.gmail.com.
>> 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/CAOHkZxOi0g3Ey%3Dj2r0SDAHhgF5JBVX4wLRWLRwOPaBYfd9GmCw%40mail.gmail.com.
>
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/1418104128.4043275.200558617.75DF529D%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Using Puppetdb-terminus via rubygems...?

2014-12-08 Thread Matt Wise
+1

Matt Wise
Sr. Systems Architect
Nextdoor.com

On Mon, Dec 8, 2014 at 9:34 AM, Darin Perusich  wrote:

> On Mon, Dec 8, 2014 at 5:01 AM, Ken Barber  wrote:
> >> We have entirely-gem based Puppet masters (no Ubuntu packages installing
> >> Puppet)... we're trying to add in the puppetdb-terminus gemfile. We
> have it
> >> configured, and installed:
> >>
> >>
> >> # gem list | grep -i puppet
> >> hiera-puppet (1.0.0)
> >> puppet (3.7.3)
> >> puppet-catalog-test (0.3.1)
> >> puppet-lint (1.0.1)
> >> puppet-syntax (1.3.0)
> >> puppetdb-terminus (1.0)
> >> puppetlabs_spec_helper (0.8.2)
> >> rspec-hiera-puppet (1.0.0)
> >
> > That is not an official gem for puppetdb-terminus :-). Someone
> > uploaded it in the past, I think its a dud.
>
> If this isn't official, would Puppet Labs be willing to have it
> removed or publish the gem?
>
> > We don't really ship a rubygem, we do have a gemfile however:
> > https://github.com/puppetlabs/puppetdb/tree/master/contrib/gem
> >
> > That can be used to create your own gem.
> >
> >> We're running into a problem with our Unicorn/Nginx config though...
> >>
> >> puppet-master[17213]: Could not configure routes from
> >> /etc/puppet/routes.yaml: Could not find terminus puppetdb for
> indirection
> >> facts
> >>
> >> Is there something special we need to do to the config.ru or something
> so
> >> that it can find the puppetdb terminus from the gem thats installed?
> >
> > That just looks like the necessary ruby library files aren't in place,
> > probably due to the bad gem.
> >
> > ken.
> >
> > --
> > 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/CAE4bNTnH4ZQXnsGJpxB-W6SAypsJAsXtU0F%3DFoFXtcoRmTJbTA%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/830HwH-1JCY/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CADaviKuX8s3cUms_d7LP7QHR-dtyT%3DMG%3D%3DPz85WJrohiVPqUJA%40mail.gmail.com
> .
> 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/CAOHkZxOi0g3Ey%3Dj2r0SDAHhgF5JBVX4wLRWLRwOPaBYfd9GmCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] remove/purge a package

2014-12-08 Thread ezzobad
Hi,

I was trying to remove "ypbind" and "yp-tools" using ensure => 'absent', 
but it looks like puppet does not support interdependency in this way. So I 
tried 'purged' and the result is what I expected, except the report:
...
Notice: /Stage[main]/Main/Package[yp-tools]/ensure: *created*
...

Shouldn't it being reported as "*purged*" instead "*created*" do you think?

Regards,

Mehdi

-- 
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/6f6cd6ef-338a-4dbf-9423-f74f5b651f68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: classification question

2014-12-08 Thread ezzobad
Thanks John and Byron,

Yes it is Puppet PE, but I am using it in my test lab (Do you think PE is a 
wrong choice for learning Puppet? It's free up to 10 nodes you know. You 
input would be valuable to me as I have just started puppetizing).

And regarding the issue, found out a bit more:
Puppet PE classifies all nodes into "PE MCollective" node group by default. 
And this node group is associated with "Production" environment. 
But I assigned nodegroup1 to "Environment1". 
It means that cent201.example.com is a member of two node gropus now ("PE 
MCollective" and "nodegroup1"), by these two node groups are classified 
into different environments. In other words, *cent201.example.com* cannot 
be in both "Environment1" and "Production" environments at the same time. 

Regards,

Mehdi



On Tuesday, December 9, 2014 2:31:57 AM UTC+11, jcbollinger wrote:
>
>
>
> On Monday, December 8, 2014 12:08:22 AM UTC-6, ezzobad wrote:
>>
>> Hi,
>>
>> This is the configuration:
>> *Puppet version:* 3.7.2 (Puppet Enterprise 3.7.0)
>> *OS on the puppet master and agent:* CentOS release 6.5 (Final)
>> *Puppet server:* Cent200.example.com
>> *Puppet node:* Cent201.example.com
>>
>> environment1:
>> /etc/puppetlabs/puppet/environments/environment1/
>> ├── manifests
>> │   └── site.pp
>> └── modules
>>
>> and site.pp is an empty file.
>>
>> A new node group: *nodegroup1 *(the parent is "*default*" and the 
>> environment is "*environment1*".)
>>
>> If I assign a node to this node group (so the only matching node is 
>> cent201.example.com).
>>
>> I expect to have no problem by running "puppet agent -t" on the client 
>> side (because site.pp is empty), but looks like there is a conflict:
>>
>> *"Classification failed for cent201.example.com 
>>  due to a classification conflict: The node was 
>> classified into groups named "nodegroup1" and "PE MCollective" that defined 
>> conflicting values for the environment, ."*
>>
>
>
> This question appears to be specific to Puppet PE (node groups must be a 
> function of its integrated node classifier), so you should consider 
> contacting PuppetLabs support.  Nevertheless, the error message appears to 
> be telling you that you have assigned the node to groups that specify 
> different 'environment' settings for it.
>
> If it is both possible and sensible, then you should modify one or both of 
> the groups so that they do not specify a particular environment for member 
> nodes.  Groups that specify an environment for member nodes are 
> incompatible with each other if they specify different ones (regardless of 
> the contents of any environment's 'site.pp' file).
>
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/818cb2f8-d8be-47af-9943-5b45f640d861%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet, hiera, and overrides

2014-12-08 Thread Ramin K
np. There is any interesting discussion on what to change in the future 
here. https://tickets.puppetlabs.com/browse/HI-118


Ramin

On 12/8/14 1:37 PM, Nathan Earixson wrote:

Thank you. I get it now.

-n

On Monday, December 8, 2014 3:13:26 PM UTC-6, Ramin K wrote:

On 12/8/14 12:56 PM, Nathan Earixson wrote:
 > sudo -u puppet hiera --hash ssh::server_options environment=test
 > ::kernel=Linux
 > {"PermitRootLogin"=>"no", "ClientAliveInterval"=>540,
"TCPKeepAlive"=>"yes"}
 >
 > |
 >
 > I have tried this with AND without :merge_behavior: deeper set in
the
 > hiera.yaml file.
 >
 > Any ideas of what I am missing?

If you're using data bindings to lookup the hiera values, it will
return
a matching hash, but will not merge. You must explicitly use a
hiera_hash call to get merging.

Ramin

--
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/b1371998-455e-4fdf-9e5d-c712a66a5fbe%40googlegroups.com
.
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/548622D4.2010500%40badapple.net.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet, hiera, and overrides

2014-12-08 Thread Nathan Earixson
Thank you. I get it now.

-n

On Monday, December 8, 2014 3:13:26 PM UTC-6, Ramin K wrote:
>
> On 12/8/14 12:56 PM, Nathan Earixson wrote: 
> > sudo -u puppet hiera --hash ssh::server_options environment=test 
> > ::kernel=Linux 
> > {"PermitRootLogin"=>"no", "ClientAliveInterval"=>540, 
> "TCPKeepAlive"=>"yes"} 
> > 
> > | 
> > 
> > I have tried this with AND without :merge_behavior: deeper set in the 
> > hiera.yaml file. 
> > 
> > Any ideas of what I am missing? 
>
> If you're using data bindings to lookup the hiera values, it will return 
> a matching hash, but will not merge. You must explicitly use a 
> hiera_hash call to get merging. 
>
> Ramin 
>

-- 
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/b1371998-455e-4fdf-9e5d-c712a66a5fbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet, hiera, and overrides

2014-12-08 Thread Ramin K

On 12/8/14 12:56 PM, Nathan Earixson wrote:

sudo -u puppet hiera --hash ssh::server_options environment=test
::kernel=Linux
{"PermitRootLogin"=>"no", "ClientAliveInterval"=>540, "TCPKeepAlive"=>"yes"}

|

I have tried this with AND without :merge_behavior: deeper set in the
hiera.yaml file.

Any ideas of what I am missing?


If you're using data bindings to lookup the hiera values, it will return 
a matching hash, but will not merge. You must explicitly use a 
hiera_hash call to get merging.


Ramin

--
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/5486146B.4070308%40badapple.net.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet, hiera, and overrides

2014-12-08 Thread Nathan Earixson
Hi, I think I'm misunderstanding either Hiera data bindings or the hash 
merge functions, but I'm not sure which.

When I override a Hiera setting in a more specific level of the heriarchy, 
only that setting gets applied. In fact, settings from more general levels 
get removed.

Example:
I'm using the saz-ssh module to set SSH server options.

Testing with a simple Hierarchy like so:
- %{::osfamily}
  - %{::kernel}
  - common


Linux.yaml:
ssh::server_options:
  TCPKeepAlive: 'yes'
  ClientAliveInterval: 540
  PermitRootLogin: 'no'


RedHat.yaml
ssh::server_options:
  TCPKeepAlive: 'yes'
  ClientAliveInterval: 540
  PermitRootLogin: 'yes'



Gives me the expected sshd_config:
# File is managed by Puppet

AcceptEnv LANG LC_*
ChallengeResponseAuthentication no
ClientAliveInterval 540
PermitRootLogin yes
PrintMotd no
Subsystem sftp /usr/libexec/openssh/sftp-server
TCPKeepAlive yes
UsePAM yes
X11Forwarding yes



If I change the RedHat.yaml to include ONLY the setting I want to override 
(Linux.yaml is unchanged):
ssh::server_options:
  PermitRootLogin: 'yes'



After puppet agent runs, sshd_config is missing the other two settings 
(ClientAliveInterval and TCPKeepAlive) settings:
AcceptEnv LANG LC_*
ChallengeResponseAuthentication no
PermitRootLogin yes
PrintMotd no
Subsystem sftp /usr/libexec/openssh/sftp-server
UsePAM yes
X11Forwarding yes




Hiera lookups from the command line work as I expect them to, returning a 
has of all three settings with the overridden one correct:

 sudo -u puppet hiera --hash ssh::server_options environment=test 
::kernel=Linux ::osfamily=RedHat
 
{"PermitRootLogin"=>"yes", "TCPKeepAlive"=>"yes", 
"ClientAliveInterval"=>540}


sudo -u puppet hiera --hash ssh::server_options environment=test 
::kernel=Linux
{"PermitRootLogin"=>"no", "ClientAliveInterval"=>540, "TCPKeepAlive"=>"yes"}


I have tried this with AND without :merge_behavior: deeper set in the 
hiera.yaml file.

Any ideas of what I am 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/05da44a4-7fb6-454b-b769-942fb023d095%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Using Puppetdb-terminus via rubygems...?

2014-12-08 Thread Darin Perusich
On Mon, Dec 8, 2014 at 5:01 AM, Ken Barber  wrote:
>> We have entirely-gem based Puppet masters (no Ubuntu packages installing
>> Puppet)... we're trying to add in the puppetdb-terminus gemfile. We have it
>> configured, and installed:
>>
>>
>> # gem list | grep -i puppet
>> hiera-puppet (1.0.0)
>> puppet (3.7.3)
>> puppet-catalog-test (0.3.1)
>> puppet-lint (1.0.1)
>> puppet-syntax (1.3.0)
>> puppetdb-terminus (1.0)
>> puppetlabs_spec_helper (0.8.2)
>> rspec-hiera-puppet (1.0.0)
>
> That is not an official gem for puppetdb-terminus :-). Someone
> uploaded it in the past, I think its a dud.

If this isn't official, would Puppet Labs be willing to have it
removed or publish the gem?

> We don't really ship a rubygem, we do have a gemfile however:
> https://github.com/puppetlabs/puppetdb/tree/master/contrib/gem
>
> That can be used to create your own gem.
>
>> We're running into a problem with our Unicorn/Nginx config though...
>>
>> puppet-master[17213]: Could not configure routes from
>> /etc/puppet/routes.yaml: Could not find terminus puppetdb for indirection
>> facts
>>
>> Is there something special we need to do to the config.ru or something so
>> that it can find the puppetdb terminus from the gem thats installed?
>
> That just looks like the necessary ruby library files aren't in place,
> probably due to the bad gem.
>
> ken.
>
> --
> 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/CAE4bNTnH4ZQXnsGJpxB-W6SAypsJAsXtU0F%3DFoFXtcoRmTJbTA%40mail.gmail.com.
> 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/CADaviKuX8s3cUms_d7LP7QHR-dtyT%3DMG%3D%3DPz85WJrohiVPqUJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] hiera and puppet variables

2014-12-08 Thread Drew
Hey, I hope someone here can point me in the right direction.  Maybe I'm 
doing something wrong here, but I'm having trouble getting it resolved.  I 
have a java rpm that I want to relocate under a different directory, for 
various reasons.  Not something all that uncommon.  I'd like to use puppet 
to do this and I've got this in my puppet class:

class java {
  $javapkg = hiera('java_package')
  $java_provider = hiera('java_provider')
  $provider_install_options = hiera('java_provider_install_options')
  $javapkgsrc = hiera('java_package_source')
  $installpath = hiera('java_installpath')

  file { "/tmp/$javapkg":
ensure => present,
source => $javapkgsrc,
  }
  package { $javapkg:
ensure => installed,
provider => $java_provider,
install_options => $provider_install_options,
source => "/tmp/$javapkg",   
  }
}

Keep in mind this is more of a smoke test than something I'm going to use 
directly, but it will be based on this.  My node.yaml looks like:

- - -
  java_package: jdk-7u9-linux-x64.rpm
  java_version: 7u9
  java_installpath: /opt/java
  java_provider: rpm
  java_provider_install_options: [ --relocate , 
"/usr/java/jdk1.7.0_09=%{installpath}" ]
  java_package_source: /data/puppet/modules/java/files/%{javapkg}


When I run puppet apply on this, it appears to get all the variables just 
fine, but for whatever reason that I can't seem to determine  in the 
java_provider_install_options it doesn't resolve the %{installpath}.

Error: Execution of '/bin/rpm -i --relocate /usr/java/jdk1.7.0_09= 
/tmp/jdk-7u9-linux-x64.rpm' returned 1: rpm: relocations must have a / 
following
 the =

I have tried this various ways so this is not the original way I tried it 
nor a half dozen other ways.  I "could" put it in hardcoded, but as I'm 
using this as only a smoke test, I'd like to be able to do this on the fly 
as it were.

I'm open to suggestions.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c76e1256-8cb7-426e-87b5-853fc064ca2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Using Puppetdb-terminus via rubygems...?

2014-12-08 Thread Matt Wise
Thanks for that Ken... This morning I found a gem 'md-puppetdb-terminus'
that someone has published that works perfectly, thankfully.

Matt Wise
Sr. Systems Architect
Nextdoor.com

On Mon, Dec 8, 2014 at 2:01 AM, Ken Barber  wrote:

> > We have entirely-gem based Puppet masters (no Ubuntu packages installing
> > Puppet)... we're trying to add in the puppetdb-terminus gemfile. We have
> it
> > configured, and installed:
> >
> >
> > # gem list | grep -i puppet
> > hiera-puppet (1.0.0)
> > puppet (3.7.3)
> > puppet-catalog-test (0.3.1)
> > puppet-lint (1.0.1)
> > puppet-syntax (1.3.0)
> > puppetdb-terminus (1.0)
> > puppetlabs_spec_helper (0.8.2)
> > rspec-hiera-puppet (1.0.0)
>
> That is not an official gem for puppetdb-terminus :-). Someone
> uploaded it in the past, I think its a dud.
>
> We don't really ship a rubygem, we do have a gemfile however:
> https://github.com/puppetlabs/puppetdb/tree/master/contrib/gem
>
> That can be used to create your own gem.
>
> > We're running into a problem with our Unicorn/Nginx config though...
> >
> > puppet-master[17213]: Could not configure routes from
> > /etc/puppet/routes.yaml: Could not find terminus puppetdb for indirection
> > facts
> >
> > Is there something special we need to do to the config.ru or something
> so
> > that it can find the puppetdb terminus from the gem thats installed?
>
> That just looks like the necessary ruby library files aren't in place,
> probably due to the bad gem.
>
> ken.
>
> --
> 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/830HwH-1JCY/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAE4bNTnH4ZQXnsGJpxB-W6SAypsJAsXtU0F%3DFoFXtcoRmTJbTA%40mail.gmail.com
> .
> 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/CAOHkZxPqGFaVDrAd%3D%3DwH0hTXmzR1LJ8QSKEf25dXSnYHj%3DKhEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] what gets run when a client can't connect?

2014-12-08 Thread JonY
Anything? Some cached set? 

-- 
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/f3a17926-b495-4cf1-baec-3ac11abca20f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: classification question

2014-12-08 Thread jcbollinger


On Monday, December 8, 2014 12:08:22 AM UTC-6, ezzobad wrote:
>
> Hi,
>
> This is the configuration:
> *Puppet version:* 3.7.2 (Puppet Enterprise 3.7.0)
> *OS on the puppet master and agent:* CentOS release 6.5 (Final)
> *Puppet server:* Cent200.example.com
> *Puppet node:* Cent201.example.com
>
> environment1:
> /etc/puppetlabs/puppet/environments/environment1/
> ├── manifests
> │   └── site.pp
> └── modules
>
> and site.pp is an empty file.
>
> A new node group: *nodegroup1 *(the parent is "*default*" and the 
> environment is "*environment1*".)
>
> If I assign a node to this node group (so the only matching node is 
> cent201.example.com).
>
> I expect to have no problem by running "puppet agent -t" on the client 
> side (because site.pp is empty), but looks like there is a conflict:
>
> *"Classification failed for cent201.example.com 
>  due to a classification conflict: The node was 
> classified into groups named "nodegroup1" and "PE MCollective" that defined 
> conflicting values for the environment, ."*
>


This question appears to be specific to Puppet PE (node groups must be a 
function of its integrated node classifier), so you should consider 
contacting PuppetLabs support.  Nevertheless, the error message appears to 
be telling you that you have assigned the node to groups that specify 
different 'environment' settings for it.

If it is both possible and sensible, then you should modify one or both of 
the groups so that they do not specify a particular environment for member 
nodes.  Groups that specify an environment for member nodes are 
incompatible with each other if they specify different ones (regardless of 
the contents of any environment's 'site.pp' file).


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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/93699e3c-f746-4d18-a90d-3a5d68d74134%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: if tagged scope and autoconfig module

2014-12-08 Thread jcbollinger


On Monday, December 8, 2014 5:26:05 AM UTC-6, Poil wrote:
>
>  Hey thanks,
>
> I don't understand : in template we can use "classes" that contain all 
> defined classes.
>


That is potentially misleading: the 

 
'classes' 

variable 

 
can give you all classes that have been declared *up to that point* in the 
course of evaluating manifests to build the target node's catalog.  There 
is no way to reliably get a list that correctly anticipates all classes 
that ultimately will be present in the final catalog, and it is very 
difficult to predict the the order in which classes will be added, so 
'classes' is far less useful than it may sound.  Even if you find that it 
works as you want for some nodes, with your current manifest set, it is 
extremely difficult to ensure or prove that it will work as you want for 
all nodes as your manifest set evolves.  When it fails, it will fail 
silently.

 

> Is it a good idea to add 
>
> if defined(Class['::apache']) { 
>   require apache;  
>   include collectd::apache
> }
>
>

No, it is a terrible idea.  The 'defined()' function 
 
has the same kind of evaluation-order dependency that templates' 'classes' 
variable has.  It should *never* be used to check whether classes or 
resources have been declared, and in fact there has been serious 
consideration of deprecating that aspect of its behavior.

You can use defined to test whether a class or resource type is *available* 
to be declared, but that requires a different form for the argument.  
Moreover, whether a class is available is a static characteristic of your 
manifest set, so it is of comparatively little value to test that 
dynamically.

 

> Or is a class is like other ressource, only defined when parsed ? (so 
> could be randomly defined when playing collectd::autoconfig) 
>
>

The terms "defined" and "declared" are rather slippery here, and the 
'defined()' function unhelpfully conflates their different meanings.  A 
resource *type* is "defined" if Puppet knows that type, either because it 
is a plugin type that is available to the catalog builder (built-in or from 
a module), or because it is a defined type whose definition has been 
evaluated or can be located by the autoloader.  Similarly, a class is 
"defined" if its definition (body) has been evaluated or can be located by 
the autoloader.  The use of 'defined()' to test these conditions is not 
dangerous or harmful.

On the other hand, a "resource" in the sense of an instance of a given 
resource type comes into existence only when Puppet evaluates a declaration 
of it.  Before completion of catalog building, it is impossible to predict 
which additional resources will be declared during the remainder of the 
catalog building process.  Similarly, a defined class will be present in 
the target node's catalog only after Puppet evaluates a declaration of it 
(an 'include', 'require', or 'contain' call, or a resource-style class 
declaration).  Before completion of catalog building, it is impossible to 
predict which additional classes will be declared during the remainder of 
the catalog building process.

People who are unfamiliar with these details are prone to suppose that 
'defined()' can inform about *all* the classes and/or resources in the 
final catalog, but that is impossible.  Parser functions are called as part 
of catalog building, and the desired information is not available until 
catalog building is complete.

 

> For the moment I've invert my code
> I have a class apache::collectd which call collectd::apache with an hash 
> as parameter
>
>

If that does the job you want it to do then it's fine.  You risk trouble 
with it, however, if class collectd::apache is declared anywhere else.  If 
you use a resource-style class declaration (as you must to specify any 
class parameters via your manifests) then that class declaration must be 
the *first* declaration of that class that is evaluated (else catalog 
building will fail).  We have already covered that evaluation order is 
difficult to predict.  If you have multiple declarations of a given class, 
then it is difficult to control the order in which they are evaluated.

If you need to dynamically determine which classes to declare, then the 
general solution is to decouple that determination from Puppet's evaluator: 
use an ENC or hiera to tell Puppet which classes are needed, and what their 
parameters should be.


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 view 

Re: [Puppet Users] puppet agent upgrade on windows

2014-12-08 Thread Jason Chinsen
Hey Dirk,

Thanks of the update, this is great news. If you do not mind, please can 
you share your puppet manifests and chocolatey package?

My puppet manifests for the windows part (this far) is relatively straight 
forward:

  package{'pe-agent':
ensure  => 
hiera('puppet_enterprise_agent_upgrade::pe::agent::version'),
provider=> 'chocolatey',
source  => $source,
  }


More over how do you, if you have to, deal with the .net4 issue that I 
posted?

Thanks,
Jason.







On Monday, December 8, 2014 9:32:26 AM UTC-5, Dirk Heinrichs wrote:
>
>  Am 05.12.2014 um 19:03 schrieb Rob Reynolds:
>
>  Trying to upgrade Puppet with Puppet on Windows is harder because 
> Windows locks files that are in use instead of letting you replace them in 
> place. 
>
>
> That's not true. Upgrading Puppet with Puppet on Windows works just fine. 
> Downgrade is a different story, depending on the versions involved. I've 
> alread done upgrades from 3.2.1 to 3.4.3 and I'm currently in the process 
> of upgrading ~150 Windows agents from 3.4.3 (32bit) to 3.7.3 (64bit) and I 
> don't see any problems related to file locks.
>
> Bye...
>
> Dirk
> -- 
>
> *Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
> *Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
> *Tel*: +49 2226 159 (Ansage) 1149
> *Email*: d...@recommind.com 
> *Skype*: dirk.heinrichs.recommind
> www.recommind.com
>  

-- 
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/2ae4e66f-3aaa-4d4e-8c6b-66ee82c8ff8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PuppetDB behind PgPool-II - anyone doing it?

2014-12-08 Thread Byron Miller
Is anyone running PuppetDB behind PgPool-II?   I see that puppetDB has an 
active/standby (read from standby) support but curious if anyone has any 
experience with pgpool-II cluster for PuppetDB - just wondering if there is 
anything i should look out for in testing it out.  

-byron

-- 
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/1dc034d4-7fb1-46fe-b82e-b5a81a5b29e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: classification question

2014-12-08 Thread Byron Miller
Since your default group is environment1, you don't need a site.pp as your 
ENC (puppet PE) has already classified this node to environment1.  It 
sounds like the modules in environment1 conflict with the modules in the PE 
Mcollective Node group which is usually defined for all nodes.  What do you 
have in your example1/modules?

On Monday, December 8, 2014 12:08:22 AM UTC-6, ezzobad wrote:
>
> Hi,
>
> This is the configuration:
> *Puppet version:* 3.7.2 (Puppet Enterprise 3.7.0)
> *OS on the puppet master and agent:* CentOS release 6.5 (Final)
> *Puppet server:* Cent200.example.com
> *Puppet node:* Cent201.example.com
>
> environment1:
> /etc/puppetlabs/puppet/environments/environment1/
> ├── manifests
> │   └── site.pp
> └── modules
>
> and site.pp is an empty file.
>
> A new node group: *nodegroup1 *(the parent is "*default*" and the 
> environment is "*environment1*".)
>
> If I assign a node to this node group (so the only matching node is 
> cent201.example.com).
>
> I expect to have no problem by running "puppet agent -t" on the client 
> side (because site.pp is empty), but looks like there is a conflict:
>
> *"Classification failed for cent201.example.com 
>  due to a classification conflict: The node was 
> classified into groups named "nodegroup1" and "PE MCollective" that defined 
> conflicting values for the environment, ."*
> Thanks in advance,
> Mehdi
>
>

-- 
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/6c8b613a-e6bf-4b93-9415-0674e835c4a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent upgrade on windows

2014-12-08 Thread Dirk Heinrichs
Am 05.12.2014 um 19:03 schrieb Rob Reynolds:

> Trying to upgrade Puppet with Puppet on Windows is harder because
> Windows locks files that are in use instead of letting you replace
> them in place. 

That's not true. Upgrading Puppet with Puppet on Windows works just
fine. Downgrade is a different story, depending on the versions
involved. I've alread done upgrades from 3.2.1 to 3.4.3 and I'm
currently in the process of upgrading ~150 Windows agents from 3.4.3
(32bit) to 3.7.3 (64bit) and I don't see any problems related to file locks.

Bye...

Dirk
-- 

*Dirk Heinrichs*, Senior Systems Engineer, Engineering Solutions
*Recommind GmbH*, Von-Liebig-Straße 1, 53359 Rheinbach
*Tel*: +49 2226 159 (Ansage) 1149
*Email*: d...@recommind.com 
*Skype*: dirk.heinrichs.recommind
www.recommind.com 

-- 
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/5485B666.6030505%40recommind.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet agent upgrade on windows

2014-12-08 Thread Jason Chinsen
Hello Rob

Thanks for the response. I will take a look at OpenTable's module for sure. 
I will also add -force on to my install line

For the third part, we ran into another issue, and I am not sure if this is 
spelled out any where but we pass in the version 3.3.2 vs latest and most 
of our servers didn't have .net 4.0 and above and we were getting errors on 
these servers along the lines of "chocolatey cannot parse the parameters 
with out .net 4.0 or higher"

Thanks again,
Jason.



On Friday, December 5, 2014 1:04:05 PM UTC-5, Rob Reynolds wrote:
>
>
>
> On Wed, Dec 3, 2014 at 9:43 AM, Jason Chinsen  > wrote:
>
>> Hello There,
>>
>> We started our puppet adventures at 3.2.x with both windows and linux 
>> boxes. Since then we have upgraded our Master to 3.3.2 and are looking to 
>> upgrade to 3.7. The linux agent upgrades are very simple, but I am running 
>> into issues with the windows agent upgrades :/ We have an Artifcatory based 
>> Nuget repo and all of the pipping is working. It looks like chocolatey is 
>> running an upgrade and it is not working. (it could very well be my nuget 
>> code :) as I am not a windows guy)
>>
>
> Trying to upgrade Puppet with Puppet on Windows is harder because Windows 
> locks files that are in use instead of letting you replace them in place. 
>
> There is a module from OpenTable (puppetversion[1]) that may need some 
> work to support the upgrade of PE agents as well, but it does a good job of 
> upgrading out of band.
>
> [1] https://forge.puppetlabs.com/opentable/puppetversion
>  
>
>>
>>
>> This is the output of the puppet run:
>> Debug: Executing 'C:\ProgramData\chocolatey\chocolateyInstall\chocolatey.cmd 
>> update pe-agent -source nuget-repo';
>>
>> Notice: /Stage[main]/Puppet_enterprise_agent_upgrade/Package[pe-agent]/
>> ensure: created
>>
>> Debug: /Stage[main]/Puppet_enterprise_agent_upgrade/Package[pe-agent]: 
>> The container Class[Puppet_enterprise_agent_upgrade] will propagate my 
>> refresh event
>>
>> And this is the output of the chocolatey run manually:
>>
>> C:\ProgramData\chocolatey\chocolateyInstall\chocolatey.cmd update pe-agent 
>> -source nuget-repo
>>
>> Nothing to update.
>>
>>
> Use -force. It may think things are good to go as it didn't detect errors.
>  
>
>> When I run an install vs upgrade it works as planned, with one lingering 
>> affect, where puppet tries to change 3.3.2 to latest all the time (this I 
>> can likely fix in the puppet manifest with a version number vs latest)
>> Debug: Executing 
>> 'C:\ProgramData\chocolatey\chocolateyInstall\chocolatey.cmd upd
>> ate pe-agent  -source nuget-repo'
>> Notice: 
>> /Stage[main]/Puppet_enterprise_agent_upgrade/Package[pe-agent]/ensure: e
>> nsure changed '3.3.2' to 'latest'
>> Debug: /Package[pe-agent]: The container 
>> Class[Puppet_enterprise_agent_upgrade]
>> will propagate my refresh event
>>
>>
>>
> This could be an issue with the provider itself. Would you follow up with 
> a note on puppet-chocolatey[2]?
>
> [2] https://github.com/chocolatey/puppet-chocolatey/issues
>
>  
>
>> Any help would be great
>> Thanks,
>> Jason.
>>
>> -- 
>> 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 view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/8be76ca0-4b98-494d-834a-2c910be423bd%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Rob Reynolds
> Developer, Puppet Labs
>
> *Join us at **PuppetConf 2015, October 5-9 in Portland, OR - *
> http://2015.puppetconf.com/
> *Register early to save 40%!*
>  

-- 
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/d9e2d6c3-f29f-4afd-9391-3c4db55ed10c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: if tagged scope and autoconfig module

2014-12-08 Thread Poil

Hey thanks,

I don't understand : in template we can use "classes" that contain all 
defined classes.

Is it a good idea to add

if defined(Class['::apache']) {
  require apache;
  include collectd::apache
}

Or is a class is like other ressource, only defined when parsed ? (so 
could be randomly defined when playing collectd::autoconfig)


For the moment I've invert my code
I have a class apache::collectd which call collectd::apache with an hash 
as parameter


Best regards,


Le 01/12/2014 16:15, jcbollinger a écrit :



On Monday, December 1, 2014 2:21:01 AM UTC-6, Poil wrote:

Hi,

I try to write an autoconfigure module (collectd) that depends on
other modules included for my node.



If you mean you are writing a module containing declarations that are 
conditioned on whether other classes or modules have been assigned to 
the target node's catalog, then my first and best advice is to abandon 
that idea altogether.  As a general rule, such declarations do not 
work reliably or well because the results of the necessary conditional 
tests depend on the order in which they are evaluated relative to 
other declarations in other manifests, and that order is very 
difficult to predict.  Instead, use Hiera or an ENC to dynamically 
specify the needed classes for each node.



So I've this class autoloaded for all my nodes :



In Puppet jargon term "autoloading" refers to the mechanism by which 
the catalog compiler locates the manifest file in which the definition 
of a given class or defined type resides (supposing that you have 
followed the layout conventions that allow it to do so).  That doesn't 
seem to be what /you/ mean by the term, so if your meaning matters to 
the question then it would be to your advantage to explain.



class collectd::client::autoconfig {
  require collectd::client

  if tagged('apache') {
require apache
include collectd::client::plugin::apache
  }
  if tagged('memcached') {
require memcached
include collectd::client::plugin::memcached
  }
(...)
}

But sometimes, on my old nodes, collectd is manually configured
(for an historical bad/good reason); so, for my old_node1 I have
"include collectd::client::plugin::apache" but I don't have the
"apache module" included; in this case my autoloader will detect
the tag "apache" in my class "include
collectd::client::plugin::*apache*" ...

It does not seem possible to use "::apache" in the tagged function
? Am I right ?
Have you got any idea for my case ? (I can add a parameter to
disable my autoconfig, but I'm looking for a better solution if it
exists.)



I haven't used tagged() much (or at all, really), but I don't think it 
does what you seem to think it does. The docs say it "tells you 
whether the current container is tagged with the specified tags", 
where the usual meaning of "container" in Puppet is a class, node, or 
catalog, so that function will not inform directly about whether a 
class other than the one in which the function call appears is tagged 
with the specified tag. Because objects inherit tags from their 
containers, however, it will indirectly inform about whether the 
object in which the call appears is declared by a class bearing the 
specified tag (recursively).  Classes can be declared multiple times 
in multiple places, however, so I cannot see how the function result 
could fail to be evaluation-order dependent.


In any case, be aware that classes are automatically tagged with every 
segment of their own qualified names, so yes, class 
collectd::client:plugin::apache will always bear the tags "collectd", 
"client", "plugin", and "apache" (among others) as will every object 
declared by that class.  I wouldn't expect the tagged() function to 
reject the tag "::apache", but that particular tag won't be present on 
any object unless you've set it explicitly.  None of that should not 
directly affect class collectd::client::autoconfig, though.  The only 
way it should see a tag 'apache' is if it is declared within a 
container bearing that tag.  Do you mean to say that class 
collectd::client:plugin::apache declares class 
collectd::client::autoconfig?  If so, why?



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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1f68a3ab-4976-470b-828c-2c36981d66f4%40googlegroups.com 
.

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.

[Puppet Users] Installing puppet on OSX

2014-12-08 Thread Mauricio Tavares
Do you use the .dmg from puppetlabs or, as suggested in 
https://ask.puppetlabs.com/question/67/unable-to-run-puppet-on-osx-mountain-lion/,
 
do

gem install puppet

Reason I ask is that I installed puppet in a 10.8 box and when I looked in 
the puppet error log file, I saw

from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
 
`require'
from /Library/Ruby/Site/puppet/parser/parser.rb:11
from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
 
`gem_original_require'
from 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
 
`require'

which makes me think it is having issues finding the right paths in ruby.

-- 
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/e6b9c5ef-3f7c-4338-a136-52d158009f29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] classification question

2014-12-08 Thread ezzobad
Hi,

This is the configuration:
*Puppet version:* 3.7.2 (Puppet Enterprise 3.7.0)
*OS on the puppet master and agent:* CentOS release 6.5 (Final)
*Puppet server:* Cent200.example.com
*Puppet node:* Cent201.example.com

environment1:
/etc/puppetlabs/puppet/environments/environment1/
├── manifests
│   └── site.pp
└── modules

and site.pp is an empty file.

A new node group: *nodegroup1 *(the parent is "*default*" and the 
environment is "*environment1*".)

If I assign a node to this node group (so the only matching node is 
cent201.example.com).

I expect to have no problem by running "puppet agent -t" on the client side 
(because site.pp is empty), but looks like there is a conflict:

*"Classification failed for cent201.example.com due to a classification 
conflict: The node was classified into groups named "nodegroup1" and "PE 
MCollective" that defined conflicting values for the environment, ."*
Thanks in advance,
Mehdi

-- 
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/d4c967af-ed55-407e-b8dc-df5b962eab79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Using Puppetdb-terminus via rubygems...?

2014-12-08 Thread Ken Barber
> We have entirely-gem based Puppet masters (no Ubuntu packages installing
> Puppet)... we're trying to add in the puppetdb-terminus gemfile. We have it
> configured, and installed:
>
>
> # gem list | grep -i puppet
> hiera-puppet (1.0.0)
> puppet (3.7.3)
> puppet-catalog-test (0.3.1)
> puppet-lint (1.0.1)
> puppet-syntax (1.3.0)
> puppetdb-terminus (1.0)
> puppetlabs_spec_helper (0.8.2)
> rspec-hiera-puppet (1.0.0)

That is not an official gem for puppetdb-terminus :-). Someone
uploaded it in the past, I think its a dud.

We don't really ship a rubygem, we do have a gemfile however:
https://github.com/puppetlabs/puppetdb/tree/master/contrib/gem

That can be used to create your own gem.

> We're running into a problem with our Unicorn/Nginx config though...
>
> puppet-master[17213]: Could not configure routes from
> /etc/puppet/routes.yaml: Could not find terminus puppetdb for indirection
> facts
>
> Is there something special we need to do to the config.ru or something so
> that it can find the puppetdb terminus from the gem thats installed?

That just looks like the necessary ruby library files aren't in place,
probably due to the bad gem.

ken.

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