[Puppet Users] Re: Announce: Puppet Server 2.2.0 available!

2015-11-23 Thread Ellison Marks
This was the missing information for me. Looking again on the auth.conf 
page, there is one link to that page, but it's down at the bottom of the 
allow-header-cert-info section. The writeup on the old auth.conf seems much 
more clear on how to use it: 
https://docs.puppetlabs.com/puppet/latest/reference/config_file_auth.html.

On Saturday, November 21, 2015 at 9:19:54 AM UTC-8, Jeremy Barlow wrote:
>
>
> ...
>
> If you were looking for even more detailed information on each of the 
> settings in the new rule format, you could also look here: 
> https://github.com/puppetlabs/trapperkeeper-authorization/blob/master/doc/authorization-config.md
> .
>
> ...
>
>

-- 
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/3f74f27c-d5a4-4dec-980e-7453ed402898%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Announce: Puppet Server 2.2.0 available!

2015-11-20 Thread Ellison Marks
As I didn't see it in the documentation there, is there any documentation 
on migrating settings from the old format and file to the new one?

On Thursday, November 19, 2015 at 5:44:01 PM UTC-8, Jeremy Barlow wrote:
>
> Puppet Server 2.2.0 is now available.
>
> This is a feature release which, based on contributions from Brice 
> Figureau, introduces a new Clojure-based auth.conf for Puppet Server.  This 
> initiative was previously described in the "RFC 22: HTTP Authorization 
> Framework" thread here:
> https://groups.google.com/forum/#!topic/puppet-dev/I4GVsA46C5g
>
> For more information on the new Clojure-based auth.conf, see:
> http://docs.puppetlabs.com/puppetserver/2.2/config_file_auth.html
>
> Big shout-outs to Brice and to those who provided feedback through the RFC 
> process to make this feature a reality.
>
> This release also contains a fix for the following memory leak issue:
>
>- SERVER-1006 - jruby instances flushed by max-requests-per-instance 
>do not get unregistered from pool
>
> See the complete release notes for details about these changes:
> https://docs.puppetlabs.com/puppetserver/2.2/release_notes.html
>
> For a list of all changes in this release, check out the JIRA page:
> https://tickets.puppetlabs.com/browse/SERVER/fixforversion/14343
>
> EOF
>

-- 
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/151dc0c2-aa02-42a2-af43-3c19cb08fee2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Anyone successfully use mcollective shell plugin with RHEL 5 & 6?

2015-09-22 Thread Ellison Marks
I'm in a similar situation. I haven't tried it yet, but it might work with 
the new AIO packages, since they vendor a newer ruby version, 
2.1.something, IIRC.

On Tuesday, September 22, 2015 at 7:54:39 AM UTC-7, kbrede wrote:
>
>
> The title pretty much says it all.  I mostly manage RHEL 5 & 6 boxes that 
> come with ruby 1.8.7.  The mcollective shell plugin requires ruby 1.9.
>
> SCL might work for the RHEL 6 systems but not 5.  Building everything from 
> source would work but certainly not ideal.  I took a stab at managing ruby 
> with rbenv yesterday and didn't manage to get the shell plugin to work.
>
> Any thoughts appreciated.
>
> Thanks,
>
> -- 
> Kent Brede
>
>
>
>
>

-- 
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/5d6cbdf2-e1a8-43fa-a942-afc9c49c3fbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: how were your puppet 3->4 upgrades?

2015-08-27 Thread Ellison Marks
Hmm, perhaps it's that I didn't upgrade puppetdb-terminus before trying to 
install puppetdb-termini then? I saved this from that time, and I not that 
the current version of puppetdb-terminus is 3:

Transaction Check Error:
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/face/storeconfigs.rb 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/face/node/status.rb from 
install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file from 
package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/catalog/puppetdb.rb
 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/facts/puppetdb.rb 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/node/puppetdb.rb 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/resource/puppetdb.rb
 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/reports/puppetdb.rb from 
install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file from 
package puppetdb-terminus-2.3.6-1.el6.noarch
  file /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb.rb 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/blacklist.rb 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/char_encoding.rb
 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/command.rb 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch
  file 
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/puppetdb/config.rb 
from install of puppetdb-termini-3.0.1-1.el6.noarch conflicts with file 
from package puppetdb-terminus-2.3.6-1.el6.noarch

On Wednesday, August 26, 2015 at 9:56:43 PM UTC-7, Michael Stanhke wrote:
>
>
>
> On Wed, Aug 26, 2015 at 9:54 PM, Michael Stahnke  > wrote:
>
>>
>>
>> On Wed, Aug 26, 2015 at 10:56 AM, Ellison Marks > > wrote:
>>
>>> We ran into a couple issues, all on centos6.
>>>
>>> Several package conflicts. Had to remove the puppetlabs-release package 
>>> to get the puppetlabs-release-pc1 package to install. New puppetserver 
>>> package didn't obsolete the old puppet-server package, had to uninstall 
>>> puppet-server package first. puppetdb-termini package doesn't appear to 
>>> obsolete puppetdb-terminus package. These might have been fixed in the 
>>> meantime.
>>>
>>
> The terminus package gets pulled along for the ride on upgrades (for RPMs) 
> and really just depends on the termini package. This was a work around to 
> allow people to still freshly install puppetdb-2.3.z if they so desired. 
> Basically, due to some crazy rules in the way rpm does obsoletes, we had to 
> keep the package around. It's not hurting anything and is pretty much just 
> an entry in the rpmdb at this point.
>
>
>
>> Just to be clear here, this was intentional for two reasons.
>>
>> 1. You can use puppetserver with the 3 series as well. 
>> 2. It was designed to be an opt-in (intentional choice not happening by 
>> accident; however puppet-server vs puppetserver is not helping make that 
>> extremely obvious :/  )
>>
>>  
>>
>>>
>>> If you're using mcollective-puppet, mcollective-puppet-agent can't find 
>>> puppet at new path, needed to add "plugin.puppet.command = 
>>> /opt/puppetlabs/bin/puppet agent" to the server.cfg on all mcollective 
>>> servers.
>>>
>>> The puppetdb upgrade was fairly painless. Though, the fact that they 
>>> dropped the v2 and v3 apis and completely altered the v4 api, as compared 
>>> to the v4-experimental api, so that essentially no existing tools could 
>>> work with the 

[Puppet Users] Re: how were your puppet 3->4 upgrades?

2015-08-26 Thread Ellison Marks
We ran into a couple issues, all on centos6.

Several package conflicts. Had to remove the puppetlabs-release package to 
get the puppetlabs-release-pc1 package to install. New puppetserver package 
didn't obsolete the old puppet-server package, had to uninstall 
puppet-server package first. puppetdb-termini package doesn't appear to 
obsolete puppetdb-terminus package. These might have been fixed in the 
meantime.

If you're using mcollective-puppet, mcollective-puppet-agent can't find 
puppet at new path, needed to add "plugin.puppet.command = 
/opt/puppetlabs/bin/puppet agent" to the server.cfg on all mcollective 
servers.

The puppetdb upgrade was fairly painless. Though, the fact that they 
dropped the v2 and v3 apis and completely altered the v4 api, as compared 
to the v4-experimental api, so that essentially no existing tools could 
work with the new puppetdb seems pretty boneheaded. What's the point of 
having an api if you drop it out the window?

Other than that, there were a few differences between the future parser in 
3.8 and the actual implementation in 4, but nothing to difficult to fix.

On Monday, August 24, 2015 at 1:00:30 PM UTC-7, Christopher Wood wrote:
>
> I am not seeing a large amount of blog entries complaining about this 
> upgrade, how has that gone for you? Is there anything you found 
> particularly painful? Would you have done anything different in retrospect? 
>
> I'm staring down a 3.7.2 -> 4.2.1 upgrade and after reading a number of 
> docs the back-of-the-envelope optimal upgrade path is as follows. If any of 
> you have commentary I am quite interested, otherwise I will try it and see 
> what happens. I feel like this might be more time-consuming work but less 
> brainpower effort than just yanking everything to 4.2. 
>
> 1) rpms up to puppet 3.8 
>
> PostgreSQL 8.4 to 9.4 
> PuppetDB 2.2.2 to 2.3.7 
> (puppetdb-terminus from 2.2.2 to 2.3.7) 
> Puppet 3.7.2 to 3.8.2 
>
> 2) enable the future parser 
>
> 3) replace puppet 3.8.2, passenger 5 with puppetserver 1.1.1 
>
> 4) replace puppetserver 1.1.1 with puppetserver 2.1.1 
>
> 5) upgrade PuppetDB from 2.3.7 to 3.0.2 
>
> 6) use the puppetlabs-puppet_agent forge module to upgrade agents to 4.2.1 
>
>
> My reading: 
>
> https://docs.puppetlabs.com/puppet/latest/reference/ 
>
> https://docs.puppetlabs.com/puppet/4.2/reference/upgrade_major_pre.html 
> https://docs.puppetlabs.com/puppet/4.2/reference/upgrade_major_server.html 
> https://docs.puppetlabs.com/puppet/4.2/reference/upgrade_major_agent.html 
> https://docs.puppetlabs.com/puppet/4.2/reference/upgrade_major_post.html 
>
> https://forge.puppetlabs.com/puppetlabs/puppet_agent 
>
> https://docs.puppetlabs.com/puppetdb/2.3/upgrade.html 
>
> http://docs.puppetlabs.com/puppetdb/3.0/upgrade.html 
>
> http://www.postgresql.org/docs/9.4/static/upgrading.html 
>
> (Although I may dump/restore the data via puppetdb since that's the actual 
> api to the data, we do not log in via PostgreSQL.) 
>

-- 
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/b21eff5b-49b4-4e98-8385-7850a96d0fa0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: hiera - data retrieved once or everytime a lookup is required

2015-08-20 Thread Ellison Marks
In general, every time a hiera* function is called, the backend's lookup 
function will be called. Any caching decisions are performed by the backend 
code. In the case of this http-backend, I see a few parameters relating to 
caching, specifically cache_timeout and cache_clean interval, so I'm 
guessing it performs some caching.

On Thursday, August 20, 2015 at 10:03:57 AM UTC-7, Andrew Hibbert wrote:
>
> Hi,
>
> I'm looking into hiera particularly the http backend (
> https://github.com/crayfishx/hiera-http).
>
> I'm wandering when using hiera if a single lookup is done at the start of 
> the puppet run or if everytime a value needs to be looked up the file is 
> accesed or in this case the http api queried?
>
> 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/eb8cf232-bbae-4ab5-a718-c685a6eb9fdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet4, Hiera3, and environments

2015-07-23 Thread Ellison Marks
No, the environment variable is set in the puppet.conf of every host. I'm 
not even sure what the effect would be of trying to define environment in 
hiera.

Please see: 
https://docs.puppetlabs.com/puppet/latest/reference/environments_assigning.html

On Thursday, July 23, 2015 at 3:21:27 PM UTC-7, Stack Kororā wrote:
>
> Greetings, 
>
> Thanks for the suggestions. I stepped out for a bit, but will try it as 
> soon as I get back. 
>
> On 07/23/2015 05:15 PM, Ellison Marks wrote: 
> > As far as I'm aware, in the default setup, there is no top level 
> > hieradata. as the comment says, the default datadir is 
> > 
> > /etc/puppetlabs/code/environments/%{environment}/hieradata 
> > 
> > So each environment will have it's own hieradata directory with it's own 
> > common.yaml. /etc/puppetlabs/code/hieradata will never be looked in. 
>
> OK. I guess I miss understood that. I thought I would be able to define 
> different types of environments which would be populated by that 
> %{environment} variable. Thus, I thought there was something in the top 
> level to tell the nodes which %{environment} variable (and subsequently 
> which hieradata directory) to use. 
>
>
> > I can see some possible ways to accomplish your goal. The braindead one 
> > is to just link common.yaml into each environment's hieradata. 
>
> So every host would be essentially defined in every common.yaml?? 
> Doesn't that seem a little weird? 
>
> > A slightly more interesting approach would look like this: 
> > 
> > --- 
> > :backends: 
> >   - yaml 
> > :hierarchy: 
> >   - "%{::environment}/%{::trusted.certname}" # or however you want files 
> > organized under the environments 
> >   - common 
> > 
> > :yaml: 
> > # datadir is empty here, so hiera uses its defaults: 
> > # - /etc/puppetlabs/code/environments/%{environment}/hieradata on *nix 
> > # - 
> > %CommonAppData%\PuppetLabs\code\environments\%{environment}\hieradata on 
> > Windows 
> > # When specifying a datadir, make sure the directory exists. 
> >   :datadir: /etc/puppetlabs/code/hieradata 
> > 
> > Then your hieradata folder would look like this: 
> > 
> > /etc/puppetlabs/code/hieradata/ 
> >   common.yaml 
> >   production/ 
> > node1.example.com 
> > node2.example.com 
> >   staging/ 
> > node3.example.com 
> >   dev/ 
> > node4.example.com 
> > 
>
> I will gladly give this a try as soon as I get a chance. 
>
> 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/89be8506-e94e-48da-a0df-1dce4f3cf962%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet4, Hiera3, and environments

2015-07-23 Thread Ellison Marks
Ah, sorry, forgot the .yaml part of the filenames. hieradata would actually 
look like this:

>
> /etc/puppetlabs/code/hieradata/
>   common.yaml
>   production/
> node1.example.com.yaml
> node2.example.com.yaml
>   staging/
> node3.example.com.yaml
>   dev/
> node4.example.com.yaml
>

-- 
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/5f1750a8-f26d-4606-bce5-21c4fb5789af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet4, Hiera3, and environments

2015-07-23 Thread Ellison Marks
As far as I'm aware, in the default setup, there is no top level hieradata. 
as the comment says, the default datadir is

/etc/puppetlabs/code/environments/%{environment}/hieradata

So each environment will have it's own hieradata directory with it's own 
common.yaml. /etc/puppetlabs/code/hieradata will never be looked in.

I can see some possible ways to accomplish your goal. The braindead one is 
to just link common.yaml into each environment's hieradata.

A slightly more interesting approach would look like this:

---
:backends:
  - yaml
:hierarchy:
  - "%{::environment}/%{::trusted.certname}" # or however you want files 
organized under the environments
  - common

:yaml:
# datadir is empty here, so hiera uses its defaults:
# - /etc/puppetlabs/code/environments/%{environment}/hieradata on *nix
# - %CommonAppData%\PuppetLabs\code\environments\%{environment}\hieradata 
on Windows
# When specifying a datadir, make sure the directory exists.
  :datadir: /etc/puppetlabs/code/hieradata

Then your hieradata folder would look like this:

/etc/puppetlabs/code/hieradata/
  common.yaml
  production/
node1.example.com
node2.example.com
  staging/
node3.example.com
  dev/
node4.example.com


On Thursday, July 23, 2015 at 2:23:34 PM UTC-7, Stack Kororā wrote:
>
> Greetings,
>
> I need help; I have been going in circles for too long now and I am sure 
> it is something silly that I over looked. I am attempting to use 
> environments with a new server build for Puppet 4 (never could get it 
> working under the Puppet 3 series; but I never put /that/ much effort into 
> it either). I have a lot of servers that I really don't want to manage by 
> hand or manually set anything per server. I would much rather have the 
> agent contact the puppet server to find out what group it should be in. 
> Yes, there is documentation on this but I can't get it to work and almost 
> all of my internet sleuthing has returned results for the old way of doing 
> things which doesn't appear to be working with Puppet 4 and Hiera 3. Any 
> help would be much appreciated.
>
> My objective: Have a top-level hiera source that tells agents which 
> environment to use for that host. Have hiera data in the environments 
> provide further details (ntp servers and what not) for configuring the host.
>
> From my understanding of this[1] it should work. I also found several 
> online blog examples doing something similar but using the old puppet3 way 
> of doing things.
> [1] https://docs.puppetlabs.com/guides/external_nodes.html
>
> Everything in the production environment works all the time with Hiera. No 
> other environment works with Hiera calls.  I have found it easier to test 
> for the ntp configuration because unless the system and environment are 
> "production", testing for the environment just gives 'nil' which doesn't 
> tell me squat about what is wrong. At least asking for the ntp gives me 
> errors to look at. :-)
>
> First, lets look at my top level hiera. Pretty default. You can see that I 
> attempted to force the location for the yaml, but that didn't work either 
> and I don't want _all_ the servers in the top level anyway.
>
> $ cat /etc/puppetlabs/code/hiera.yaml 
> ---
> :backends:
>   - yaml
> :hierarchy:
>   - "nodes/%{::trusted.certname}"
>   - common
>
> :yaml:
> # datadir is empty here, so hiera uses its defaults:
> # - /etc/puppetlabs/code/environments/%{environment}/hieradata on *nix
> # - %CommonAppData%\PuppetLabs\code\environments\%{environment}\hieradata 
> on Windows
> # - /etc/puppetlabs/code/hieradata
> # When specifying a datadir, make sure the directory exists.
>   :datadir:
>
>
>
> Now, lets look at the common file for the production environment.
>
> $ cat /etc/puppetlabs/code/environments/production/hieradata/common.yaml 
> ---
> ntp::servers:
>   - 192.168.109.2
>   - 192.168.109.3 
> environment: 'production'
>
> $ puppet apply --certname=puppetmaster01.me.fqdn -e 
> "notice(hiera('ntp::servers'))"
> Notice: Scope(Class[main]): [192.168.109.2, 192.168.109.3]
> Notice: Compiled catalog for puppetmaster01.me.fqdn in environment 
> production in 0.43 seconds
> Notice: Applied catalog in 0.09 seconds
>
> Great! Hiera is working! Now lets move that common file to the top level 
> so that we can specify which environment to use (again testing with ntp so 
> we get more than just 'nil' back).
>
> $ mv /etc/puppetlabs/code/environments/production/hieradata/common.yaml 
> /etc/puppetlabs/code/hieradata/common.yaml 
> $ puppet apply --certname=puppetmaster01.me.fqdn -e 
> "notice(hiera('ntp::servers'))"
> Error: Evaluation Error: Error while evaluating a Function Call, Could not 
> find data item ntp::servers in any Hiera data file and no default supplied 
>  at line 1:8 on node puppetmaster01.me.fqdn
>
>
> I found a blog that said the puppetserver has to be restarted after every 
> yaml change (I think that is /way/ off base as that hasn't been quite my 
> experience) but even doing a restart doesn't

[Puppet Users] Status of activemq

2015-07-22 Thread Ellison Marks
So, I'm going through the dance of upgrading to puppet 4.2 from 3.8 on 
CentOS 6, and I've run into a few things that brought up some questions. 
During the install, I ran into a number of collisions and incompatibilities 
between pc1 and the existing packages, but pertinent to this issue, I had 
to uninstall the old puppetlabs-release package in favor of the pc1 release 
package, as they were both claiming ownership of the signing key. It's 
mostly worked out, however, now I'm at the point where I'm working on 
migrating mcollective. Aside from some hiccups with involving 
incompatibilities with the new facter, I've got things talking to each 
other. Now though, I'm wondering about activemq. I've still got the version 
I had installed from the puppetlabs-deps repo, and it's working, I'm just 
not sure where I'm supposed to get updates at this point.

-- 
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/16492e87-eb64-45a1-9dc5-6d861560fafd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet rendered system unusable because of following a dependency tree removing an RPM

2014-12-02 Thread Ellison Marks
Could you please post the resource definitions that caused this? I ask 
because the yum provider should not do this with

ensure => 'absent'

but will with

ensure => 'purged'

while with the rpm provider, if you're forcing it for some reason, you 
could probably pass

uninstall_option => '--nodeps'


On Monday, December 1, 2014 2:11:31 PM UTC-8, Clay Stuckey wrote:
>
> I wrote two manifests for RHEL systems. One removed syslog. The other 
> installed rsyslog. The syslog removal followed a tragic dependency tree 
> removing RPMs such as coreutils, rpm, yum and pam. Once the servers 
> rebooted, they were left in an unusable state. I had to boot in rescue 
> mode, manually install files to get RPM going and reinstall about 300 RPMs 
> that were removed.
>
> Is there some way to blacklist the removal of certain critical RPMs that 
> might be found in a dependency tree?
>

-- 
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/6a65be92-3410-4fd2-9d7a-d3191c320de7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: PuppetDB 2.2 and pg_trgm extension

2014-10-01 Thread Ellison Marks
If you're using ubuntu, It would probably just be 

sudo apt-get install postgresql-contrib

You might need to restart postgres after that, not sure.


On Wednesday, October 1, 2014 2:10:40 PM UTC-7, Taylor Leese wrote:
>
> Ken - I'm using Ubuntu 14 and I installed PuppetDB via 
> https://forge.puppetlabs.com/puppetlabs/puppetdb. I also should have 
> noted that I got this error while upgrading from PuppetDB 2.1 to 2.2. 
> Postgres is version 9.3.5 if I remember correctly. Admittedly, I'm not very 
> familiar with Postgres.
>
> Ellison - How would I go about installing this "contrib" package to see if 
> that helps?
>
> - Taylor
>
> On Wednesday, October 1, 2014 10:39:07 AM UTC-7, Ellison Marks wrote:
>>
>> As a note, I installed from the postgres yum repositories, as the version 
>> in stock centos 6 was getting too old. I had to install the -contrib 
>> package to get that extension.
>>
>> On Wednesday, October 1, 2014 7:11:17 AM UTC-7, Ken Barber wrote:
>>>
>>> > I tried the same thing and got the error below. Any ideas? 
>>> > 
>>> > puppetdb=# create extension pg_trgm; 
>>> > 
>>> > ERROR:  could not open extension control file 
>>> > "/usr/share/postgresql/9.3/extension/pg_trgm.control": No such file or 
>>> > directory 
>>>
>>> Seems odd, pg_trgm should be shipped with PostgreSQL. Maybe its a bug 
>>> in that package or pg_trgm is shipped separately? 
>>>
>>> I can probably take a look here. What distro and distro release is 
>>> this exactly? Is this the PG shipped with the distro or is it from 
>>> PGDG upstream? 
>>>
>>> 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/d4c48b05-badf-4891-8193-acdf6507767d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: PuppetDB 2.2 and pg_trgm extension

2014-10-01 Thread Ellison Marks
As a note, I installed from the postgres yum repositories, as the version 
in stock centos 6 was getting too old. I had to install the -contrib 
package to get that extension.

On Wednesday, October 1, 2014 7:11:17 AM UTC-7, Ken Barber wrote:
>
> > I tried the same thing and got the error below. Any ideas? 
> > 
> > puppetdb=# create extension pg_trgm; 
> > 
> > ERROR:  could not open extension control file 
> > "/usr/share/postgresql/9.3/extension/pg_trgm.control": No such file or 
> > directory 
>
> Seems odd, pg_trgm should be shipped with PostgreSQL. Maybe its a bug 
> in that package or pg_trgm is shipped separately? 
>
> I can probably take a look here. What distro and distro release is 
> this exactly? Is this the PG shipped with the distro or is it from 
> PGDG upstream? 
>
> 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/1c86ca76-59e1-4b0e-85f7-503ce18a4a21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: If else statement if file exists

2014-08-18 Thread Ellison Marks
There are some parameters to the exec type that you could use, such as 
creates, onlyif and unless. However, the pseudocode you have above has the 
execs in your initial if block being run every time puppet runs, it seems. 
Is that really what you want?

On Monday, August 18, 2014 2:45:23 PM UTC-7, Eugene Sapozhnikov wrote:
>
>
>
> I am trying to figure out a way to use a if statement to run multiple sets 
> of commands depending if one file exists, but I am unable to find any good 
> documented ways of doing this.
>
> Basic rough layout of what i would like to achieve is this:
>
> Any help on getting the correct syntax for the if statement would be 
> appreciated 
>
>
>
> if file /volumes/vol1 exists { *exec { generate_loopback_tor: command => 
> "/sbin/losetup /dev/loop6 /volumes/tor", unless => "/sbin/losetup -a| 
> /bin/grep \"/volumes/tor\"", } *
>
> *exec { generate_encrypt_tor:command => " /sbin/cryptsetup create tor 
> ",unless => "/usr/bin/test -e /dev/mapper/tor", }exec { 
> generate_mount_tor: command => "/bin/mount /dev/mapper/tor /usr/local/tor", 
> unless => "/bin/mount | /bin/grep \"/usr/local/tor\"", } }* else { exec { 
> generate_empty_file_tor: command => "/bin/dd of=/volumes/tor bs=256M 
> count=0 seek=1", unless => "/usr/bin/test -e /volumes/tor", } exec { 
> generate_loopback_tor: command => "/sbin/losetup /dev/loop6 /volumes/tor", 
> unless => "/sbin/losetup -a| /bin/grep \"/volumes/tor\"", } exec { 
> generate_encrypt_tor: command => "/bin/echo \XX\" | 
> /sbin/cryptsetup create tor /dev/loop6 -", unless => "/usr/bin/test -e 
> /dev/mapper/tor", } exec { generate_zero_tor: command => "/bin/dd 
> if=/dev/zero of=/dev/mapper/tor count=512 bs=1024", unless => "/sbin/fdisk 
> -lu | /bin/grep \"/dev/mapper/tor\"", } exec { generate_mkfs_tor: command 
> => "/sbin/mke2fs -j -O dir_index /dev/mapper/tor ", onlyif => "/sbin/parted 
> -l | /bin/grep \"Error: /dev/mapper/tor: unrecognised disk label\"", } exec 
> { generate_mount_tor: command => "/bin/mount /dev/mapper/tor 
> /usr/local/tor", unless => "/bin/mount | /bin/grep \"/usr/local/tor\"", }
>  
>
> }
>
>

-- 
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/9f468d9c-cf7d-4ea6-96bc-1e4c1b6ee155%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Dashboard HTTP Basic Authentication Issues

2014-07-31 Thread Ellison Marks
Where it has the IP address 192.168.240.110 and the comment "# your puppet 
master's IP", you are meant to replace the give IP address with the IP 
address that your puppet master will be using to submit reports.

On Thursday, July 31, 2014 9:28:20 AM UTC-7, Stella wrote:
>
> Hi, I am trying to configure Puppet (3.6.2) Dashboard (1.2.23) with HTTP 
> Basic Authentication. I followed this document's "Security" section:
> http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html
>
> Basically, in Dashboard’s vhost configuration, I added those lines:
>
> 
> Order allow,deny
> Allow from 192.168.240.110 # your puppet master's IP
> Satisfy any
> AuthName "Puppet Dashboard"
> AuthType Basic
> AuthUserFile /etc/httpd/webaccess
> Require valid-user
> 
>
> Then I also created a user/password combination:
> htpasswd -c /etc/httpd/webaccess myusername
>
> Restart httpd service and Web access to the interface works fine. It 
> prompts me for username/password.
> However, when I ran "puppet agent --test", it failed. Puppet cannot get 
> nodes from the dashboard.
>
> Questions:
>
> 1. I googled and found this issue: 
> https://projects.puppetlabs.com/issues/4890. It points to another two 
> issues. Should I follow those two issues to fix my problem?
>
> issue #7173  -- Puppet cannot submit reports to dashboard. Modify 
> puppet/lib/puppet/reports/http.rb to properly parse usernames and passwords 
> out of the reporturl configuration option. 
> issue #5126  -- Puppet cannot get nodes from the dashboard. Modify the 
> external node script to properly parse usernames and passwords out of its 
> URL 
>
> 2. In the document, it has a notice
>
> Notice that you need to leave an access exception for your puppet 
> master. Although it’s possible to configure Puppet to use a password when 
> connecting to Dashboard (by adding a username and password to Puppet’s 
> reporturl and the URL used by the external_nodes script), this 
> currently requires patching Puppet’s http report handler; see issue 7173 
> for more details.
>
> I am a little confused here. "you need to leave an access exception for 
> your puppet master", does this refer to those two lines in the vhost config:
>
> Order allow,deny
> Allow from 192.168.240.110 # your puppet master's IP
>
> If yes, does that mean if I have those two lines to leave an access 
> exception for puppet master, I don't need to apply those two patches? But 
> now with those two lines, I still can't get puppet agent to get node from 
> dashboard. Maybe I should go ahead and apply those two patches?
>

-- 
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/b9c50c8c-fe2b-4c8c-947b-a2a0c08f6485%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] "Each" loop issue

2014-07-03 Thread Ellison Marks
That error means that the @server_roles variable is holding nil, as nil 
does not have an each method to call. Perhaps the new parser is evaluating 
things differently and not setting that variable.

On Tuesday, July 1, 2014 5:25:15 PM UTC-7, martin...@gmail.com wrote:
>
> Henrik, Tristan, thanks for your replies!
>
> I've added "parser = future" on both master and agent, inside [main], and 
> also I'm still using "--parser future", just in case.
> You both were right, and I'd use "notify" instead of "notice" in that 
> snippet.
>
> I think that parser option is working now, but it's breaking a template 
> that was working until now. So here I go again for your help, as I don't 
> think that the parser should be doing this.
>
> Here is the output of the new error:
>
> *Error: Could not retrieve catalog from remote server: Error 400 on 
> SERVER: Failed to parse template sudo/sudoers.erb:*
> *  Filepath: 
> /etc/puppet/environments/integration/modules/sudo/templates/sudoers.erb*
> *  Line: 42*
> *  Detail: undefined method `each' for nil:NilClass*
> * on node test01*
>
> Here is the line 42 of the template file:
>
> ...
> DEPLOY ALL = NOPASSWD: /usr/bin/service apache2 restart
> DEPLOY ALL = NOPASSWD: /usr/bin/service php5-fpm restart
> *<% @server_roles.each do |role| -%>  <== line 42*
> <% if role == "testuser" %>
> DEPLOY ALL = NOPASSWD: /usr/bin/service tomcat7 restart
> DEPLOY ALL = NOPASSWD: /usr/bin/service tomcat7 start
> DEPLOY ALL = NOPASSWD: /usr/bin/service tomcat7 stop
> <% end %>
> ...
>
> I've tried with "each @server_roles" too, but still broken.
> May be enabling the extra features of the parser, puppet tries to do 
> something else with the word "each", but I'm totally lost here.
>
> Is this behavior expected? Is there any way that I can debug any deeper on 
> this?
>
> Again, thanks in advance for any help.
>
> Cheers,
>
> Martin
>
>
>
>
> El martes, 1 de julio de 2014 12:27:16 UTC-3, Henrik Lindberg escribió:
>>
>> On 2014-30-06 23:58, martin...@gmail.com wrote: 
>> > Hi Puppet users! 
>> > 
>> > I'm having an issue with "each loop" on puppet, and I just can't figure 
>> > out what am I doing wrong, so any help will be much appreciated. 
>> > 
>> > Here is my test.pp example: 
>> > 
>> > class mytestclass { 
>> >$stuff = ["1", "2", "3"] 
>> > 
>> >each($stuff) |$x| { 
>> >  notice { $x: } 
>>
>> You probably meant 
>>
>> notify { $x: } 
>>
>> notice is a logging function, and you can do 
>>
>> notice $x 
>>
>> >} 
>> > } 
>>
>> For this snippet to work, you must also do 
>>
>> include mytestclass 
>>
>> outside the scope of that class, otherwise nothing happens. 
>>
>> > 
>> > And here is the output when trying to apply it: /"Error: Could not 
>> parse 
>> > for environment production: Could not match |$x| at /tmp/test.pp:10"/ 
>> > 
>> Sounds like --parser future is not in effect. 
>>
>> > I've "parser = future" inside my puppet.conf, ruby-rgen is installed in 
>> > both client and server. I'm also running it with "--parser future" on 
>> > the client, but no joy. 
>> > I've  been playing with variants like "$stuff.each", using hashes, and 
>> a 
>> > few more desperate ideas. 
>> > 
>> > OS: Ubuntu 12.04 
>> > Puppet: 3.5.1-1puppetlabs1 
>> > ruby-rgen: 0.6.5-1puppetlabs1 
>> > 
>> > 
>> > I'm clearly missing something, but can't find what. 
>> > 
>>
>> As another poster suggested, maybe you have the parser=future setting in 
>> the wrong section. 
>>
>> Hope the above helps 
>>
>> - henrik 
>>
>> -- 
>>
>> Visit my Blog "Puppet on the Edge" 
>> http://puppet-on-the-edge.blogspot.se/ 
>>
>>

-- 
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/6e72c1a9-e6d9-4f88-92e9-9fb4d1624e53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] what is actually "undefined method 'include?' for nil:NilClass on node" error?

2014-05-30 Thread Ellison Marks
It's weird, but it looks like the hostname isn't being defined, or isn't 
being sent properly. See

"info: Expiring the node cache of"

With just a blank afterwards. Does running facter on the affected node show 
anything unusual?



On Friday, May 30, 2014 3:18:58 PM UTC-7, Sans wrote:
>
>
>
> On Friday, May 30, 2014 11:13:51 PM UTC+1, Henrik Lindberg wrote:
>>
>>
>> Ok, then webrick is not the cause of your problem. 
>>
>> Run with --trace set to get a ruby stack trace. That will help to find 
>> what is causing the problem. 
>>
>> - henrik 
>>
>
> Yes, that was the output from --trace and that's why I where I'm a bit 
> stuck as it's not saying that much.
>
> -San
>

-- 
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/a95808c8-e9e5-4018-be67-74abb79759f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet 3.6.0... and scaling?

2014-05-22 Thread Ellison Marks
Ah, whoops. Shame on *me* for not remembering what version they were 
talking about in that thread.

On Thursday, May 22, 2014 12:21:37 PM UTC-7, Daniele Sluijters wrote:
>
> The environment caching is already there, use the environment_timeout 
> setting. Mine is set to unlimited and I reload at deploy time by touching 
> tmp/restart.txt. This so far seems to work really well.
>
> On Thursday, 22 May 2014 19:26:47 UTC+2, Tristan Smith wrote:
>>
>> Dang. That does look an awful lot like my issue. I am in fact using 
>> directory environments (mostly because of the screaming deprecation 
>> warnings telling me I was a bad man if I didn't).
>>
>> :/ Shame on me for using a .0 release.
>>
>> On Thursday, May 22, 2014 10:17:24 AM UTC-7, Ellison Marks wrote:
>>>
>>> Hey, I think I remember another thread that mentioned that there were 
>>> some performance issues with directory environments. Basically, the next 
>>> 3.6 release will add a caching option that mostly alleviated the problem 
>>> for the OP from that thread.
>>>
>>> https://groups.google.com/forum/#!topic/puppet-users/wzy8NPWauu4
>>>
>>> On Thursday, May 22, 2014 9:59:25 AM UTC-7, Tristan Smith wrote:
>>>>
>>>> After much hacking to get directory environments settled and the 
>>>> manifest directory in place, I rolled Puppet 3.6 to our puppetmasters last 
>>>> night.
>>>>
>>>> One of our puppetmasters has nearabouts 1000 clients, runs passenger 
>>>> under apache 2.2 (ruby 1.8.7, sadly, thanks CentOS), and normally doesn't 
>>>> really notice puppet running - basically peaks out at 20% CPU usage.
>>>>
>>>> Under 3.6, even doubling the passenger worker count, it couldn't keep 
>>>> up with the load - I started running out of apache procs due to workers 
>>>> stuck in waiting mode and they were all just hanging waiting for a 
>>>> passenger worker to free up. CPU usage on the system capped out.
>>>>
>>>> Strace -c on the passenger workers had them spending 30% of their time 
>>>> in clone() and 60% in wait4(), fwiw.
>>>>
>>>> I'm going to be digging to figure out what in hell changed to cause 
>>>> this, but has anyone else experienced a significant change in performance 
>>>> under 3.6?
>>>>
>>>> --Triss
>>>>
>>>

-- 
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/1cec9580-c97f-4ed1-8d08-7f94fe3e9cba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet 3.6.0... and scaling?

2014-05-22 Thread Ellison Marks
Hey, I think I remember another thread that mentioned that there were some 
performance issues with directory environments. Basically, the next 3.6 
release will add a caching option that mostly alleviated the problem for 
the OP from that thread.

https://groups.google.com/forum/#!topic/puppet-users/wzy8NPWauu4

On Thursday, May 22, 2014 9:59:25 AM UTC-7, Tristan Smith wrote:
>
> After much hacking to get directory environments settled and the manifest 
> directory in place, I rolled Puppet 3.6 to our puppetmasters last night.
>
> One of our puppetmasters has nearabouts 1000 clients, runs passenger under 
> apache 2.2 (ruby 1.8.7, sadly, thanks CentOS), and normally doesn't really 
> notice puppet running - basically peaks out at 20% CPU usage.
>
> Under 3.6, even doubling the passenger worker count, it couldn't keep up 
> with the load - I started running out of apache procs due to workers stuck 
> in waiting mode and they were all just hanging waiting for a passenger 
> worker to free up. CPU usage on the system capped out.
>
> Strace -c on the passenger workers had them spending 30% of their time in 
> clone() and 60% in wait4(), fwiw.
>
> I'm going to be digging to figure out what in hell changed to cause this, 
> but has anyone else experienced a significant change in performance under 
> 3.6?
>
> --Triss
>

-- 
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/5fea7228-4800-4b88-8e99-766636b43df7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Enumerating Puppet Arrays

2014-04-02 Thread Ellison Marks
Potentially easier, you could use prefix($scripts, '/path/'), which comes 
from puppetlabs-stdlib to put the path on all members of the array. Then 
just pass the now prefixed array to the defined type described above. This 
avoids storing the script names externally, which may or may not be 
desirable. If the scripts you want in cron might change now and then, then 
the external lookup is the better way.

On Wednesday, April 2, 2014 4:07:04 PM UTC-7, Christopher Wood wrote:
>
> Check out defined types. For a faked together example: 
>
> define make_it_so::make_one_thing_so { 
>   cron { $title: 
> command => "/path/$title", 
> user=> 'deploy', 
> hour=> '*/4', 
> minute  => '0', 
>   } 
> } 
>
> http://docs.puppetlabs.com/learning/definedtypes.html 
>
>
> Then add a data structure which you will presumably retrieve from hiera: 
>
> $scripts = { 
>   'a.rb' => {}, 
>   'b.rb' => {}, 
> } 
>
> http://docs.puppetlabs.com/hiera/1/ 
>
>
> Then use create_resources to make as many of these as you need, without 
> putting arrays or hashes in your puppet code ($scripts here will be 
> automatically looked up via hiera): 
>
> class make_it_so ( 
>   $scripts = {} 
> ) { 
>   create_resources('make_it_so::make_one_thing_so', $scripts) 
> } 
>
> http://docs.puppetlabs.com/references/latest/function.html#createresources 
>
>
>
>
> On Wed, Apr 02, 2014 at 03:03:42PM -0700, Joaquin Menchaca wrote: 
> >Is there a way to do something like this: 
> > 
> >class make_it_so { 
> >  $scripts = ["a.rb", "b.rb"] 
> > 
> >  cron { $scripts: 
> >command => "/path/$scripts", 
> >user=> 'deploy', 
> >hour=> '*/4', 
> >minute  => '0', 
> >  } 
> > 
> >} 
> > 
> >The attribute usage of the array will just take the entire array 
> >concatenated together. :'( 
> > 
> >I would like to have each resource declaration have a correspond to a 
> >matching element of the array 
> > 
> >I would like the attribute with $scripts to match to the iteration of 
> the 
> >resource declaration $scripts. 
> > 
> >-- 
> >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 [1]puppet-users...@googlegroups.com . 
> >To view this discussion on the web visit 
> >[2]
> https://groups.google.com/d/msgid/puppet-users/6db6cb93-e9c4-4a42-91e7-36aa7583b5e1%40googlegroups.com.
>  
>
> >For more options, visit [3]https://groups.google.com/d/optout. 
> > 
> > References 
> > 
> >Visible links 
> >1. mailto:puppet-users+unsubscr...@googlegroups.com  
> >2. 
> https://groups.google.com/d/msgid/puppet-users/6db6cb93-e9c4-4a42-91e7-36aa7583b5e1%40googlegroups.com?utm_medium=email&utm_source=footer
>  
> >3. 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/d3cc21c1-05d9-4c58-8e5f-65e60254c391%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: hash of arrays to call a define

2014-03-24 Thread Ellison Marks
Normally, I'd say create_resources(), but that needs a hash of hashes, not 
a hash of arrays. Might I ask what the numbers represent, if they aren't 
present in the define?

On Sunday, March 23, 2014 10:10:24 PM UTC-7, backg...@gmail.com wrote:
>
> Given this hash of arrays:
>
> $players = {
>   'joe' => [
> '150',
> '200',
>   ],
>   'janet' => 
> '120',
> '240',
>   ],
> }
>
> ... and given a define that's like this: 
>
> profile::generate {$player:
>   source => "puppet:///modules/$module_name/$player"
> }
>
> ... how do you call profile::generater without hardcoding 2 defines? 
>
>
>

-- 
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/e6143da3-1ac7-4380-8a31-6bb39cf9575f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: installing a package nmap on ubuntu

2013-10-18 Thread Ellison Marks
What version of ubuntu are you running. This type of thing crops up in the 
older/unsupported versions, IIRC.

On Friday, October 18, 2013 12:30:37 AM UTC-7, kampy wrote:
>
> Hi, i am new to puppet please help me how to resolve this issue. 
> below is my script 
> class nmap {
> package { 'nmap':
> ensure => installed,
> }
>
> }
> include nmap
>
> below is the error it is failing 
>
> err: /Stage[main]/Nmap/Package[nmap]/ensure: change from purged to present 
> failed: Execution of '/usr/bin/apt-get -q -y -o 
> DPkg::Options::=--force-confold install nmap' returned 100: Reading package 
> lists...
> Building dependency tree...
> Reading state information...
> The following NEW packages will be installed:
>   nmap
> 0 upgraded, 1 newly installed, 0 to remove and 159 not upgraded.
> Need to get 1643 kB of archives.
> After this operation, 6913 kB of additional disk space will be used.
> WARNING: The following packages cannot be authenticated!
>   nmap
> E: There are problems and -y was used without --force-yes
>
> notice: Finished catalog run in 1.16 seconds
>
> please help in understanding what i am missing here to install this package
>
> Thanks in advance 
>
> Regards,
> kampy
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: pypuppetdb 0.0.4 / puppetboard 0.0.2

2013-10-15 Thread Ellison Marks
Just upgraded, looks awesome!

On Tuesday, October 15, 2013 12:07:19 AM UTC-7, Daniele Sluijters wrote:
>
> Hello everyone,
>
> It's been way to long since the release but I finally had some time to 
> sort a few things out and release updates to both pypuppetdb and 
> Puppetboard.
>
> For those of you who have no idea what this is about:
>  * pypuppetdb is a library to work with the PuppetDB API in Python;
>  * Puppetboard is meant as a replacement to Puppet Dashboard leveraging 
> PuppetDB through pypuppetdb as its datasource.
>
> New is PuppetDB 1.5 (API v3) compatibility. None of the new features of 
> API v3 have been implemented yet, that's going to be the goal for the 
> coming weeks but everything that used to be possible with API v2 + 
> Experimental is now available over API v3. Because PuppetDB 1.5 dropped the 
> /experimental endpoints those have been removed from pypuppetdb too, even 
> for older versions of PuppetDB.
>
> Puppetboard has gained a metrics tab and facts now have pretty pie-charts 
> as well as an assorted set of small fixes and improvement across the board.
>
> Once pypuppetdb has gained support for all the new features in API v3 
> there are going to be some significant changes to Puppetboard, both in its 
> capabilities and the UI. For those of you who will be at Puppet Camp 
> London in November, I'm hoping I'll be able to show you at least some of 
> that.
>
> As usual you can get the code from:
>  * pypuppetdb: https://github.com/nedap/pypuppetdb or `pip install 
> pypuppetdb`
>  * puppetboard: https://github.com/nedap/puppetboard
>
> -- 
> Daniele Sluijters
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: [mcollective] mc does not discover any nodes

2013-10-15 Thread Ellison Marks
To get the agent, you need to install mcollective-service-agent as well, 
not just mcollective-service-common. Don't forget to restart the 
mcollective daemon after installing.

On Thursday, October 10, 2013 2:34:07 AM UTC-7, Vincent Nawrocki wrote:
>
> Hi all !
>
> I'm working on mcollective for a few days and I have a problem using 
> agents.
>
> I'm on CentOS 6.4, using activeMQ 5.8.0 and mcollective 2.2.4.
>
> I Installed the service agent using yum on the client :
> yum install mcollective-service-common
>
> I can see it in the doc list using "mco plugin doc".
>
> But now I want to use it and nodes never respond :
>
> --
> [root@poste306 puppet]# mco ping
> poste306.s11.pfd time=161.65 ms
> poste302.s11.pfd time=163.25 ms
> poste304.s11.pfd time=166.48 ms
>  ping statistics 
> 3 replies max: 166.48 min: 161.65 avg: 163.79
>
> [root@poste306 puppet]# mco rpc service status service=httpd
> Discovering hosts using the mc method for 2 second(s)  0
>
> No request sent, we did not discover any nodes.
>
> ---
>
> I don't see what's wrong. No input in the mcollective.log file. Nothing on 
> both servers and client sides.
>
> I appreciate any help or hint about this issue.
>
> Regards,
> Vincent.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: install certificate - unless not working

2013-10-03 Thread Ellison Marks
Might have something to do with the pipe? According to the docs, the 
windows provider directly executes the binary. The pipe might be a function 
of the shell... You might try using the alternate syntax they suggest and 
execute your command through cmd.exe.

http://docs.puppetlabs.com/references/latest/type.html#exec-providers

On Thursday, October 3, 2013 8:04:17 AM UTC-7, Armindo Silva wrote:
>
> Hi
>
> I am installing the OpenVPN's certificate if it is not present with the 
> following exec:
>
>
> exec { 'OvpnCert':
>   command => 'certutil.exe -addstore TrustedPublisher 
> c:\installers\OpenVPN_Cert.cer',
>   require => File[ 'c:/eufinity/installers/'],
>   unless  => 'certutil.exe -verifystore TrustedPublisher | findstr 
> OpenVPN',
>   }
>
> Even when *certutil.exe -verifystore TrustedPublisher | findstr 
> OpenVPN*returns 0 ( 
> *echo %errorlevel%* after running the unless cmd: returns *0* when the 
> OpenVPN is present and *1* otherwise), the exec always runs.
> What am I doing wrong?
>
> Thank you.
> Armindo
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: hiera hash into multiple templates

2013-09-27 Thread Ellison Marks
Perhaps make it a defined type and use the create resources function. I 
can't really think of any other way to correctly scope the various 
parameters. You'd have to tweak your yaml slightly...

---
#icecast
type: vanilla

  icecast_clients: 

  client1:
cid: 999
cid_hostname: icecast1
cid_ipaddress: 192.168.254.12
password: WhatYoSay?
port: 200
concurrency: 50
num_encoders: 2
  client2:
cid: 998
cid_hostname: icecast2
cid_ipaddress: 192.168.254.13
password: NoWay!
port: 201
concurrency: 25
num_encoders: 3



define icecast_client($cid, $cid_hostname, $cid_ipaddress, $password, 
$port, $concurrency, num_encoders) {
  file { "/home/icecast/${cid}.icecast.xml":
ensure => file,
content => template('icecast/icecast.xml.erb'),
  }
}

$icecast_clients = hiera('icecast_clients')
create_resources(icecast_client, $icecast_clients)

You could use hiera_hash if you wanted to merge multiple levels of your 
hierarchy.
You could also use the cid in place of client1, client2, etc, then you 
could remove the $cid parameter in the defined type and just use $title.

On Friday, September 27, 2013 11:52:09 AM UTC-7, Greg Coit wrote:
>
> Hi all,
>
> I've started testing with using Hiera for storing configs and I have a 
> noobish question.
>
> Here's an example of my yaml file (/etc/puppet/hieradata/vertname.yaml):
>
> ---
> #icecast
> type: vanilla
> client1:
>   cid: 999
>   cid_hostname: icecast1
>   cid_ipaddress: 192.168.254.12
>   password: WhatYoSay?
>   port: 200
>   concurrency: 50
>   num_encoders: 2
> client2:
>   cid: 998
>   cid_hostname: icecast2
>   cid_ipaddress: 192.168.254.13
>   password: NoWay!
>   port: 201
>   concurrency: 25
>   num_encoders: 3
>
>
> Now, I'd like to be able to create a config file for each client:
>
> file { '/home/icecast/${cid}.icecast.xml':
>   ensure  => file
>   content => template('icecast/icecast.xml.erb'),
> }
>
>
> The question is how do I put the above into a loop which iterates over the 
> client arrays in the hiera file (each client config file should get a 
> unique cid, cid_hostname, etc)?
>
> Thanks in advance!!
>
> Greg
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: hiera oddities

2013-09-27 Thread Ellison Marks
Prefix doesn't return a string, it returns an array. I think this gets 
stringified in the error message, but it screws up the lookup. Try 
hiera($role_value[0]).

On Friday, September 27, 2013 9:32:12 AM UTC-7, Tom Hanstra wrote:
>
> I'm having a real trouble getting hiera to work as expected.
>
> My current setup has a puppet master and an agent.  On both I have the 
> same /etc/hiera.yaml file linked into the /etc/puppet directory.  I've also 
> been able to confirm that hiera is seeing the right json files in 
> /var/lib/hiera.
>
> What I'm seeing right now is that if I hard code a value (in my case a 
> value called "role_puptest1").  In the class I'm working on, if I hardcode 
> that value into the hiera lookup:
>
> $server_role = hiera('role_puptest1')
>
> then puppet  agent runs just fine.  However, if I build the value 
> "role_puptest1" from other information, for instance like this:
>
>$role_value = prefix([$hostname],'role_')
>$server_role = hiera($role_value)
>
> I get this error when running the puppet agent:
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find data item role_puptest1 in any Hiera data file and no 
> default supplied at 
> /etc/puppet/modules/server/iptables2/manifests/init.pp:9 on node 
> puptest1.library.nd.edu
>
> Based on the error, it is parsing the role_value properly (still has 
> "role_puptest1"), but it is not finding the value in the file.  At the same 
> time, command line hiera on both my agent and my master find the file 
> properly:
>
> puptest1 800$ hiera role_puptest1
> role_LOCKSS
>
> So, why is the generated value which comes up with the same string of data 
> not finding the record in the hiera data file?
>
> I'm using hiera 1.2.1 and puppet 3.2.4 on RHEL 6.
>
> Thanks,
> Tom
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Vagrant+Puppet using RVM to install Apache2+Passenger fails

2013-09-26 Thread Ellison Marks
At a guess, you're simply including things in a specific order, which has 
no effect on the order that puppet will attempt to apply them. Try giving 
things an explicit order with before/after, require/subscribe, or ->/~>.

On Monday, September 23, 2013 5:19:45 AM UTC-7, Christian wrote:
>
> Hi all,
>
> hope to be on the right place here..
>
> I'm playing with Vagrant and Puppet for a small Apache2+Passenger Server 
> above ubuntu-precise-32. I like to get this working for a small group of 
> developers.
>
> I confess, I didn't read the whole documentation about puppet, but I've 
> browsed the whole Internet twice! ...about this problem. I only want to 
> get this small environment working at the moment, so I don't want to spend 
> much time in reading and coding examples. Maybe some of you can help me a 
> bit.
>
> The manifest is working so far, but the Installation of passenger fails 
> with this error:
>
> notice: 
> /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.load]/ensure:
>  
> created
> err: /Stage[main]/Apache::Service/Service[httpd]: Failed to call refresh: 
> Could not start Service[httpd]: Execution of '/etc/init.d/apache2 start' 
> returned 1:  at /tmp/vagrant-puppet/modules-0/apache/manifests/service.pp:28
> notice: 
> /Stage[main]/Install-rvm/Rvm_gem[ruby-1.9.3-p448@mygemset/ruby-hmac]/ensure: 
> created
> notice: /Stage[main]/Postconfig/Exec[use-rubyver]/returns: executed 
> successfully
> notice: /Stage[main]/Postconfig/Exec[gemset-use]/returns: executed 
> successfully
> err: /Stage[main]/Postconfig/Exec[passenger-install-apache]/returns: 
> change from notrun to 0 failed: rvm gemset use mygemset && 
> passenger-install-apache2-module --auto returned 1 instead of one of [0] at 
> /tmp/vagrant-puppet/manifests/development.pp:62
>
> The passenger-install-apache2-module command runs smoothly if I fire it in 
> a shell on the vagrant box. I think thats the problem for the first error. 
> Apache cannot start because of the missing module.
>
> The manifest I use is this:
> http://pastie.org/private/xcsmy8b6lwivymegeqcrrw
>
> Thanks in advance!
>
> Chris
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet nodes unable to send report to Puppet Master running under Passenger

2013-09-23 Thread Ellison Marks
Anything showing up in your logs?

On Friday, September 20, 2013 2:17:32 PM UTC-7, F. Y. wrote:
>
> Hello all,
>
> I recently switched to running puppet master using Passenger. However, I 
> am seeing agents unable to send reports after a bunch of 'master' processes 
> starting to accumulate and eat all the RAM and swap space.
>
> Error: Could not send report: Error 500 on SERVER:  "-//IETF//DTD HTML 2.0//EN">
> 
> 500 Internal Server Error
> 
> Internal Server Error
> The server encountered an internal error or
> misconfiguration and was unable to complete
> your request.
> Please contact the server administrator,
>  [no address given] and inform them of the time the error occurred,
> and anything you might have done that may have
> caused the error.
> More information about this error may be available
> in the server error log.
> 
> Apache/2.2.22 (Ubuntu) Server at puppetmaster.example.com Port 
> 8140
> 
>
> These are the 'master' processes launched:
>
> root@puppetmaster:/etc/puppet# ps aufx | grep master
> root  4352  0.0  0.0   6504   616 pts/1S+   17:07   0:00  |   
> \_ grep --color=auto master
> puppet2100 14.5  7.2 4703940 1793068 ? D15:06  17:34 master   
> 
> 
> puppet2145  4.4  7.6 4434900 1893028 ? D15:08   5:17 master   
> 
> 
> puppet2156  3.4  8.0 7484288 1986164 ? D15:08   4:08 master   
> 
> 
> puppet2182  2.9  8.7 3612508 2169308 ? D15:08   3:29 master   
> 
> 
> puppet2191  4.0 10.7 4893500 2661364 ? D15:08   4:49 master   
> 
> 
> puppet2200 24.8 16.0 12025276 3953904 ?D15:08  29:39 master   
> 
> 
> puppet3585  0.1  0.3 178984 81944 ?S16:08   0:06 master   
> 
> 
> puppet3603  0.2  0.3 178892 88320 ?S16:08   0:07 master   
> 
> 
> puppet3612  0.1  0.3 178196 84316 ?S16:08   0:03 master 
>
> Puppet Master is running on Ubuntu 12.04, and is running Puppet 3.3.0.
>
> Can anyone please advise how to troubleshoot this? I am at my wit's end 
> here.
>
> Thanks.
>
> F.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Facter value at Catalog compilation

2013-09-20 Thread Ellison Marks
Post the code for the custom fact?

On Thursday, September 19, 2013 2:23:15 PM UTC-7, Frederiko Costa wrote:
>
> Hi,
>
> I've got a facter shipped with a custom module. This factor returns the 
> version of a determined package. It returns nil if the package is not 
> installed yet.
>
> When running for the first time, assuming the package is not installed, 
> the facter will be still nil. When referring to that facter in the manifest 
> - for example in a file resource - it fails, because it has been compiled 
> with a nil value. When the package is already installed, it works great.
>
> Just out of curiosity, is there any workaround other than if/else 
> statements?
>
> Thanks,
> -frederiko
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: /var/opt/lib/pe-puppet/reports/$hostname yaml files not recent

2013-09-17 Thread Ellison Marks
By default, reports are not stored on the individual nodes, but sent to the 
master. There are some situations where local files get created, mostly 
involving the node running standalone. Not sure if PE has different 
defaults, but normally you should find all reports on the master, in the 
directory specified by reportdir.

http://docs.puppetlabs.com/references/latest/configuration.html#reports You 
should check all the report* parameters on that page for correctness in 
your environment.

Details on the report formats is on this page. 
http://docs.puppetlabs.com/references/latest/report.html

An option to 'reports' that is oddly not mentioned on that page is the 
puppetdb option, which is to store reports in puppetdb, and is described on 
this page. 
http://docs.puppetlabs.com/puppetdb/1.4/connect_puppet_master.html

On Monday, September 16, 2013 9:10:05 AM UTC-7, root wrote:
>
> Still cannot figure out why I have such a variety of dates for the yaml 
> files that exist in /var/opt/lib/pe-puppet/reports/`hostname` on each node. 
> Each node is configured with "report = true", and the reports are 
> supposedly being sent to the Master. Not sure at all why sometimes I get a 
> local yaml file, and sometimes I don't.
>
> Anyway, I'm using Puppet Enterprise, and my reading of the docs tells me 
> the Master is storing the info from each run in PuppetDB. Anyone have any 
> luck extracting info from PuppetDB? Again, what I'm looking for is what 
> Puppet changed or wants to change on each node. Thanks. 
>
> On Saturday, September 14, 2013 3:16:35 PM UTC-4, root wrote:
>
>> Cross-posted from Puppet Enterprise Users:
>>
>> Is Puppet Enterprise (3.0) supposed to create a yaml file in 
>> /var/opt/lib/pe-puppet/reports/$hostname every time it runs?  Because the 
>> files in this directory on all my nodes are not very consistent and they 
>> are not recent.  If I do a puppet run on the node either through 
>> the Console or manually on the the node, it does not create a new yaml 
>> report file.
>>  
>> My bigger need is to generate my own custom reports from Puppet runs.  I 
>> thought these yaml files would be easier to parse than the log messages 
>> sent to syslog.  The information I want to display is a summary of what 
>> Puppet found to change for particular class/modules.  
>>  
>> 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] The Foreman: Query facts from ENC PuppetDB?

2013-08-28 Thread Ellison Marks
There's a beta frontend for puppetdb floating around the list called 
puppetboard. It handles reports, as well as a few other things. It's pretty 
sweet, all things considered. 
https://groups.google.com/forum/#!searchin/puppet-users/puppetboard/puppet-users/PVbPY3z8uFI/5yFZgVIG5wEJ

On Tuesday, August 27, 2013 10:45:55 PM UTC-7, Stephen Price wrote:
>
> Sorry, I meant I'm using Hiera as an ENC. I did see that PuppetDB has 
> report storage, but without an easy way to use that data (short of creating 
> my own interface utilizing queries to PuppetDB), it's not very useful yet. 
> I figured Foreman would be a decent drop-in for reports.
>
> I got a suggestion from someone else to take a look at creating a custom 
> facts terminus and have the master sending facts directly to both Foreman 
> and PuppetDB, but that means designing my own REST interface. Kind of 
> daunting. Thanks for the tip though. I'll poke around foreman-users for 
> some ideas.
>
>
> On Tue, Aug 27, 2013 at 9:03 PM, Ken Barber 
> > wrote:
>
>> > I've been using PuppetDB as an ENC for a while,
>>
>> So PuppetDB is not an ENC, do you mean Foreman?
>>
>> > but I haven't really
>> > utilized it for stored configs or anything. I was mostly interested in
>> > replacing Dashboard's reporting capabilities, but PuppetDB doesn't yet 
>> do
>> > anything (that I can see) with reports.
>>
>> So PuppetDB has experimental report storage:
>>
>> http://docs.puppetlabs.com/puppetdb/1.4/connect_puppet_master.html#edit-puppetconf
>>
>> > So I'm currently looking into
>> > setting up a separate Foreman server.
>> >
>> > I saw the script mentioned in the manual that's meant to be run as a 
>> cron
>> > job on the master, which should push facts to the Foreman, but is there 
>> a
>> > way to do the reverse, and have the Foreman query the Master or PuppetDB
>> > directly for facts?
>>
>> So this is possibly not the correct forum to ask? If you don't get an
>> answer, you might want to ask on foreman-users:
>> https://groups.google.com/forum/#!forum/foreman-users
>>
>> 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/I0KzcD3wl0s/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Stephen Price 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: passenger installation file passenger-install-apache2-module missing

2013-08-27 Thread Ellison Marks
I believe that script comes along when you use gem to install rack and 
passenger, as per the instructions: 
http://docs.puppetlabs.com/guides/passenger.html#install-rackpassenger

I'm not sure what's contained in the package from the foreman repository. 
Perhaps it already contains a compiled .so file?

As an aside, though it's not listed in the tutorial, I installed 
mod_passenger from the semi-official stealth monkeys repo, instruction 
here: 
http://www.modrails.com/documentation/Users%20guide%20Apache.html#_installing_or_upgrading_on_red_hat_fedora_centos_or_scientificlinux

On Tuesday, August 27, 2013 9:13:09 AM UTC-7, Andreas Dvorak wrote:
>
> Dear all,
>  
> I have installed
> yum install rubygem-passenger
> Installed:
>  rubygem-passenger.x86_64 
> 0:4.0.5-3.el6 
>   
>
> Dependency Installed:
>  rubygem-daemon_controller.noarch 0:1.1.4-3.el6
>  rubygem-fastthread.x86_64 0:1.0.7-1.el6
>  rubygem-rack.noarch 0:1.0.1-2.el6 
>  rubygem-rake.noarch 0:0.8.7-2.1.el6
>  
> but the file passenger-install-apache2-module to create the 
> mod_passenger.so is missing.
> The package comes from the foreman repository.
>  
> Can somebody please help me?
>  
> Best regards,
> Andreas
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Using hiera lookups with defined types

2013-08-26 Thread Ellison Marks
Agreed, create resources is the way to create defined types using hiera 
data. As a note though, if you need to create a bunch of defined types 
without parameters, if, for example, you're only relying on the name 
parameter, you can pass an array of titles to a declaration. 
http://docs.puppetlabs.com/puppet/3/reference/lang_resources.html#array-of-titles

yaml:
---
logrotate_users:
  - alice
  - bob
  - carol

pp:
$logrotate_users = hiera_array('logrotate_users')
cron_jobs::logrotate::users { $logrotate_users: }

On Friday, August 23, 2013 10:17:05 PM UTC-7, mcd wrote:
>
> Well normally you would use hiera_hash() and create_resources() to do it, 
> like this:
>
> # yaml data source
> ---
> cron_jobs::logrotate::users
>   kenweiss:
> hour => 5
>   tomjones:
> hour => 3
>
>
> # pp file
> ---
> class cron_jobs::logrotate ( $hour, $minute, $weekday ) {
>   ...
>   $user_cron_options = hiera_hash('cron_jobs::logrotate::users', false)
>   if $user_cron_options{
> create_resources('cron_jobs::logrotate::user_cron', $user_cron_options)
>   }
> }
>
> One thing I don't know is how to do that for defined types that do not 
> have any parameters.  Unfortunately create_resources requires a hash for 
> the second argument, so you have to use hiera_hash to pull in the data, so 
> it has to be a hash in hiera. And I haven't figured out how to define an 
> empty hash yet. Or transform an array into a hash that would work for 
> create_resources. 
>
> /shrug
>
> Chris
>
>
> On Fri, Aug 23, 2013 at 5:01 PM, Ken Weiss 
> > wrote:
>
>> Hi all,
>>
>> I am trying to use hiera and .yaml files to load parameters into my 
>> declared classes. For basic classes it works great. For example:
>>
>> class cron_jobs::logrotate ( $hour, $minute, $weekday ) {...
>>
>> node fqdn: test.my.com
>>
>> I declare the class for my node very simply:
>>
>> class {'cron_jobs::logrotate': }
>>
>> If I create a file in the default hiera data directory called 
>> test.my.com.yaml and include this:
>>
>> cron_jobs::logrotate::hour: 5
>>
>> then sure enough, when I do a puppet apply the cron job is created to run 
>> at 5:00 AM.
>>
>>
>> My problem is extending this to work with defined types. Let's say my 
>> defined type looks like this when I declare it:
>>
>> cron_jobs::logrotate::user_cron {'kenweiss' :}
>>
>> What do I put in my .yaml file in order to get Puppet to load the 
>> parameters automatically?
>>
>> I tried a couple of things...
>>
>> cron_jobs::logrotate::user_cron::kenweiss::hour 5
>> cron_jobs::logrotate::user_cron[kenweiss]::hour 5
>>
>> Neither worked, and I can't think of any other reasonable syntax. Can 
>> anyone point me in the right direction?
>>
>> --Ken Weiss
>>
>> -- 
>> 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.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Best practices for infrastructure

2013-08-23 Thread Ellison Marks
With hiera, you'll obviously need to sync your hiera data and hierarchy, 
along with your modules and whatever else, between your masters.

For mcollective, There are ways to set up a network of brokers, both to 
distribute load and to make sure that if a site gets separated, mcollective 
will still work locally. 
http://docs.puppetlabs.com/mcollective/deploy/middleware/activemq.html#settings-for-networks-of-brokers.
 
That entire page is actually pretty useful...

On Friday, August 23, 2013 9:03:41 AM UTC-7, Paul Archer wrote:
>
> I'm new to puppet, fixin' to (in Texas parlance) setup a largish 
> installation, and want to make sure I get things right the first time.
>
> I have a colo plus several satellite locations, with many more on the way.
>
> I'll be using open-source Puppet, as we have way too many nodes to manage 
> (potentially 275+ at each site) to afford PE.
>
> I'm thinking about setting up a master in the colo with a slaved master at 
> each site, following this document: 
> http://docs.puppetlabs.com/guides/scaling_multiple_masters.html 
> Each master will run passenger/apache. I'll have puppetDB running on the 
> primary master at the colo (with an eye to moving it to a separate server 
> if needed). I'll probably use Subversion (but maybe git) for 
> synchronization of data among masters.
> I'd like to use mcollective and hiera, so those will probably get setup on 
> the primary master. (Do I need them on each master?)
>
> One of our sites is a lab, so I'll be doing testing there.I'll need to 
> setup some kind of dev/test/prod environment system.
>
> I'll be testing both dashboard and foreman, although I need to do 
> automated bare-metal installs, so foreman will probably win out there.
>
> Each site also has around 100 nodes that break and get swapped out 
> frequently, so (depending on what foreman can do for me in the installation 
> process) I might need to be relatively lax about certificates to avoid 
> revoking and regenerating them constantly. (We're talking 2-3 nodes a week 
> getting pulled, worked on, and replaced or reimaged.)
>
>
> So that's where I am right now. Any thoughts, suggestions, tips, how-tos 
> would be greatly appreciated.
>
>
> Paul
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Confusion with puppetdb (storeconfig) and query database

2013-08-21 Thread Ellison Marks
Like, the postgresql database? First, I have to ask: why you want to go 
poking around in there?

Anyway, assuming you set it up with user: puppetdb, databasename: puppetdb 
and the recommended potgresql settings, you can use the psql client, like 
so:

psql -h 127.0.0.1 puppetdb puppetdb

On Wednesday, August 21, 2013 2:14:21 PM UTC-7, mike wrote:
>
> Hello,
> I have configured puppet and puppetdb (storeconfig) with postgresql and 
> the service run and the collecting  are good for example:
>
> I can make query with the next command and responds ok .
> [.]
> [root@master]# curl -X GET -H 'Accept: application/json' 
> http://127.0.0.1:8080/v2/facts --data-urlencode 'query=["=", "name", 
> "operatingsystem"]'
> [ {
>   "certname" : "master.example.com",
>   "name" : "operatingsystem",
>   "value" : "CentOS"
> }, {
>   "certname" : "node1.example.com",
>   "name" : "operatingsystem",
>   "value" : "CentOS"
> }, {
>   "certname" : "node2.example.com",
>   "name" : "operatingsystem",
>   "value" : "CentOS"
> } ]
> [.]
>
> My confusion is ¿How I can connect to database from shell and view the 
> database 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.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Assigning a dynamic role to be used by hiera

2013-08-21 Thread Ellison Marks
you might want to explicitly top-scope role, ie.

$::role = 'nameserver'

Not sure if that will matter in this case, but I don't think it can hurt.

As an aside, we set our role variable with facter.d on the nodes 
themselves, as we don't have hostnames that easily work out to roles.

On Wednesday, August 21, 2013 10:20:56 AM UTC-7, JeremyCampbell wrote:
>
>
> I need to define data for roles so I add the 'role' dynamic data source.
>
> - "%{::environment}/%{::clientcert}"
> - "%{::clientcert}"
> - "%{::environment}
> - "%{::role}"
> - common
>
> Our site.pp uses a hostname regex to classify nodes into roles e.g.
>
> node /^ns\d+$/ {
>   include role::nameserver
> }
>
> Can we add the $role variable to the role class and hiera will use it? 
> e.g. 
>
> class role::nameserver { 
>   $role = 'nameserver'
>   include base
>   include bind
>   include shorewall
> }
>
> Would this work? Is there a better pattern that doesn't involve having to 
> define custom facts on the servers?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: if defined not working when class is enlcosed within Class[ ]

2013-08-19 Thread Ellison Marks
Since in this case, it's checking that supervisor::service exists so it can 
declare one, I'd say checking for just 'supervisor::service' would be fine. 
You may want to stay around and see what other people think though, as I 
could be missing something.

Looking at it again, the check to see if a class has been declared seems 
really odd... and testing it now that I have a second, it doesn't actually 
seem to work at all. I'm not sure how idiomatic that is, or was, but maybe 
someone else can shed some light on it.

On Monday, August 19, 2013 8:32:39 PM UTC-7, Florian Gray Jones wrote:
>
> ok, that's great. Thanks for the help.
>
> The puppet-docs it says: "*Modules are how Puppet finds the classes and 
> types it can use* — it automatically loads any 
> class
>  or defined 
> type 
> stored 
> in its modules."
>
> With this in mind, if "*if *defined(Class[ ])" checks for classes.. and 
> in my case 'supervisor::service' is as you mentioned not a class but a 
> define. Is there an equivalent like "if defined(Define[ ])" or is best 
> practice to continue using "if defined('supervisor::service')" to just 
> check for anything of that name.
>
> Thanks again
> fLo
>
>
>
> On Monday, 19 August 2013 23:33:09 UTC+8, Florian Gray Jones wrote:
>>
>> Hi,
>>
>> I am learning puppet using version 2.7.18 on a fresh ubuntu install.
>>
>> I am trying to test this module 
>> https://github.com/liamjbennett/puppet-sabnzbd/blob/master/manifests/init.ppbut
>>  I'm having trouble with the 
>> if defined(Class['supervisor::service']) section in that it doesn't get 
>> run even though the supervisor module is installed.
>>
>> If i put "else{ notice("supervisor not defined?") }" on the end then I 
>> see that notice msg in the 'puppet apply --debug' output.
>>
>> This supervisor module is downloaded/installed OK from Puppet Forge and 
>> if I either 
>>
>> a) comment out the 'if defined' then it works as expected 
>> b) *change the if *defined(Class['supervisor::service']) to read if 
>> defined('supervisor::service') then it also works as expected.
>>
>> As you can see there is an "include supervisor" at top of the class which 
>> I'm guessing isn't being called in the 
>> order needed for the 'if defined' to work and the one without the Class[] 
>> must work because puppet auto loads the modules from the modulepath
>> and checks if that namespace and module exist?
>>
>> This is all new to me so i could be very wrong but can anyone explain 
>> given that init.pp why the 'if defined' isn't working and what is the best
>> way to achieve what the 'if defined' is there for and that's to see if 
>> the supervisor module is installed/loaded before entering the if statement 
>> and using the module?
>>
>> Many thanks for reading
>> fLo
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: if defined not working when class is enlcosed within Class[ ]

2013-08-19 Thread Ellison Marks
So, I can't speak to the authors intentions, but I'll do my best to explain 
the behavior.

As you guessed defined() behaves differently based on what is passed to it. 
If passed a resource reference, as it is in the module, it will check that 
that resource has been declared. if passed a string, it will treat it as a 
type/class name and make sure that the resource has been defined. So, as 
written, it's checking if a class by the name of supervisor::service has 
been declared, while the way you write it, it check if anything by the name 
of supervisor::service has been defined.

The 'include supervisor' you noticed does nothing regarding this error, as 
the type in question is supervisor::service.

If I had to guess, at one point in the past, supervisor::service was a 
class, while it is now a defined type, and the module you're working with 
hasn't updated or something.

On Monday, August 19, 2013 8:33:09 AM UTC-7, Florian Gray Jones wrote:
>
> Hi,
>
> I am learning puppet using version 2.7.18 on a fresh ubuntu install.
>
> I am trying to test this module 
> https://github.com/liamjbennett/puppet-sabnzbd/blob/master/manifests/init.ppbut
>  I'm having trouble with the 
> if defined(Class['supervisor::service']) section in that it doesn't get 
> run even though the supervisor module is installed.
>
> If i put "else{ notice("supervisor not defined?") }" on the end then I see 
> that notice msg in the 'puppet apply --debug' output.
>
> This supervisor module is downloaded/installed OK from Puppet Forge and 
> if I either 
>
> a) comment out the 'if defined' then it works as expected 
> b) *change the if *defined(Class['supervisor::service']) to read if 
> defined('supervisor::service') then it also works as expected.
>
> As you can see there is an "include supervisor" at top of the class which 
> I'm guessing isn't being called in the 
> order needed for the 'if defined' to work and the one without the Class[] 
> must work because puppet auto loads the modules from the modulepath
> and checks if that namespace and module exist?
>
> This is all new to me so i could be very wrong but can anyone explain 
> given that init.pp why the 'if defined' isn't working and what is the best
> way to achieve what the 'if defined' is there for and that's to see if the 
> supervisor module is installed/loaded before entering the if statement and 
> using the module?
>
> Many thanks for reading
> fLo
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Learningpuppet

2013-08-17 Thread Ellison Marks
Well, first, for a module, your pp files go *inside* the manifests folder. 
For init.pp, it should contain a human class, but there doesn't have to be 
anything in that class. The human::user defined type will do the heavy 
lifting, containing the user resource, a file or template for the bashrc, 
and one or more ssh_authorized_key resources.

On Friday, August 16, 2013 10:44:02 AM UTC-7, ytmp123 wrote:
>
> Hi Ellison Marks:
>
> Thanks. But I don't get what I'm exactly expected to do in this exercise. 
> Is this structure right?:
>
>- human 
>   - |-> manifests
>   - |-> init.pp 
>   - |-> user.pp
>
> 1. Does  init.pp have to contain a class "human", what shall this class do?
> 2. What does the type "human::user" (user.pp) to do?
>
> Please give me some hints. It would be a great help!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] hiera_include issues

2013-08-16 Thread Ellison Marks
So, I've run into a puzzling situation. I recently started playing around 
with the puppetlabs-apache module. Now, I generally use hiera_include to 
get all my classes, and it seemed logical that I should include the apache 
class at the webserver level of my hierarchy, and specific modules on a 
per-host basis. So, at my webserver level I have, say:

---
classes:
  - apache
  - apache::mod::ssl
  - apache::mod::headers


and on one of my nodes, I have:

---
classes:
  - apache::mod::wsgi
  - apache::mod::perl
  - apache::mod::passenger

When I try a puppet run, the mod_passenger include fails, claiming it can't 
find variables from apache::params. Now the weird part is, if i comment out 
passenger, it works fine, even though mod_wsgi has a very similar pp file, 
using many of the same variables. I sort of get the feeling that I'm at the 
mercy of the parser here somehow, as when I put all the classes together, 
like so:

---
classes:
  - apache
  - apache::mod::ssl
  - apache::mod::headers
  - apache::mod::wsgi
  - apache::mod::perl
  - apache::mod::passenger

It works fine.

Any idea how I could work things all separate, like my first example?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Learningpuppet

2013-08-16 Thread Ellison Marks
I'm not sure where you're following the tutorial, but the version on the 
official puppetlabs site doesn't include the phrase "site module".

http://docs.puppetlabs.com/learning/definedtypes.html#exercises

And for the bashrc file... You know normal stuff you'd have in a bashrc, 
aliases, path modifications, variable exports, whatevs.

On Thursday, August 15, 2013 11:56:40 PM UTC-7, ytmp123 wrote:
>
> Hi guys,
>
> I'm having difficulties with this exercise: 
> "Try wrapping a user resource in a *human::user* type that automatically 
> grabs that personʼs *.bashrc* file from your *site module* and *manages 
> one or more ssh_authorized_key resources*
> for their account"
>
> 1. What's a "site module"?
> 2. What am I expected to change in the .bashrc-file?
>
> Really thanks in advance!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: [pe-users] trouble installing open source puppet client

2013-08-16 Thread Ellison Marks
Generally yum will want all dependencies managed by itself, no? So even if 
you get it installed with gem, yum won't call the dependency satisfied...

On Thursday, August 15, 2013 5:35:24 PM UTC-7, Stuart Cracraft wrote:
>
> Redirected - need help. Please review and give me your collective thoughts.
> Encountering headwinds when trying to install Open Source Puppet *client*.
> The Puppet master and its client work fine and I don't see a lot of 
> differences to dig into.
> If you need more information than what I give in the logs and comments 
> below, please
> let me know.
>
>
> Begin forwarded message:
>
> *From: *Stuart Cracraft >
> *Date: *August 15, 2013 5:27:58 PM
> *To: *"pe-u...@puppetlabs.com " 
> 
> >
> *Subject: **[pe-users] trouble installing open source puppet client*
>
>  
> Trouble installing the client with
>  
>   yum install puppet
>  
>  
> Getting an error with a dependency by rubygem-json on rubygems.
>  
>  Forbidden when trying to do a general rubygems update.
>
>  
>
> gem list shows rake (10.1.0) and rubygems-update (2.0.6) as installed but
>
> gem update --system gives the above forbidden error. Proxy is open for
>
> this box for:
>
>  
>
>   *.puppetlabs.com
>
>   gems.rubyforge.org
>
>   *.rubygems.org
>
>  
>
> have tried http_proxy and HTTP_PROXY set to both the proxy's ip with 8080
>
> "some-ip:8080" and as http://some-ip:8080
>
>  curl -x proxyserverip:8080 http://puppetlabs.com and
>
> curl -x proxyserverip:8080
>
> Stuart
>  
>  
> Log:
>
> [root@ca-sna-bb01 rubygems-2.0.6]# yum install puppet
>
> Loaded plugins: product-id, rhnplugin, security, subscription-manager
>
> This system is not registered to Red Hat Subscription Management. You can 
> use subscription-manager to register.
>
> This system is receiving updates from RHN Classic or RHN Satellite.
>
> Setting up Install Process
>
> Resolving Dependencies
>
> --> Running transaction check
>
> ---> Package puppet.noarch 0:3.2.4-1.el6 will be installed
>
> --> Processing Dependency: facter >= 1.6.11 for package: 
> puppet-3.2.4-1.el6.noarch
>
> --> Processing Dependency: hiera >= 1.0.0 for package: 
> puppet-3.2.4-1.el6.noarch
>
> --> Processing Dependency: ruby(selinux) for package: 
> puppet-3.2.4-1.el6.noarch
>
> --> Running transaction check
>
> ---> Package facter.i386 1:1.7.2-1.el6 will be installed
>
> ---> Package hiera.noarch 0:1.2.1-1.el6 will be installed
>
> --> Processing Dependency: rubygem-json for package: 
> hiera-1.2.1-1.el6.noarch
>
> ---> Package libselinux-ruby.x86_64 0:2.0.94-5.3.el6_4.1 will be installed
>
> --> Running transaction check
>
> ---> Package rubygem-json.x86_64 0:1.5.5-1.el6 will be installed
>
> --> Processing Dependency: rubygems for package: 
> rubygem-json-1.5.5-1.el6.x86_64
>
> --> Finished Dependency Resolution
>
> Error: Package: rubygem-json-1.5.5-1.el6.x86_64 (puppetlabs-deps)
>
>Requires: rubygems
>
> You could try using --skip-broken to work around the problem
>
> You could try running: rpm -Va --nofiles --nodigest
>
> [root@ca-sna-bb01 rubygems-2.0.6]# gem update --system
>
> ERROR:  While executing gem ... (Net::HTTPServerException)
>
> 403 "Forbidden"
>
> [root@ca-sna-bb01 rubygems-2.0.6]# echo $http_proxy
>
> http://some-ip-here(1.2.3.4,etc.):8080
>
> [root@ca-sna-bb01 rubygems-2.0.6]# echo $HTTP_PROXY
>
>  
>
> [root@ca-sna-bb01 rubygems-2.0.6]# ruby setup.rb
>
> RubyGems 2.0.6 installed
>
> Installing ri documentation for rubygems-2.0.6
>
> /usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during 
> another chdir block
>
> /usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during 
> another chdir block
>
> : 
>
> :
>
> :
>
>
> --
>
>  
>
> RubyGems installed the following executables:
>
> /usr/bin/gem
>
>  
>
> Ruby Interactive (ri) documentation was installed. ri is kind of like man
>
> pages for ruby libraries. You may access it like this:
>
>   ri Classname
>
>   ri Classname.class_method
>
>   ri Classname#instance_method
>
> If you do not wish to install this documentation in the future, use the
>
> --no-document flag, or set it as the default in your ~/.gemrc file. See
>
> 'gem help env' for details.
>
>  
>
> [root@ca-sna-bb01 rubygems-2.0.6]#
>
>  
>  
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Enterprise Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to pe-users+u...@puppetlabs.com .
> Visit this group at 
> http://groups.google.com/a/puppetlabs.com/group/pe-users/.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For mor

[Puppet Users] Re: Installing Puppet 3 client on a Raspberry Pi

2013-08-15 Thread Ellison Marks
There's nothing prebuilt in the official repo for the arm processor in the 
raspi, I'd guess. You're probably going to have to build from source, 
unless someone else has already made a package.

On Thursday, August 15, 2013 8:36:47 AM UTC-7, Alastair Montgomery wrote:
>
> I'm trying to install the latest Puppet client on my Raspberry PI but I am 
> getting the following errors;
>
> wget http://apt.puppetlabs.com/puppetlabs-release-wheezy.deb
> sudo dpkg -i puppetlabs-release-wheezy.deb
> sudo apt-get update
> W: Failed to fetch http://apt.puppetlabs.com/dists/wheezy/Release  Unable 
> to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong 
> sources.list entry or malformed file)
>
> Any idea on how to fix 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.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet: chaining and conditionals

2013-08-15 Thread Ellison Marks
perhaps something like this?

node nodename1, nodename2, nodename3, nodename4 { 
   class { "class1": } 
   if $fqdn == "nodename2" { 
  Class["class1"] -> class { "class2": } -> class{ "class3" }
   } 
   else {
  Class["class1"] -> class { "class3": }
   }
   Class["class3"] -> 
   class { "class4": } 
} 

On Thursday, August 15, 2013 10:17:46 AM UTC-7, Sergey Arlashin wrote:
>
> Hi! 
>
> I'm using the following way to define the order and assign classes to 
> nodes: 
>
> node nodename1, nodename2, nodename3, nodename4 { 
>class { "class1": } -> 
>class { "class2": } -> 
>class { "class3": } -> 
>class { "class4": } 
> } 
>
> I'm fully delighted with it. 
>
> But at the moment I need class2 to be executed only on nodename2. The 
> following construction doesn't work 
>
> node nodename1, nodename2, nodename3, nodename4 { 
>class { "class1": } -> 
>if $fqdn == "nodename2" { 
>   class { "class2": } -> 
>} 
>class { "class3": } -> 
>class { "class4": } 
> } 
>
> And this construction breaks the order: 
>
> node nodename1, nodename2, nodename3, nodename4 { 
>class { "class1": } 
>if $fqdn == "nodename2" { 
>   Class["class1"] -> class { "class2": } 
>} 
>class { "class3": } -> 
>class { "class4": } 
> } 
>
> What do I do in a situation like this? 
>
>
> Thanks in advance. 
>
> Sergey. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] params pattern when writing modules

2013-08-13 Thread Ellison Marks
Ah, good to know. I'll file some tickets as I come across instances of this.

On Tuesday, August 13, 2013 2:47:43 PM UTC-7, Ashley Penney wrote:
>
> As one of the two new maintainers of all Puppetlabs modules I can tell you 
> for sure that our intent is to make sure everything in init.pp inherits out 
> of params.pp instead of declaring them directly in the main class, and if 
> you're kind enough and can throw a github issue up for any cases you notice 
> where that's not true we can fix them.
>
> I never liked the params.pp pattern myself but there's no great solution 
> to "where do I store all my weird logic to make the rest of my classes 
> simple".  We're standardizing on keeping all params defined in params.pp 
> and inheriting that in init.pp so that they can be overridden.
>
> I can't claim it's the best pattern, but we're at least going to strive 
> for consistency.
>
> (For background, each puppetlabs module was written by a different person 
> with their own views on this stuff and we had no unifying style guide or 
> guidelines to work from.  We're working on fixing these, but it takes time 
> and we don't want to barge in rewriting everything and upsetting current 
> users).
>
>
> On Tue, Aug 13, 2013 at 5:32 PM, Ellison Marks 
> > wrote:
>
>> So, I've been looking into the params pattern for writing modules, ie. 
>> having a params.pp file that init.pp inherits from as a place to use custom 
>> logic to set variables, and it seems very useful. I do have one question 
>> that I'm hoping someone can answer. If, for example, I look at an example42 
>> module, everything is in params.pp. On the other hand, looking at, say, 
>> puppetlabs modules, there's some mixing, with the case statements 
>> determining variable contents living in params.pp, but with straightforward 
>> string and boolean values stored between params.pp and the argument list in 
>> init.pp, with seemingly little logic dictating what goes where.
>>
>> Basically, what's people thoughts on the value of having every single 
>> variable defined in params.pp, vs only the complex, logicky ones, and also, 
>> in the case that I'm being dense, can someone explain the logic behind the 
>> puppetlabs modules.
>>  
>> -- 
>> 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.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] params pattern when writing modules

2013-08-13 Thread Ellison Marks
So, I've been looking into the params pattern for writing modules, ie. 
having a params.pp file that init.pp inherits from as a place to use custom 
logic to set variables, and it seems very useful. I do have one question 
that I'm hoping someone can answer. If, for example, I look at an example42 
module, everything is in params.pp. On the other hand, looking at, say, 
puppetlabs modules, there's some mixing, with the case statements 
determining variable contents living in params.pp, but with straightforward 
string and boolean values stored between params.pp and the argument list in 
init.pp, with seemingly little logic dictating what goes where.

Basically, what's people thoughts on the value of having every single 
variable defined in params.pp, vs only the complex, logicky ones, and also, 
in the case that I'm being dense, can someone explain the logic behind the 
puppetlabs modules.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: introducing puppetboard 0.0.1

2013-08-13 Thread Ellison Marks
Er, excuse me, I misspoke. As it is it relies on having python 2.7+, not 3 
for the formatting. Still, the Redhat family, by default, is still on 2.6.

On Tuesday, August 13, 2013 12:13:17 PM UTC-7, Ellison Marks wrote:
>
> So I finally got the time to get this going, and it is indeed, very cool. 
> One hitch though: I grabbed the source from github, and most things seemed 
> to work, but the overview page errored out. It seems that it was using 
> python 3 syntax for it's format strings on line 86 and 88.
>
> 86: 'avg_resources_node': "{:10.6f}".format(avg_resources_node['Value']),
> 87: 'mean_failed_commands': mean_failed_commands['MeanRate'],
> 88: 'mean_command_time': "{:10.6f}".format(mean_command_time['MeanRate']),
>
> I added a 0 to the format specification and it worked  fine
>
> 86: 'avg_resources_node': "{0:10.6f}".format(avg_resources_node['Value']),
> 87: 'mean_failed_commands': mean_failed_commands['MeanRate'],
> 88: 'mean_command_time': "{0:10.6f}".format(mean_command_time['MeanRate']),
>
> On Wednesday, August 7, 2013 5:47:23 AM UTC-7, Daniele Sluijters wrote:
>>
>> Hello everyone,
>>
>>
>> It’s a lovely grey and rainy day here in the Dutch summer, as good a day 
>> as any to release a new little project.
>>
>>
>> Its name is Puppetboard and has as aim to replace Puppet Dashboard’s 
>> reporting functionality. It does not nor will it include ENC features. It 
>> does all this without storing any data itself but querying PuppetDB instead.
>>
>>
>> The whole thing is built in Python and relies on Flask and WTForms. The 
>> communication logic has been split of in its own library called pypuppetdb 
>> which makes heavy use of the requests library. The interface is powered by 
>> Twitter Bootstrap with the Flatly theme.
>>
>>
>> Though I’ve pushed all the code out and made it public it’s all very 
>> young but it works fairly well. However, I’ve committed numerous 
>> barbarities in the code just to get things working and to figure out how to 
>> handle certain things. For the foreseeable time in the future I’ll be 
>> working on cleaning all this up and figuring out what I can do on my side 
>> and on PuppetDB’s side to make all this work a little better. Especially 
>> when it comes to dealing with big responses from PuppetDB...
>>
>>
>> This is the first time I’m open sourcing a project so that too is all new 
>> to me. I’d welcome the feedback and if someone feels brave enough even 
>> commits on the projects but try and be gentle about it :-). I’ll also be at 
>> PuppetConf including the Developer Day so feel free to reach out to me in 
>> person.
>>
>>
>> To the code:
>>
>>
>>  * puppetboard: https://github.com/nedap/puppetboard
>>
>>  * pypuppetdb:  https://github.com/nedap/pypuppetdb
>>
>>
>> I realise that puppetboard doesn't have a test suite right now but it 
>> will soon. In order to do so I have to restructure a few things about it 
>> first. The installation documentation will improve with it.
>>
>>
>> Pypuppetdb's test suite will be expanding the coming days once I'm done 
>> mocking the HTTP requests _query() makes and manage to get a decent and big 
>> enough set of test data to feed into PuppetDB. This will allow me to run 
>> integration tests and benchmark certain changes I have in mind.
>>
>>
>> I’m hoping to be able to get a release out every month with improvements 
>> to both projects, perhaps even faster in the beginning but it remains to be 
>> seen how much time I’ll be able to spend on it.
>>
>>
>> A special thanks goes out to Ken Barber for helping out with all things 
>> PuppetDB and coming up with a way to run PuppetDB on Travis so we can run 
>> integration tests. Hunter, thank you for being so interested in this 
>> project and pushing me to release it.
>>
>>
>> — 
>>
>> Daniele Sluijters
>>
>> Nedap | Steppingstone
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: introducing puppetboard 0.0.1

2013-08-13 Thread Ellison Marks
So I finally got the time to get this going, and it is indeed, very cool. 
One hitch though: I grabbed the source from github, and most things seemed 
to work, but the overview page errored out. It seems that it was using 
python 3 syntax for it's format strings on line 86 and 88.

86: 'avg_resources_node': "{:10.6f}".format(avg_resources_node['Value']),
87: 'mean_failed_commands': mean_failed_commands['MeanRate'],
88: 'mean_command_time': "{:10.6f}".format(mean_command_time['MeanRate']),

I added a 0 to the format specification and it worked  fine

86: 'avg_resources_node': "{0:10.6f}".format(avg_resources_node['Value']),
87: 'mean_failed_commands': mean_failed_commands['MeanRate'],
88: 'mean_command_time': "{0:10.6f}".format(mean_command_time['MeanRate']),

On Wednesday, August 7, 2013 5:47:23 AM UTC-7, Daniele Sluijters wrote:
>
> Hello everyone,
>
>
> It’s a lovely grey and rainy day here in the Dutch summer, as good a day 
> as any to release a new little project.
>
>
> Its name is Puppetboard and has as aim to replace Puppet Dashboard’s 
> reporting functionality. It does not nor will it include ENC features. It 
> does all this without storing any data itself but querying PuppetDB instead.
>
>
> The whole thing is built in Python and relies on Flask and WTForms. The 
> communication logic has been split of in its own library called pypuppetdb 
> which makes heavy use of the requests library. The interface is powered by 
> Twitter Bootstrap with the Flatly theme.
>
>
> Though I’ve pushed all the code out and made it public it’s all very young 
> but it works fairly well. However, I’ve committed numerous barbarities in 
> the code just to get things working and to figure out how to handle certain 
> things. For the foreseeable time in the future I’ll be working on cleaning 
> all this up and figuring out what I can do on my side and on PuppetDB’s 
> side to make all this work a little better. Especially when it comes to 
> dealing with big responses from PuppetDB...
>
>
> This is the first time I’m open sourcing a project so that too is all new 
> to me. I’d welcome the feedback and if someone feels brave enough even 
> commits on the projects but try and be gentle about it :-). I’ll also be at 
> PuppetConf including the Developer Day so feel free to reach out to me in 
> person.
>
>
> To the code:
>
>
>  * puppetboard: https://github.com/nedap/puppetboard
>
>  * pypuppetdb:  https://github.com/nedap/pypuppetdb
>
>
> I realise that puppetboard doesn't have a test suite right now but it will 
> soon. In order to do so I have to restructure a few things about it first. 
> The installation documentation will improve with it.
>
>
> Pypuppetdb's test suite will be expanding the coming days once I'm done 
> mocking the HTTP requests _query() makes and manage to get a decent and big 
> enough set of test data to feed into PuppetDB. This will allow me to run 
> integration tests and benchmark certain changes I have in mind.
>
>
> I’m hoping to be able to get a release out every month with improvements 
> to both projects, perhaps even faster in the beginning but it remains to be 
> seen how much time I’ll be able to spend on it.
>
>
> A special thanks goes out to Ken Barber for helping out with all things 
> PuppetDB and coming up with a way to run PuppetDB on Travis so we can run 
> integration tests. Hunter, thank you for being so interested in this 
> project and pushing me to release it.
>
>
> — 
>
> Daniele Sluijters
>
> Nedap | Steppingstone
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Revert the puppet changes

2013-08-13 Thread Ellison Marks
There's not really an automated way of reverting puppet's changes, as far 
as I know. On the other hand, by default puppet stores reports in 
/var/lib/puppet/reports/(hostname) on the master, so you can find the 
report for the run you did (they're named by date, generally, eg. 
201308122117.yaml), and read through it to find what changed (look for the 
line "status: changed").

On Tuesday, August 13, 2013 5:43:28 AM UTC-7, ravind...@gmail.com wrote:
>
> Dear Team,
>
> I have made the changes to one of the main environment through the command 
> puppet agent --test
>
> When i ran this command there were several changes made to that 
> environment.
> After checking i got to know that puppet was stopped for that environment 
> as the team was implementing new changes.
>
> Now i have to revert those changes - very very critical for me.
>
> Please could you help and guide me on how to get back those changes.
>
> Thanks in advance
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Will the puppetmaster compile a catalog if there are not changes?

2013-08-08 Thread Ellison Marks
The master won't recompile a catalog if there have been no changes on the 
master's side, I believe. It will always send a catalog, if possible, to 
the client, either a newly compiled one or an old one if it didn't need to 
recompile.

On Thursday, August 8, 2013 1:09:32 PM UTC-7, rjl wrote:
>
> I have been asked a question for which I cannot seem to find an answer. 
> When a client contacts my puppetmaster, will the puppet master compile a 
> catalog if there have been not changes to that clients configuration? Or, 
> will the puppetmaster just say 'there are no changes to your catalog so you 
> need not do anything'?
>
> Thanks in advance
>
> rjl
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: introducing puppetboard 0.0.1

2013-08-07 Thread Ellison Marks
If it's something that means I can finally ditch puppet-dashboard's 
reporting functionality, I will be on that like jam on toast. Screenshots 
look very cool, I'll probably try to install it later this week.

On Wednesday, August 7, 2013 5:47:23 AM UTC-7, Daniele Sluijters wrote:
>
> Hello everyone,
>
>
> It’s a lovely grey and rainy day here in the Dutch summer, as good a day 
> as any to release a new little project.
>
>
> Its name is Puppetboard and has as aim to replace Puppet Dashboard’s 
> reporting functionality. It does not nor will it include ENC features. It 
> does all this without storing any data itself but querying PuppetDB instead.
>
>
> The whole thing is built in Python and relies on Flask and WTForms. The 
> communication logic has been split of in its own library called pypuppetdb 
> which makes heavy use of the requests library. The interface is powered by 
> Twitter Bootstrap with the Flatly theme.
>
>
> Though I’ve pushed all the code out and made it public it’s all very young 
> but it works fairly well. However, I’ve committed numerous barbarities in 
> the code just to get things working and to figure out how to handle certain 
> things. For the foreseeable time in the future I’ll be working on cleaning 
> all this up and figuring out what I can do on my side and on PuppetDB’s 
> side to make all this work a little better. Especially when it comes to 
> dealing with big responses from PuppetDB...
>
>
> This is the first time I’m open sourcing a project so that too is all new 
> to me. I’d welcome the feedback and if someone feels brave enough even 
> commits on the projects but try and be gentle about it :-). I’ll also be at 
> PuppetConf including the Developer Day so feel free to reach out to me in 
> person.
>
>
> To the code:
>
>
>  * puppetboard: https://github.com/nedap/puppetboard
>
>  * pypuppetdb:  https://github.com/nedap/pypuppetdb
>
>
> I realise that puppetboard doesn't have a test suite right now but it will 
> soon. In order to do so I have to restructure a few things about it first. 
> The installation documentation will improve with it.
>
>
> Pypuppetdb's test suite will be expanding the coming days once I'm done 
> mocking the HTTP requests _query() makes and manage to get a decent and big 
> enough set of test data to feed into PuppetDB. This will allow me to run 
> integration tests and benchmark certain changes I have in mind.
>
>
> I’m hoping to be able to get a release out every month with improvements 
> to both projects, perhaps even faster in the beginning but it remains to be 
> seen how much time I’ll be able to spend on it.
>
>
> A special thanks goes out to Ken Barber for helping out with all things 
> PuppetDB and coming up with a way to run PuppetDB on Travis so we can run 
> integration tests. Hunter, thank you for being so interested in this 
> project and pushing me to release it.
>
>
> — 
>
> Daniele Sluijters
>
> Nedap | Steppingstone
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: node_aws installation problem

2013-08-07 Thread Ellison Marks
Honestly, it just sounds like your system is having trouble locating the 
guid gem. try this script:

require 'guid'
 
  # generate a GUID
  g = Guid.new
  puts g
  puts g.to_s
  puts g.hexdigest
  puts g.raw.inspect
  puts g.raw.length

  # generate another GUID, should be different everytime
  g2 = Guid.new
  puts g == g2

  # convert a hexstring into Guid object
  g3 = Guid.from_s(g.to_s)
  puts g3
  puts g == g3

  # convert a raw 16-byte string into Guid object
  g4 = Guid.from_raw(g.raw.inspect)
  puts g4
  puts g == g4

Just some test functions for the gem. Run with ruby scriptname.rb. You should 
see some guids and hexy things and true or false values.

If it errors out, either you didn't install the guid gem correctly or your ruby 
environment is slightly borked. If it does work, something else is going on.



On Wednesday, August 7, 2013 5:27:38 AM UTC-7, Piotr Jasiulewicz wrote:
>
> It's somewhat disappointing that puppet labs expresses commercialism in 
> such a nasty way, just breaking the free stuff and giving you an option to 
> pay for it... will try on a different system and then switch to Chef.
>
> Cheers,
> Piotr
>
> W dniu czwartek, 25 lipca 2013 17:35:10 UTC+1 użytkownik Piotr Jasiulewicz 
> napisał:
>>
>> Is puppet enterprise free also? Not sure I would get consent from my 
>> boss... it's a bit sad that the provisioning project looks totally 
>> neglected by puppet labs.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Node Classifications

2013-07-31 Thread Ellison Marks
http://docs.puppetlabs.com/puppet/3/reference/lang_node_definitions.html

According to that, default only applies if nothing else matches.

For your other question, how are you doing multiple manifests? With imports?

On Wednesday, July 31, 2013 9:53:13 AM UTC-7, Worker Bee wrote:
>
> Hi Everyone,
>
> I am struggling a bit with the order of precedence of node 
> classifications.  When using .pp files to classify nodes, what happens if a 
> node corresponds to two different manifests.  For example, if I have .pp 
> files that select nodes based on hostnames and I have another .pp file that 
> selects hosts based in data center location, will both manifests be applied 
> accordingly?
>
> Also, is the default manifest applied to ALL hosts, complimentary of any 
> manifests  that explicitly apply to the host?  Or, is the default applied 
> ONLY if no other manifests  apply to that host?
>
> Thank you very much!
> Bee
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: dashboard displaying \n in report output

2013-07-29 Thread Ellison Marks
According to this thread:

https://groups.google.com/forum/#!searchin/puppet-users/dashboard$20newline$20characters/puppet-users/u_Ul0wqRYxw/er8IuEompFoJ

it was a problem with ruby 1.9.3. YMMV.

On Monday, July 29, 2013 3:23:24 AM UTC-7, John Naggets wrote:
>
> Hello,
>
> I installed the puppet dasboard 1.2.23 on my puppet master and everything 
> works so far fine but I noticed that my reports (URL: /reports/X, where X 
> is a report number) displays many new line characters (\n) in its output. 
> It looks like the newline char does not get stripped off correctly. Any 
> ideas what could be the cause?
>
> Thanks and regards,
> 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.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Heria, Facts, and Puppet

2013-07-25 Thread Ellison Marks
Not sure exactly, but in general you want common to be searched last, as 
hiera by default bails when it finds an answer, so your hierarchy in the 
conf file is backwards. You'd want the env_name fact above common.

On Thursday, July 25, 2013 7:27:26 AM UTC-7, chengkai liang wrote:
>
> So something doesn't look right for me when running puppet apply -e 
> 'include ...' for looking heria via facter fact.
>
> I have hiera configure as this,
>
> :backends:
> - yaml
>
> :hierarchy:
> - common 
> - '%{env_name}'
>
> :yaml:
> :datadir: /var/lib/hiera/data
>
> and, a file envXX.yaml store in the datadir, and I can run *hiera xyz 
> env_name=envXX* to get the the value of abc associate with xyz.
>
> Yet, if I export the value variable env_name by *export 
> FACTER_env_name=*envXX, 
> and run:
>
> *puppet apply -e 'include my_module
>
> *
> puppet will complaint that it can't find data store in envXX.yaml.  From 
> the debug output,
>
> debug: importing 
> '/Users/cliang/.puppet/modules/puppet_flux2_config/manifests/init.pp' in 
> environment production
> debug: Automatically imported puppet_flux2_config from puppet_flux2_config 
> into production
> debug: hiera(): Hiera YAML backend starting
> debug: hiera(): Looking up host_header_url in YAML backend
> debug: hiera(): Looking for data source common
> Could not find data item host_header_url in any Hiera data file and no 
> default supplied at 
> /Users/cliang/.puppet/modules/puppet_flux2_config/manifests/init.pp:4 on 
> node m-mba.local
>
> It seems that it stop looking right after common, while running with *hiera 
> xyz env_name=envXX* *--debug *shows,
>
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Hiera YAML backend starting
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking up host_header_url in YAML 
> backend
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking for data source common
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking for data source *envXX*
> DEBUG: Thu Jul 25 07:24:48 -0700 2013: Found xyz in *envXX*
>
> So why puppet apply won't look further into envXX.yaml file?  Anybody can 
> help on 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.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: How do I set global noop?

2013-07-23 Thread Ellison Marks
How are you running puppet? If cron or mcollective, you can add a --noop 
flag to the command line somewhere.

On Monday, July 22, 2013 4:29:24 PM UTC-7, Sam Morrison wrote:
>
> I'm trying to set a global noop but it doesn't seem possible,
>
> There are 2 bugs open about this which to me look pretty serious as the 
> expected behaviour isn't the case.
>
> http://projects.puppetlabs.com/issues/21286
> http://projects.puppetlabs.com/issues/6549
>
> If anyone has a work around (that doesn't include modifying puppet.conf 
> file) I would be very interested.
>
> Cheers,
> Sam
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Node not showing in the PE console

2013-07-08 Thread Ellison Marks
Ah, excuse me. I should have looked a bit harder before posting. Fedora is 
not an officially supported platform for PE, see 
http://projects.puppetlabs.com/issues/15701. The *nix installer is just for 
doing platform detection by the way. It's a universal installer that just 
contains sets for all supported platforms.

For your fedora node, you'll need to try to get ahold of a package of 
puppet matching the version bundled with your version of enterprise. Might 
work then.

On Monday, July 8, 2013 12:26:02 PM UTC-7, Greg Emanuel wrote:
>
> So for a Fedora node would I use the EL (RHEL, CentOS, Scientific Linux, 
> Oracle Linux) 6 PE installer? There isn't an installer listed for Fedora. 
> Or, would I use the *nix installer?
>
> On Monday, July 8, 2013 12:56:31 PM UTC-5, Ellison Marks wrote:
>>
>> You should be using the enterprise installer on both the server and the 
>> nodes. On the nodes, you would only install the agent role.
>>
>> Just as a note, the problem you are running into is probably that the 
>> version of puppet from the Fedora repo is probably the latest, somewhere in 
>> the 3.2 area, while the version in PE 2.8.2 is older, probably 2.7.21. 
>> Pointing a newer client at an older server is generally a bad idea and will 
>> do weird things, like what you're seeing.
>>
>> On Friday, July 5, 2013 11:38:54 AM UTC-7, Greg Emanuel wrote:
>>>
>>> I have a Ubuntu 12.04 server running PE 2.8.2. I have a Fedora 18 node 
>>> that I would like to manage. I installed the F18 node using a kickstart 
>>> installation. During this install I enabled the puppetlabs repo and 
>>> installed puppet from the puppetlabs repo. One of the post installation 
>>> tasks executed the following command: puppet agent -t --server >> name>.  Everything seemed to install ok. I did get a certificate request 
>>> that I could see and Accept on the PE console. After accepting the cert, 
>>> the node never shows up in the PE console. I have verified DNS and 
>>> networking info multiple times and everything is in order. I am wondering 
>>> if the puppet agent from the puppetlabs repo works with Puppet Enterprise. 
>>> Or am I all wrong and should be using the Puppet Enterprise installer on 
>>> the nodes? I would assume then the Red Hat installer would be used on a 
>>> Fedora node?
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Node not showing in the PE console

2013-07-08 Thread Ellison Marks
You should be using the enterprise installer on both the server and the 
nodes. On the nodes, you would only install the agent role.

Just as a note, the problem you are running into is probably that the 
version of puppet from the Fedora repo is probably the latest, somewhere in 
the 3.2 area, while the version in PE 2.8.2 is older, probably 2.7.21. 
Pointing a newer client at an older server is generally a bad idea and will 
do weird things, like what you're seeing.

On Friday, July 5, 2013 11:38:54 AM UTC-7, Greg Emanuel wrote:
>
> I have a Ubuntu 12.04 server running PE 2.8.2. I have a Fedora 18 node 
> that I would like to manage. I installed the F18 node using a kickstart 
> installation. During this install I enabled the puppetlabs repo and 
> installed puppet from the puppetlabs repo. One of the post installation 
> tasks executed the following command: puppet agent -t --server  name>.  Everything seemed to install ok. I did get a certificate request 
> that I could see and Accept on the PE console. After accepting the cert, 
> the node never shows up in the PE console. I have verified DNS and 
> networking info multiple times and everything is in order. I am wondering 
> if the puppet agent from the puppetlabs repo works with Puppet Enterprise. 
> Or am I all wrong and should be using the Puppet Enterprise installer on 
> the nodes? I would assume then the Red Hat installer would be used on a 
> Fedora node?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Dashboard - Unable to submit report to http://127.0.0.1:3000/reports/upload [301] Moved Permanently

2013-06-11 Thread Ellison Marks

   
   1. Are you sure that dashboard is listening on the loopback?
   2. Have you made any modifications to auth.conf?
   3. Have you confirmed that upload requests are even getting to 
   dashboard? (check the access log)
   4. Are you running any apache modules that might return redirects?
   
Just a few things to check.

On Tuesday, June 11, 2013 7:59:33 AM UTC-7, Olivier Trempe wrote:
>
> Hello,
>
> I successfully installed puppet on redhat 6. Nodes can connect to master 
> and run catalog.
> I installed dashboard and was hoping to see the reports uploaded in 
> dashboard...
>
> I have no problem browsing to the dashboard but when an agent sends a 
> report to the master, I always get the same error in the master's log: 
> *Unable 
> to submit report to http://127.0.0.1:3000/reports/upload [301] Moved 
> Permanently.*
> *
> *
> I tried with the webrick server (*/usr/share/puppet-dashboard/script/server 
> -e production*) and with dashboard running with apache. Same error.
>
> I also tried to set *disable_legacy_report_upload_url* to* true* in 
> puppet-dashboard's settings.yml. Same error.
>
> I can see the .yaml reports exist in */var/lib/puppet/reports/*
>
> Here is my puppet master config:
> [main]
> # The Puppet log directory.
> # The default value is '$vardir/log'.
> logdir = /var/log/puppet
>
> # Where Puppet PID files are kept.
> # The default value is '$vardir/run'.
> rundir = /var/run/puppet
>
> # Where SSL certificates are kept.
> # The default value is '$confdir/ssl'.
> ssldir = $vardir/ssl
>
> # Proxy settings
> http_proxy_host = xx.x.xxx
> http_proxy_port = 3128
>
> [master]
> reporturl = http://127.0.0.1:3000/reports/upload
> reports = store, http
> dns_alt_names = xx.x.xxx
>
>
> Can someone help me with this?
>
> Thanks
>
> Olivier Trempe
>

-- 
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 Tutorial: Learning - Manifests

2013-06-03 Thread Ellison Marks
Attempt 2 is on the right track. What OS are you on and what error messages 
in particular are you running into? 

On Monday, June 3, 2013 9:17:35 AM UTC-7, Alexandra Ferguson wrote:
>
> Fellow Puppet Users,
>  
> I was assigned to learn how puppet works to integrate it into our 
> department and I am trying to go through the tutorial. I am a beginner in 
> IT work and am slowly starting to understand these processes. Right now I 
> am stuck on the last part of the Manifests tutorial, found at the bottom of 
> this page: http://docs.puppetlabs.com/learning/manifests.html.
>  
> I am on the first exercise, where it instructs the user to write and apply 
> a manifest to install tge Apache package (httpd), then make sure the Apache 
> service (also httpd) is running. I feel as if I am on the right track, but 
> after hours of googling and research, I was pulled in a few different 
> directions. If anyone could explain this in as detailed and simple of a way 
> possible to help me through this, it would be extremely appreciated.
>  
>
> Attempt 1:
>  
> # /root/learning-manifests/1.apache.pp
>
>  
>
> package {‘httpd’:
>
> ensure => latest,
>
> }
>
> Service {httpd’:
>
> ensure => stopped,
>
> enable => false,
>
> }
>
>  
>
> Attempt 2:
>  
> # /root/learning-manifests/2.apache.pp
>
>  
>
> package {‘apache’:
>
> ensure => present,
>
> }
>
> service {‘httpd’:
>
> ensure => running,
>
> }
>
>  
>
> Attempt 3:
>  
> # /root/learning-manfiests/3.apache.pp
>
>  
>
> class {‘apache’: }
>
>  
>  

-- 
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: What data on the server can a compromized host read

2013-05-30 Thread Ellison Marks
Pretty much everything in puppet is secured with SSL certificates. If 
someone has root access to one of your client machines, they have that 
certificate. They can then retrieve anything that that node is allowed to 
retrieve, which is generally specified in auth.conf. By default, I think 
this includes their own catalog, their own node definition, all files 
served by the master process... a few other things.

It shouldn't be able to get at your manifests directly, as those are 
compiled before being sent to the client, nor should it be able to get at 
hiera data on the master.

On Thursday, May 30, 2013 1:24:27 PM UTC-7, Vladimir Brik wrote:
>
> Hello,
>
> I am trying to better understand the security impact a compromised host 
> managed by puppet could have on our infrastructure.
>
> Suppose an attacker gained root on a machine called 'owned', and we have 
> this in site.pp:
>
> node owned {
> file {'foo':
> content => 'puppet:///modules/module_name/foo',
> }
> }
>
> Will agent running on 'owned' be able to retrieve:
>  - /module_name/files/bar
>  - /module_name/manifests
>  -  hiera data (other than what it's supposed to have access to)
>
>
> Thanks very much,
>
> Vlad
>
>
>
>

-- 
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 Environment Wildcard

2013-05-30 Thread Ellison Marks
I don't think there's a wildcard match functionality for hiera like that. 
If you interpolate the environment variable in you hierarchy, it will try 
to match the result exactly.

On the other hand, if all of you "aw*" environments need the same data, I'm 
inclined to ask what they're doing in different environments?

On Wednesday, May 29, 2013 12:05:31 PM UTC-7, phundisk wrote:
>
> I am looking to use hiera in my environment but I cannot get past one 
> thing. In our current puppet code we have some case statements based on 
> environments.  The case statements are like the following...
>
> 'production' { do this }
> /^aw/ { do this } # this is for all AWS stuff
> 'aws' { do this } # this is the production like environment of AWS
> otherenv { do this }
> default { do this } # other server that default here
>
> I would like hiera to do the following order, hostname, environment, 
> common.  I would also like to create one YAML file for all the AW* fîles 
> rather than create one for awtest, awsandbox, awetc.  Is there a way to do 
> this in hiera that I am missing?  Or will I need to re work some logic in 
> my puppet code?
>
>
>
>
>
>
>
> _
> This email and any files transmitted with it are confidential and intended 
> solely for the addressee.  If you received this email in error, please do 
> not disclose the contents to anyone; kindly notify the sender by return 
> email and delete this email and any attachments from your system.
>
> © 2011 Currensee Inc. is a member of the National Futures Association 
> (NFA) Member ID 0403251 | Over the counter retail foreign currency (Forex) 
> trading may involve significant risk of loss. It is not suitable for all 
> investors and you should make sure you understand the risks involved before 
> trading and seek independent advice if necessary. Performance, strategies 
> and charts shown are not necessarily predictive of any particular result 
> and past performance is no indication of future results. Investor returns 
> may vary from Trade Leader returns based on slippage, fees, broker spreads, 
> volatility or other market conditions.
>
> Currensee Inc | 54 Canal St 4th Floor | Boston, MA 02114 | +1.617.624.3824
>

-- 
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: runinterval - is it seconds or minutes? Docs are incomplete!

2013-05-28 Thread Ellison Marks
Well, it's an open source project. If you feel the docs aren't clear 
enough, you can file a ticket or submit a pull request via git.

http://docs.puppetlabs.com/contribute.html

On Tuesday, May 28, 2013 1:42:40 PM UTC-7, Tim Schaefer wrote:
>
> Puppet docs are the last place I look not the first place, and that's my 
> annoyance with the documentation.
>
> Clear, complete, unambiguous, working docs with real-world examples are 
> what we need.  It gets really annoying to have to download modules from 
> forge and have to wade through code to see what is the correct approach is, 
> especially when so many modules don't have documentation either. 
>  pe_accounts is a classic example of incomplete, confusing documentation. 
>  Some of it just makes no sense at all, especially since it has no 
> authoritative examples that are complete enough to use.  No docs on how to 
> set up external data sources. Very annoying and ironic, since Puppet is 
> supposed to save me time.  Instead I find myself constantly hunting for 
> examples.
>
> Anyway I did find the snippet of information at the top of the doc, where 
> I would never expect to see it.
>
>
> Tim
>  
>
>
>
> On Tue, May 28, 2013 at 12:58 PM, Matthew Kennedy 
> 
> > wrote:
>
>> It is there, just where Eric said it was. No need to get upset. 
>>
>> It might be helpful to mention where the time notation format can be 
>> found in the sections where it is used. Would preempt issues like this in 
>> the future. 
>>
>> Matt
>> On May 28, 2013 1:46 PM, "Tim Schaefer" > 
>> wrote:
>>
>>>  Item 175: runinterval
>>>
>>> How often puppet agent applies the client configuration; in seconds. 
>>> Note that a runinterval of 0 means “run continuously” rather than “never 
>>> run.” If you want puppet agent to never run, you should start it with the 
>>> --no-client option. Can be specified as a duration.
>>>
>>>- *Default*: 30m 
>>>
>>>
>>> So, do I put 15m? 900?  900s?  There is nothing there that says anything 
>>> you just said.  
>>>
>>> None of what you said is in the runinterval documentation.  This is the 
>>> first I've ever seen it.  You need to update your docs.
>>>
>>> And don't tell me to go over to forge, that's a lazy, inexcusable 
>>> response.  You can do better.  I don't mind hacking but really when there 
>>> is no where else to find this information you have a responsibility to 
>>> document in a clear, unambiguous form.
>>>
>>> Thanks,
>>>
>>> Tim
>>>
>>>
>>>
>>> On Tue, May 28, 2013 at 12:07 PM, Eric Sorenson <
>>> eric.s...@puppetlabs.com > wrote:
>>>
 http://docs.puppetlabs.com/references/latest/configuration.html

 Top of the page, just under the headers:

 Settings that represent time intervals should be specified in duration 
 format: an integer immediately followed by one of the units ‘y’ (years of 
 365 days), ‘d’ (days), ‘h’ (hours), ‘m’ (minutes), or ‘s’ (seconds). The 
 unit cannot be combined with other units, and defaults to seconds when 
 omitted. Examples are ‘3600’ which is equivalent to ‘1h’ (one hour), and 
 ‘1825d’ which is equivalent to ‘5y’ (5 years).


 On Tuesday, May 28, 2013 7:07:34 AM UTC-7, Tim Schaefer wrote:
>
> OK so is it minutes or seconds for runinterval?
>
> And what's the correct format
>
> Please put an example in the docs!
>
> Do I use 15m for 15 minutes or is it 900 for 900 seconds?  
>
>  I hate ambiguity in documentation!  Be precise!
>
  -- 
 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/fBC1VXt9nPA/unsubscribe?hl=en
 .
 To unsubscribe from this group and all its topics, 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.
  
  

>>>
>>>
>>>
>>> -- 
>>> Tim Schaefer
>>> iphone 650-839-3277 
>>> voip 650-646-9636
>>> email   asysar...@gmail.com 
>>> web A System Architect 
>>> skype asystemarchitect
>>>  
>>> -- 
>>> 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.
>>>  
>>>  
>>>
>>  -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Puppet Users" group.
>> To unsubscribe from this topic, visit 
>> 

[Puppet Users] Re: manifest for fusioninventory-agent

2013-05-23 Thread Ellison Marks
Could be that the status command isn't returning sane values. From the 
docs: http://docs.puppetlabs.com/references/latest/type.html#service

hasstatusDeclare whether the service’s init script has a functional status 
command; defaults to true. This attribute’s default value changed in Puppet 
2.7.0. 

The init script’s status command must return 0 if the service is running 
and a nonzero value otherwise. Ideally, these exit codes should conform to the 
LSB’s 
specificationfor
 init script status actions, but Puppet only considers the difference 
between 0 and nonzero to be relevant.

If a service’s init script does not support any kind of status command, you 
should set hasstatus to false and either provide a specific command using 
the status attribute or expect that Puppet will look for the service name 
in the process table. Be aware that ‘virtual’ init scripts (like ‘network’ 
under Red Hat systems) will respond poorly to refresh events from other 
resources if you override the default behavior without providing a status 
command. Valid values are true, false.
So you should manually check the return code of the status command from 
fusioninventory-agent's init script, to make sure it's conformant. If it's 
not, you'll have to set hasstatus to false and status to some reasonable 
command, as the docs mention.

On Thursday, May 23, 2013 7:32:59 AM UTC-7, Stan wrote:
>
> Hi
>
> I create a manifest for fusioninventory-agent on my puppet server
>
> On my puppet client if i modify file /etc/sysconfig/fusioninventory-agent 
> the file fusioninventory-agent replace by puppet server configuration (this 
> is OK)
>
> But if i stop fusioninventory-agent on my puppet client, puppet server not 
> start the service and i don't know why
>
> If you see an error in my configuration, say me
>
> regards
>
>
> class fusioninventory-agent::redhat {
>
> package { 'fusioninventory-agent':
>  ensure => present,
> }
>
> file { '/etc/sysconfig/fusioninventory-agent':
> ensure => present,
> owner => 'root',
> group => 'root',
> mode => 0644,
> content => 
> template("/etc/puppet/modules/fusioninventory-agent/templates/fusioninventory-agent.erb"),
> require => Package["fusioninventory-agent"],
> notify => Service["fusioninventory-agent"]
> }
>
>
> service { 'fusioninventory-agent':
> ensure => running,
> hasstatus => true,
> hasrestart => true,
> enable => true,
> require => 
> File['/etc/sysconfig/fusioninventory-agent']
> }
> }
>

-- 
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: facter wrong report

2013-05-22 Thread Ellison Marks
I'm on 1.7.1, Facter finds xen fine.

is_virtual => true
virtual => xen

odd part is I'm not sure the detection method has changed since 1.6. It 
just check if any of these paths exist: 


"/proc/sys/xen", "/sys/bus/xen", "/proc/xen"


On Wednesday, May 22, 2013 1:06:02 AM UTC-7, Heriyanto wrote:
>
> Hi,
>
> I just check from my virtual machine:
> [root@host ~]# facter|grep virtual
> is_virtual => false
> virtual => physical
>
> My operating system is CentOS 6.4 running as domu, running under dom0 
> CentOS 5.9.
> I use facter-1.6.6-1.el6. Its bug?
>
> Thanks for any comment.
>
> Regards,
> Heriyanto
>
>

-- 
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 malformed format string - %S

2013-04-29 Thread Ellison Marks
Tabs are not allowed as indentation in yaml. They are allowed as whitespace.

http://www.yaml.org/spec/1.2/spec.html#id2775170
http://www.yaml.org/spec/1.2/spec.html#id2777534

On Monday, April 29, 2013 7:07:55 AM UTC-7, Luca Gioppo wrote:
>
> OK, solved!!
> The problem was the TAV character that notepad++ added to the hash.
> It seems that something in ruby does not like it (do not know ruby so...) 
>
> If this is the correct behaviour there should be somewhere in the docs a 
> warning for DO NOT USE TABS IN YAML file as it took quite asome time to 
> find out.
>
> If is not a correct behaviour than is a bug :P
> Luca
>
>
> Il giorno lunedì 29 aprile 2013 15:15:05 UTC+2, Luca Gioppo ha scritto:
>>
>> I'm trying to use hiera.
>>
>> The common.yaml is
>>
>>
>> greg: 
>> db_type: "mysql"
>> db_host: %{::domain}
>> db_name: "odaigreg"
>> db_user: "odaigreg"
>> db_password: "odaigreg1"
>> db_tag: "greg_db"
>> is_remote: "true"
>>
>> and the command
>> hiera -c /etc/puppet/environments/production/hiera.yaml greg 
>> environment=production confdir="/etc/puppet" -d
>>
>> returns:
>> DEBUG: Mon Apr 29 15:11:48 +0200 2013: Hiera YAML backend starting
>> DEBUG: Mon Apr 29 15:11:48 +0200 2013: Looking up greg in YAML backend
>> DEBUG: Mon Apr 29 15:11:48 +0200 2013: Looking for data source common
>> /usr/lib/ruby/site_ruby/1.8/hiera/filecache.rb:35:in `%': malformed 
>> format string - %S (ArgumentError)
>> from /usr/lib/ruby/site_ruby/1.8/hiera/filecache.rb:35:in `read'
>> from 
>> /usr/lib/ruby/site_ruby/1.8/hiera/backend/yaml_backend.rb:22:in `lookup'
>> from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:68:in 
>> `datasources'
>> from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:66:in `map'
>> from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:66:in 
>> `datasources'
>> from 
>> /usr/lib/ruby/site_ruby/1.8/hiera/backend/yaml_backend.rb:16:in `lookup'
>> from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:182:in `lookup'
>> from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:179:in `each'
>> from /usr/lib/ruby/site_ruby/1.8/hiera/backend.rb:179:in `lookup'
>> from /usr/lib/ruby/site_ruby/1.8/hiera.rb:64:in `lookup'
>> from /usr/bin/hiera:220
>>
>>
>> The hiera.yaml is:
>> :backends: yaml
>> :yaml:
>>   :datadir: /etc/puppet/environments/production/hieradata
>> :hierarchy: common
>> :logger: console
>>
>> Any hints on something I missed?
>> Thanks
>> Luca
>>
>>

-- 
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: Learning puppet: how to use a module?

2013-04-28 Thread Ellison Marks


>From the puppet apply man page:

When provided with a modulepath, via command line or config file, puppet 
apply can effectively mimic the catalog that would be served by puppet 
master with access to the same modules, although there are some subtle 
differences. When combined with scheduling and an automated system for 
pushing manifests, this can be used to implement a serverless Puppet site.
http://docs.puppetlabs.com/man/apply.html

So looks like you need to give it the path to where your modules are 
installed. This can be done with --modulepath=/path/to/module/dirctory on 
the command line or with the modulepath configuration setting in the agent 
section of your config file.

On Sunday, April 28, 2013 2:40:01 AM UTC-7, Leonard Ehrenfried wrote:
>
> Hi,
>
> I'm currently learning puppet but I have come across something which I 
> can't figure out from the docs.
>
> I have a rails app, which needs a few Ubuntu packages installed to work. 
> Some of those come from a PPA, which is a non-standard repository, which 
> needs to be added to the list of repos. I would like to automate this step, 
> too.
>
> I have just one node where puppet needs to run, so I just have one file 
> which I execute with `puppet apply`. I'm not using a puppetmaster.
>
> The pp file can be viewed here: 
> https://github.com/lenniboy/jcheld/blob/master/puppet/jcheld.pp
>
> I have installed the puppetlabs-apt module and I can see that that was 
> successful like this:
>
> $ puppet module list
> /home/lenni/.puppet/modules
> ├── puppetlabs-apt (v1.1.0)
> └── puppetlabs-stdlib (v4.0.2)
>
> Now, when I run puppet I get the following error:
>
> $ sudo puppet apply puppet/jcheld.pp
> Error: Could not find class apt for 
> ip-10-59-51-209.eu-west-1.compute.internal on node 
> ip-10-59-51-209.eu-west-1.compute.internal
> Error: Could not find class apt for 
> ip-10-59-51-209.eu-west-1.compute.internal on node 
> ip-10-59-51-209.eu-west-1.compute.internal
>
> I think it is likely that I'm not understanding something fundamentally 
> about how modules are supposed to be used.
>
> Could someone help me out?
>
> Thanks
> Leonard
>

-- 
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: Yum cannot "see" puppet-3.2.0-0.1rc1

2013-04-19 Thread Ellison Marks
Have you run yum clean all yet? If you haven't, you're cache might be 
outdated, and you wouldn't see the update.

On Friday, April 19, 2013 7:50:12 AM UTC-7, Ygor wrote:
>
> RHEL 5, x86_64 
>
> The rpm is there -- 
> https://yum.puppetlabs.com/el/5/devel/x86_64/puppet-3.2.0-0.1rc1.el5.noarch.rpm
>  
>
> But yum cannot see it to pull it down. I can see 
> puppet-server-3.2.0-0.1rc1.el5, and when I tried to install, it failed on 
> missing dependency. 
>
>
> “Sometimes I think the surest sign that intelligent life exists elsewhere 
> in the universe is that none of it has tried to contact us.” 
> Bill Waterson (Calvin & Hobbes) 
>
>

-- 
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 module upgrade dilemma with Subversion

2013-04-15 Thread Ellison Marks
What OS are you on, and what package manager are you using to 
install/upgrade puppet?

On Friday, April 12, 2013 5:55:52 AM UTC-7, Ygor wrote:
>
> I use Subversion to maintain the $confdir of my puppet-masters and I just 
> discovered that when one does an upgrade, the entire tree is blown away and 
> replaced -- all my .svn directories are gone. 
>
> I see nothing in the documentation (man page and such) to address this. 
>
> Suggestions ? 
>
> “Sometimes I think the surest sign that intelligent life exists elsewhere 
> in the universe is that none of it has tried to contact us.” 
> Bill Waterson (Calvin & Hobbes) 
>
>

-- 
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: File resource without ensure

2013-04-15 Thread Ellison Marks
Perhaps it works differently when specifying the content/source of a file. 
I tried your example, but with content => 'foo' instead of mode => 640 and 
it created the file.

On Sunday, April 14, 2013 8:55:07 AM UTC-7, Felix.Frank wrote:
>
> Hi, 
>
> On 04/04/2013 05:08 PM, jcbollinger wrote: 
> > if I define a file resource without specifying an ensure parameter, 
> > it seems to behave like ensure => present was specified. 
> > 
> > 
> > 
> > Yes, that's the default. 
>
> Uhm, are you sure? I would expect the following to be a noop, which 
> seems to be the case: 
>
> $ puppet apply -e 'file { "/tmp/wth": mode => 640 }' 
> notice: Finished catalog run in 0.05 seconds 
>
> Puppet *will* change the file mode, if it's not 640, but will not mess 
> with the resource's existence. 
>
> A different behavior would be confusing, to me at least. 
>
> Cheers, 
> Felix 
>

-- 
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: example42 mcollective - setting version produces an error

2013-04-10 Thread Ellison Marks
The error you're getting indicates an incorrectly specified resource. 
Please post your manifest to make it easier to debug.

On Wednesday, April 10, 2013 8:27:20 AM UTC-7, Larry Fast wrote:
>
> When I define the mcollective_version variable using hiera I get the 
> following error. There is no indication where the problem has occurred.
>
> Error: Failed to apply catalog: You cannot specify more than one of 
> content, source, target
>
> If I set this variable in code it pretents to work but I think its just 
> ignoring the version rule. IE. when I set it to an invalid version number 
> it still gets installed.
>
> hiera:   mcollective_version: '2.2.3-1.el6'
> code:   $mcollective_version = '22.2.3-1.el'
>
>

-- 
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] More Hiera and Environment questions

2013-04-08 Thread Ellison Marks
If you're running puppet as a service, have you restarted the service since 
adding that value?

On Monday, April 8, 2013 10:40:45 AM UTC-7, Tony C wrote:
>
> Oops, I copied and pasted the wrong thing.
>
>
> hiera.yaml
>
> :yaml:
>   :datadir: /etc/puppetlabs/hieradata/%{::environment}
> :hierarchy:
>   - common
>   - %{::application}
>
>
> On my agent puppet.conf, I have tried what you suggested already but it 
> can't find the value in hiera.
>
> [agent]
> certname = xx
> server = xx
> report = true
> classfile = $vardir/classes.txt
> localconfig = $vardir/localconfig
> graph = true
> pluginsync = true
> environment = dev
> application = app_1
>
>
> On Monday, April 8, 2013 10:33:26 AM UTC-7, Ygor wrote:
>>
>> http://docs.puppetlabs.com/guides/environment.html#on-the-agent-node
>>
>> I put it in the [agent] block of puppet.conf
>>
>> “Sometimes I think the surest sign that intelligent life exists elsewhere 
>> in the universe is that none of it has tried to contact us.”
>> Bill Waterson (Calvin & Hobbes)
>>
>> --
>> *From: *"Tony C" 
>> *To: *puppet...@googlegroups.com
>> *Sent: *Monday, April 8, 2013 1:28:37 PM
>> *Subject: *[Puppet Users] More Hiera and Environment questions
>>
>> Hi everyone,
>>
>> I have a question that I can't seem to find a solution to.
>>
>> I am using hiera, and having a hard time understanding how to pass 
>> environments for dynamic look ups.
>>
>> For example, if my hiera.yaml looks like this:
>>
>> :hierarchy: - %{::environment} - common
>>
>> How / where do I pass the $environment variable that the host will know 
>> it's in a particular environment. I had something working before using an 
>> ENC, but I do not have an option of using an ENC this time around.
>>
>> Thanks!
>>
>> Tony
>>
>> -- 
>> 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.
>>  
>>  
>>
>

-- 
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: Announce: Hiera 1.2.0 Available

2013-04-03 Thread Ellison Marks
Since I can imagine a situation that I might want to use the deep merge 
functionality on some lookups but not on others, Is it currently possible 
to specify the type of merge to do in the hiera_hash call? If not, is that 
a planned feature?

On a slightly related note, is the function documentation going to get an 
update soon? All three hiera functions are still listed as "undocumented". 
They do have fairly complete documentation in 
http://docs.puppetlabs.com/hiera/1/index.html, so perhaps something could 
be borrowed from there.

On Wednesday, April 3, 2013 5:39:05 PM UTC-7, Matthaus Litteken wrote:
>
> Hiera 1.2.0 is a feature release in the 1.x series with 
> new features and bug fixes. 
>
> Downloads are available at: 
>  * Source: https://downloads.puppetlabs.com/hiera/hiera-1.2.0.tar.gz 
>
> RPMs are available at https://yum.puppetlabs.com/el or /fedora 
>
> Rubygem available at http://rubygems.org/gems/hiera 
>
> Debs are available at https://apt.puppetlabs.com 
>
> Mac package is available at 
> https://downloads.puppetlabs.com/mac/hiera-1.2.0.dmg 
>
> Please report feedback via the Puppet Labs Redmine site, using a 
> affected version of 1.2.0: 
>  http://projects.puppetlabs.com/projects/hiera/ 
>
> Fixes targeted at the final of this version in our bug tracker: 
> http://projects.puppetlabs.com/versions/332 
>
>  
> ## Hiera 1.2.0 Release Notes ## 
>  
> # Features 
>
> Add deep-merge feature to backend lookups 
>
> - Config option :merge_behavior => :native|:deep|:deeper 
> - Add optional requirement on deep_merge gem to support 
>   :deep and :deeper options 
> - Update Yaml backend to use Backend.merge_answer 
> - Update Json backend to use Backend.merge_answer 
>
> (#16644) Add a generic file cache 
>
> Add a general file cacher in Hiera::Filecache based on the work that 
> was 
> done in the YAML backend. 
>
> Adjust the YAML and JSON backends to use this cache 
>
> (#18718) Create logger to handle fallback 
>
> Sometimes a logger has been configured, but is not suitable for being 
> used. An example of this is when the puppet logger has been 
> configured, 
> but hiera is not being used inside puppet. This adds a FallbackLogger 
> that will choose among the provided loggers for one that is suitable. 
>
> # Bug Fixes 
>
> (#17434) Detect loops in recursive lookup 
>
> The recursive lookup functionality was vulnerable to infinite 
> recursion 
> when the values ended up referring to each other. This keeps track of 
> the names that have been seen in order to stop a loop from occuring. 
> The 
> behavior for this was extracted to a class so that it didn't clutter 
> the 
> logic of variable interpolation. The extracted class also specifically 
> pushes and pops on an internal array in order to limit the amount of 
> garbage created during these operations. This modification should be 
> safe so long a new Hiera::RecursiveLookup is used for every parse that 
> is done and it doesn't get shared in any manner. 
>
> (#17434) Support recursive interpolation 
>
> The original code for interpolation had, hidden somewhere in its 
> depths, 
> supported recursive expansion of interpolations. This adds that 
> support 
> back in. 
>
> = 
> ## Hiera 1.2.0 Changelog ## 
> = 
>
> Andrew Parker (13): 
>   26311b7 (#18718) Load logger classes eagerly 
>   2520aa3 (#18718) Create logger to handle fallback 
>   074f5c8 (#18718) Enable console fallback when logger not suitable 
>   8db2949 (#18718) Implement suitablity check for puppet logger 
>   dc98e2d (#17434) Add YARD for #parse_string 
>   06dcf8e (#17434) Clarify tests for #parse_string 
>   dc6c538 (#17434) Add tests to exclude unwanted lookups 
>   3a2660d (#17434) Stronger assertion about how keys are looked up 
>   4d85f92 (Maint) Describe desired behavior in backend specs 
>   023001d (#17434) Simplify string interpolation 
>   9a3f1fd (#17434) Simplify logic around looking up values 
>   453b489 (#17434) Support recursive interpolation 
>   9a62bfd (#17434) Detect loops in recursive lookup 
>
> Jeff McCune (4): 
>   b2623d9 (maint) Add Travis CI Support 
>   fcecdbf (maint) Add Travis CI support to active branches 
>   5262050 (maint) Add Ruby 2.0.0 to Travis build matrix 
>   d9db368 Add contributing document to Hiera 
>
> Justen Walker (7): 
>   4ac8372 Add deep-merge feature to backend lookups 
>   3da83b2 Allow both symbols and strings when deciding behavior of 
> merge_answer 
>   950076b Fix undefined method `[]' for nil:NilClass error in 
> yaml_backend_spec.rb 
>   b317d10 Add deep-merge feature to backend lookups 
>   13b79ef Allow both symbols and strings when deciding behavior of 
> merge_answer 
>   d84cd11 Fix undefined method `[]' for nil:NilClass error in 
>

[Puppet Users] Re: execution order not being honored with ->

2013-03-27 Thread Ellison Marks
If your role class declares other classes you probably being bitten 
by http://projects.puppetlabs.com/issues/8040. That is, and classes 
declared in the role class are not confined by the dependency graph. It's 
something they're working on fixing, but in the meantime, the recomendation 
is to use the anchor 
pattern. http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern. 
The achor resource type comes from the stdlib, IIRC.

On Wednesday, March 27, 2013 11:07:04 AM UTC-7, blalor wrote:
>
> I'm using Puppet 3.1.1 in standalone mode.  I'm running "puppet apply" 
> like this: 
>
> basedir="$( dirname $( readlink -f "${0}" ) )" 
> puppet apply \ 
> --detailed-exitcodes \ 
> --modulepath=${basedir}/modules \ 
> --hiera_config=${basedir}/hiera.yaml \ 
> ${basedir}/manifests/site.pp 
>
> site.pp looks like this (verbatim): 
>
> node default { 
> include "role::${::nibiru_app_name}" 
>
> if $nibiru_region != 'vagrant' { 
> include dns_workarounds 
>
> Class['dns_workarounds'] -> 
> Class["role::${::nibiru_app_name}"] 
> } 
>
> } 
>
> modules/dns_workarounds/manifests/init.pp is similar to this: 
>
> class dns_workarounds { 
> host {'b3-proj-dev-03.example.com': ip => '10.1.128.18'} 
> host {'b3-proj-dev-04.example.com': ip => '10.1.128.19'} 
> host {'b3-proj-dev-05.example.com': ip => '10.1.128.20'} 
>
> } 
>
> nibiru_app_name comes from facter.  The dns_workarounds class is just a 
> bunch of host resource definitions that I have to add before everything 
> else runs, due to some wonky DNS.  I'm able to get a successful Puppet run, 
> but I'm finding that not all of the host resources defined in 
> dns_workarounds are being processed before the role is processed.  I see 
> the following on stdout: 
>
> Notice: 
> /Stage[main]/Dns_workarounds/Host[b3-proj-dev-05.example.com]/ensure: 
> created 
> Notice: /Stage[main]/Role::Base/Package[python-pip]/ensure: ensure 
> changed 'purged' to 'present' 
> Notice: /Stage[main]/Dns_workarounds/Host[login.dev.example.com]/ensure: 
> created 
>
> So far I haven't had a problem with the puppet apply failing due to the 
> out-of-order resource processing, but I'm sure it'll bite me eventually. 
>  Am I declaring the ordering correctly with -> ?  I also tried just using 
> "require dns_workarounds" in the if block, but that's giving me the same 
> result. 
>
> Thanks, 
> Brian 
>
> -- 
> Brian Lalor 
> bla...@bravo5.org  
>
>
>

-- 
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: Reference first member of array in manifest

2013-03-26 Thread Ellison Marks
It's just normal subscript notation.

$ntpd_servers[0]

http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#arrays

Just as a note, ntpd has an option, -g I believe, that's used to set the 
time and start the service all at once. I think it's a little preferred 
over ntpdate these days. Not sure what flavor of linux you're running, but 
on centos, that flag is default when run through he init script. It would 
probably be cleaner for you if you could use that flag and then just a 
service resource subscribed to the conf file.

On Tuesday, March 26, 2013 6:01:44 AM UTC-7, Willem Bos wrote:
>
> Hi all,
>
> How do I reference the first member in the $ntpd_servers array in the code 
> below. Any pointers to the official Puppet (or Ruby?) documentation would 
> be much appreciated.
>
> class ntp {
>
>   $ntpd_servers = [ "0.rhel.pool.ntp.org", "1.rhel.pool.ntp.org", "
> 2.rhel.pool.ntp.org" ]
>
>   exec { "set_clock":  
> subscribe   => File["/etc/ntp.conf"],  
> command => "/sbin/service ntpd stop && /sbin/ntpdate 
>  && /sbin/service ntpd start",  
> refreshonly => true;  
>   }  
>
> }
>
> Regards,
> Willem.
>

-- 
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: composite tags broken

2013-03-25 Thread Ellison Marks
I read a little more stuff. From the docs:

All language statements enclosed in a node, define or class structure will 
automatically be tagged with the name of that statement. These 
automatically-applied tags will be inherited by any object enclosed in that 
class, regardless of the depth of enclosure.

Notice that that doesn't include resources. I guess resources aren't valid 
auto-tags, so that would be why the two are being included: they're tagged 
woof. You specified to include anything tagged service, but nothing was 
tagged as such.

On Monday, March 25, 2013 10:43:51 AM UTC-7, Luke Bigum wrote:
>
> On Monday, March 25, 2013 5:25:20 PM UTC, Ellison Marks wrote:
>
>> As far as I can tell, if a provided tag matches any tag in the resource, 
>> it will be applied. Since you provide woof and service, file { '/tmp/foo': 
>> is run because it is tagged woof, service { 'foo': is run because it is 
>> tagged woof and is a service, and file { '/tmp/bar': is run because it is a 
>> service.
>>
>
> Nope, File[/tmp/bar] is not a Service, it's a file :-) It shouldn't match 
> the tags specified if it's treated as a logical AND or a logical OR. 
>
> My Puppet output is bogus though, I pasted the wrong command for that 
> manifest (symptom of trying out a bunch of different combinations), this is 
> the correct output:
>
> $ puppet apply test.pp --noop --tags "woof,service"
> Notice: /Stage[main]//File[/tmp/foo]/ensure: current_value absent, should 
> be present (noop)
> Notice: /Stage[main]//Service[foo]/ensure: current_value stopped, should 
> be running (noop)
>
> However you have got me thinking that the tags behave like a logical OR 
> rather than in a composite nature that I originally assumed.
>
> -Luke
>
> On Monday, March 25, 2013 5:35:30 AM UTC-7, Luke Bigum wrote:
>>>
>>> Hi all,
>>>
>>> I wanted to check I'm not doing anything wrong before I lodge a bug. I 
>>> think composite tags should work according to this doc:
>>>
>>>
>>> http://docs.puppetlabs.com/puppet/3/reference/lang_tags.html#restricting-catalog-runs
>>>
>>> However I do not get the expected behaviour with my test using Puppet 3:
>>>
>>> $ puppet apply test.pp --noop --tags "woof,service"
>>> Notice: /Stage[main]//File[/tmp/foo]/ensure: current_value absent, 
>>> should be present (noop)
>>> Notice: /Stage[main]//File[/tmp/bar]/ensure: current_value absent, 
>>> should be present (noop)
>>> Notice: /Stage[main]//Service[foo]/ensure: current_value stopped, should 
>>> be running (noop)
>>>
>>> For this catalog:
>>>
>>> file { '/tmp/foo':
>>>   ensure => present,
>>>   tag=> [ 'woof', 'cow' ],
>>> }
>>> service { 'foo':
>>>   ensure => running,
>>>   tag=> [ 'woof', 'cow' ],
>>> }
>>> file { '/tmp/bar':
>>>   ensure => present,
>>>   notify => Service['foo'],
>>> }
>>>
>>> It should only work on the service, not everything.
>>>
>>> Bug, yes?
>>>
>>> -Luke
>>>
>>

-- 
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: composite tags broken

2013-03-25 Thread Ellison Marks
As far as I can tell, if a provided tag matches any tag in the resource, it 
will be applied. Since you provide woof and service, file { '/tmp/foo': is 
run because it is tagged woof, service { 'foo': is run because it is tagged 
woof and is a service, and file { '/tmp/bar': is run because it is a 
service.

On Monday, March 25, 2013 5:35:30 AM UTC-7, Luke Bigum wrote:
>
> Hi all,
>
> I wanted to check I'm not doing anything wrong before I lodge a bug. I 
> think composite tags should work according to this doc:
>
>
> http://docs.puppetlabs.com/puppet/3/reference/lang_tags.html#restricting-catalog-runs
>
> However I do not get the expected behaviour with my test using Puppet 3:
>
> $ puppet apply test.pp --noop --tags "woof,service"
> Notice: /Stage[main]//File[/tmp/foo]/ensure: current_value absent, should 
> be present (noop)
> Notice: /Stage[main]//File[/tmp/bar]/ensure: current_value absent, should 
> be present (noop)
> Notice: /Stage[main]//Service[foo]/ensure: current_value stopped, should 
> be running (noop)
>
> For this catalog:
>
> file { '/tmp/foo':
>   ensure => present,
>   tag=> [ 'woof', 'cow' ],
> }
> service { 'foo':
>   ensure => running,
>   tag=> [ 'woof', 'cow' ],
> }
> file { '/tmp/bar':
>   ensure => present,
>   notify => Service['foo'],
> }
>
> It should only work on the service, not everything.
>
> Bug, yes?
>
> -Luke
>

-- 
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 augeas with more than one array in a single key

2013-03-24 Thread Ellison Marks
Might be that last semicolon screwing things up. I think the parser might 
be expecting another resource after that. Doesn't exactly make sense, as 
you have a semicolon ending the line above, so if you commented that last 
line, it would be the same, but it's a thought.

On Saturday, March 23, 2013 6:23:12 AM UTC-7, iamauser wrote:
>
> Anyone, Dude ! Sir ?
>
> NOTE : I am using Puppet-3.0.2.x.
>
>
>
> On Friday, March 22, 2013 1:48:55 PM UTC-5, iamauser wrote:
>>
>> I am trying to put together a set of puppet policies for grub/menu.lst.
>> The serial::grubmenulst looks like this :
>>
>> define serial::grubmenulst ( $value ) {
>>$key = $title
>>$context = "/files/boot/grub/menu.lst"
>>augeas { "grubmenulst/${key}":
>>  context => "$context",
>>  onlyif  => "get $key != '$value'",
>>  changes => "set $key '$value'",
>>}
>> }
>>
>> It is implemented in the following way :
>>
>> $svar = "${serial_tty},${serial_speed}n8r"
>> serial::grubmenulst {
>> "terminal/console" : value => "";
>> "title[1]/kernel/elevator" : value => "deadline";
>> "title[1]/kernel/console[1]" : value => "${svar}"; *### It Fails 
>> for this Line otherwise it works*
>> }
>>
>> Puppet agent complains during the run (see below). Note that, the code 
>> works if I comment out the last line: "title[1]/kernel/console[1]" : 
>> value => "${svar}".  My initial guess is that puppet-augeas is not able 
>> to parse more than one array values for a single key... (!?)
>>
>> Error: Could not retrieve catalog from remote server: Error 400 on 
>> SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: 
>> Invalid resource type serial::grubmenulst at 
>> /etc/puppet/modules/serial/manifests/serial.pp:16 on node 
>>
>> Any suggestions ?
>>
>

-- 
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: syntax problems trying to use Keith Burdis's erwbgy/system module without Hiera

2013-03-21 Thread Ellison Marks


On Thursday, March 21, 2013 2:10:20 PM UTC-7, John Smith wrote:
>
> On Thursday, March 21, 2013 1:58:10 PM UTC-7, Ellison Marks wrote:
>
>> And just to have an answer on the list as well, the syntax in the docs is 
>> correct. Though it might be class { "system::ntp" in your case. Not sure of 
>> the specifics of that module.
>>
>>
>> http://docs.puppetlabs.com/puppet/3/reference/lang_classes.html#using-resource-like-declarations
>>
>>
>>> I'm just trying to call his ntp module now and have removed system.  I 
> still can't make it work... Here's my code
>
> 
> include ntp
>
> class ntp { 'ntp':
>

This syntax is incorrect. Not "class ntp { 'ntp'". Just "class { 'ntp'", 
like it says in the docs. If that's giving you an error, post it.
 

>   servers => [ 'ntp1.domain.com', 'ntp2.domain.com' ],
> }
> 
>
> and here's my error:
> Could not parse for environment dev: Syntax error at ':'; expected '}' at 
> /etc/puppet/manifests/site.pp:35 on node
>
>

-- 
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: Windows agent got a 'puppet:///' file source error

2013-03-21 Thread Ellison Marks
Are the permissions ok on that file? That is, is it readable by the master?

On Thursday, March 21, 2013 2:17:19 PM UTC-7, RAM wrote:
>
> Hi,
> I'm trying to run puppet agent from Windows Server 2008 R2, puppet version 
> is 3.0.2.
> The puppet master is running on RHEL 5.8, version is 3.1.1
>
> I'm running a simple task: downloading a file, TableauServer.exe, from the 
> master. The manifest, /etc/puppet/modules/tableau/manifests/init.pp, is as 
> follows:
>
> class tableau::install {
>   file {'c:/temp.install':
> ensure => 'directory',
>   }
>
>   file { 'c:/temp.install/TableauServer.exe':
> ensure => 'present',
> require => File['c:/temp.install'],
> source => 'puppet:///modules/tableau/TableauServer.exe',
>   }
> }
>
> class tableau {
>   notify {'Module: tableau':}
>   include tableau::install
> }
>
> At the agent site, I got the error:
>
> C:\Windows\system32>puppet agent --test --trace
> Info: Retrieving plugin
> Info: Loading facts in 
> C:/ProgramData/PuppetLabs/puppet/var/lib/facter/facter_dot_d.rb
> Info: Loading facts in 
> C:/ProgramData/PuppetLabs/puppet/var/lib/facter/puppet_vardir.rb
> Info: Loading facts in 
> C:/ProgramData/PuppetLabs/puppet/var/lib/facter/root_home.rb
> Info: Caching catalog for mnappmktxwin2
> Info: Applying configuration version '1363898070'
> Notice: Module: tableau
> Notice: /Stage[main]/Tableau/Notify[Module: tableau]/message: defined 
> 'message' as 'Module: tableau'
>
> Error: 
> /Stage[main]/Tableau::Install/File[c:/temp.install/TableauServer.exe]: 
> Could not evaluate: Co
> uld not retrieve information from environment production source(s) 
> puppet:///modules/tableau/Tableau
> Server.exe
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/util/errors.rb:60:in `fail'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/type/file/source.rb:166:in `metadata'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/type/file/source.rb:112:in `copy_source_
> values'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/type/file.rb:632:in `retrieve'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/type.rb:693:in 
> `retrieve_resource'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:32:in `p
> erform_changes'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:133:in `
> evaluate'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/transaction.rb:49:in `apply'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/transaction.rb:84:in `eval_resource'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/transaction.rb:104:in `evaluate'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:344:in 
> `thinmark'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/sys/ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:343:in 
> `thinmark'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/transaction.rb:104:in `evaluate'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/transaction.rb:383:in `traverse'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/transaction.rb:99:in `evaluate'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/resource/catalog.rb:144:in `apply'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/configurer.rb:122:in `apply_catalog'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:179:in 
> `benchmark'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/sys/ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:178:in 
> `benchmark'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/configurer.rb:121:in `apply_catalog'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/configurer.rb:179:in `run'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in 
> `run'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in 
> `run'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/sys/ruby/lib/ruby/1.8/sync.rb:230:in `synchronize'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in 
> `run'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/agent.rb:119:in `with_client'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:42:in 
> `run'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:84:in 
> `run_in_fork'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:41:in 
> `run'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/application.rb:175:in `call'
> C:/Program Files (x86)/Puppet 
> Labs/Puppet/puppet/lib/puppet/application.rb:175:in `controlled_run'
> C:/Progra

[Puppet Users] Re: syntax problems trying to use Keith Burdis's erwbgy/system module without Hiera

2013-03-21 Thread Ellison Marks
And just to have an answer on the list as well, the syntax in the docs is 
correct. Though it might be class { "system::ntp" in your case. Not sure of 
the specifics of that module.

http://docs.puppetlabs.com/puppet/3/reference/lang_classes.html#using-resource-like-declarations

On Thursday, March 21, 2013 1:09:02 PM UTC-7, John Smith wrote:
>
> I'm trying to use Keith Burdis's excellent erwbgy/system module without 
> Hiera, at least initially.
>
> http://forge.puppetlabs.com/erwbgy/system
>
> I cannot determine how call the modules.  From what I can tell the 
> documentation isn't quite correct (or I am reading it wrong).  I'm trying 
> to start with ntp because that's an easy to understand example.
>
> https://github.com/erwbgy/puppet-ntp
>
> The ntp documentation says 
>
> 
> Specify a list of time servers to use:
>
> class { 'ntp':
>   servers => [ 'ntp1.domain.com', 'ntp2.domain.com' ],
> }
> 
>
> If I enter it like this in my manifest, I get errors. I assume the correct 
> syntax is something more like this 
>
> 
> system::ntp { 'name': 
>   servers => [ 'ntp1.domain.com', 'ntp2.domain.com' ],
> }
> 
>
> but that syntax gets me this error
>  Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid 
> resource type system::ntp at /etc/puppet/manifests/site.pp:36 on node
>
> Any help with this would be appreciated..
> 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.




[Puppet Users] Re: Cannot use relative URL's

2013-03-21 Thread Ellison Marks
The source parameter takes URIs. You can't just give it a system path. Make 
sure the file lives in a "files" directory in a module and is properly 
readable by puppet and use puppet://modules/(modulename)/(filename) in 
source.

On Thursday, March 21, 2013 12:38:32 AM UTC-7, Dragos R wrote:
>
> Hi,
>
> I am running into this error:
>
> Running Puppet agent on demand ... 
>  
> Info: Retrieving plugin   
>   
> Info: Caching catalog for test-pc 
>   
> Error: Failed to apply catalog: Parameter source failed on 
> File[c:/locale.reg]: Cannot use relative URLs 
> '/etc/puppet/modules/a_locale' 
>
> Why the source is not working as should ?
> $ ls -l /etc/puppet/modules/
> -rw-r--r-- 1 root root  1898 Mar 20 15:44 a_locale
>
>
> site.pp
>
> case $operatingsystem {
>  windows: { $fileName="c:/locale.reg"}
>  default: { fail("[puppet]" os not supported) }
> }
>
> file { $fileName:
>ensure => present,
>source => "/etc/puppet/modules/a_locale",
> }
>
>  
>

-- 
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] Store configuration problem (mysql)

2013-03-19 Thread Ellison Marks
Pro Puppet wouldn't mention puppetdb, as it was written before puppetdb 
came out. As to your original question, if the puppetmaster service is 
running, that would probably inhibit you from starting a second one, as the 
PID file would already be in use. For the client not being able to connect, 
you need to make sure that the master is listening on the correct port and 
that your firewall isn't blocking on that port.

On Tuesday, March 19, 2013 7:30:34 PM UTC-7, mike wrote:
>
> I don't have idea of mysql and backed becoming obsolete. My guide is the 
> book: Pro Puppet, but within the section "stored configuration"  speak 
> about: mysql, postgres, sqlite and oracle and never puppetdb. (Thanks for 
> this tips).
> Respect whether  puppet master is running, yes is ok and the ports is 8140 
> is available .
>
> [……...]
> [root@puppet ~]# netstat -tlpn
> Active Internet connections (only servers)
> Proto Recv-Q Send-Q Local Address   Foreign Address   
>   State   PID/Program name
> tcp0  0 0.0.0.0:33060.0.0.0:* 
>   LISTEN  8288/mysqld
> tcp0  0 0.0.0.0:81400.0.0.0:* 
>   LISTEN  15436/ruby
> tcp0  0 0.0.0.0:22  0.0.0.0:* 
>   LISTEN  1120/sshd
> tcp0  0 :::22   :::*   
>  LISTEN  1120/sshd
> [root@puppet ~]#
> [root@puppet ~]# service puppetmaster status
> puppet (pid  15436) is running…
> [……...]
>
>
> Thanks!!
>
> El 19-03-2013, a las 22:13, 尹川 > 
> escribió:
>
> backend
>
>
>

-- 
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: Verbose debugging of template variable binding ?

2013-03-19 Thread Ellison Marks
If it's working using the declaration from your tests directory, but not 
from your master, then it stands to reason that either something is wrong 
with the way you're calling it on the master or something is wrong in your 
master setup that is causing a communication error. Could you post how 
you're calling it from your master?

On Tuesday, March 19, 2013 6:29:12 AM UTC-7, Francis Pereira wrote:
>
> I seem to have made some error in my template but cant seem find a way to 
> debug it except for removing (deleting) parts of the template file and 
> figuring out where there is a mistake. 
>
> On my puppetmaster with --debug I get the following error
> debug: template[/etc/puppet/manifests/lib/redis/templates/redis.conf.erb]: 
> Bound template variables for 
> /etc/puppet/manifests/lib/redis/templates/redis.conf.erb in 0.00 seconds
>
> On the client I get 
> err: Could not retrieve catalog from remote server: No content type in 
> http response; cannot parse.
>
> I am certain that there is something wrong in my template. How do I debug 
> binding of template variables ?  Is there a verbose mode that would tell me 
> where the binding breaks ?
>
> The template is available at 
> https://github.com/7terminals/puppet-redis/blob/master/templates/redis.conf.erband
>  the full module is hosted at 
> https://github.com/7terminals/puppet-redis/  
>
> Ironically, when running in standalone mode i.e puppet apply tests/ini.pp 
> this module/template seems to work.
>
>
> ~Francis
>
>

-- 
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: Installing puppet modules

2013-03-15 Thread Ellison Marks
Unless you're using puppet apply, you don't download modules to the 
individual nodes, you download them to your master. The master uses the 
modules to compile a catalog which it then ships off to a node. Or in other 
words, I'm not sure what your question is. Why do your nodes need to 
download modules?

On Friday, March 15, 2013 9:24:36 AM UTC-7, Mike Power wrote:
>
> I want to setup a node using a three step process
> 1) download node requirements (git)
> 2) download modules to fit requirements (puppet)
> 3) Bring up the node in the required state (puppet)
>
> The second step is the one I am having trouble with.  I want a file 
> (master.pp) to list out all the modules and what versions are needed before 
> applying the site.pp file.  From what I have been able to find there are 
> two possible approaches.
>
> 1) Use some module to download and unzip tars.  In this master.pp file use 
> the module to download the other modules from urls and extract them in the 
> module path.  The problem I have is that I cannot figure out how to get the 
> modulepath in the master.pp file and parse it such that I can extract the 
> tars in the right location.  I tried something like:
> archive {"$file":
> ensure  => present,
> url => "$url",
> checksum=> false,
> extension   => "tar.gz",
> target  => split("$::modulepath", ":")[0],
> }
>
> But that doesn't work.  
>
>
> 2) There is another module called puppet_module (
> https://github.com/rcoleman/puppet_module_provider) which allows you to 
> download and install modules from puppetforge.  This module works great.  
> Except that I need to download modules from an intranet location not an 
> internet location. I do not have control over puppetforge so I do not have 
> control over how long stuff stays up there, when it changes etc.  I need to 
> house the modules on a local file store such that as we make the decision 
> to upgrade we can do those upgrades other then that the modules will always 
> remain available.  The puppet_module (reading the source code) does have a 
> source parameter.  I assume then you could point it at something other than 
> puppetforge.  But it is not documented and I am not sure I can easily 
> produce a in house puppet forge that would have the needed filesystem 
> layout for puppet_module to work.
>
> Have other people looked into this problem?  What have they come up with?
>

-- 
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: how puppet restart a service

2013-03-15 Thread Ellison Marks
You don't need the restart command there. When you say "hasrestart => 
true", you're telling puppet that the init script has a restart command, so 
it's going to call "/sbin/service lighttpd restart" anyway. If you say 
"hasrestart => false", the default is to do a "service lighttpd stop && 
service lighttpd start". The restart parameter is for specifying the 
command to restart the service if it isn't handled by the init script and 
you want something more complicated than the default.

On Friday, March 15, 2013 12:06:02 AM UTC-7, 陈士超 wrote:
>
> i do like this:
> service{
> "lighttpd":
> hasrestart => true,
> hasstatus => true,
> restart => "/sbin/service lighttpd restart",
> }
>
> But it dose not work
>

-- 
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_hash lookups for included classes?

2013-03-15 Thread Ellison Marks
The difference between array and hash resolution makes sense, from a 
certain perspective. As an array is fine with holding duplicate values, it 
just gets all the data and flattens it down, but since a hash needs unique 
keys, to return a fairly flat hash, it can only take one value for each 
key, and prefers the more specific.

The string and array restriction is quite odd though, looking at it now...

On Friday, March 15, 2013 8:28:56 AM UTC-7, jcbollinger wrote:
>
>
>
> On Thursday, March 14, 2013 3:39:41 PM UTC-5, Ellison Marks wrote:
>>
>> I'm pretty sure it does do merging, in the yaml backend at least.
>>
>> case resolution_type
>> ...
>> when :hash
>> raise Exception, "Hiera type mismatch: expected Hash and got 
>> #{new_answer.class}" unless new_answer.kind_of? Hash
>> answer ||= {}
>> answer = new_answer.merge answer
>>
>>
>
> Never mind.  I somehow got a totally wrong idea of what hiera_hash() 
> does.  I probably formed it by analogy with hiera_array(), but in fact they 
> aren't very analogous in that hiera_array() gives you all the data in your 
> hierarchy, whereas hiera_hash() gives you a digested form.  It looks like 
> it does merge (but only shallowly until 1.2).
>
> I got another surprise when studying the code, too: hiera_array() is much 
> less general than I thought.  It collects only String and Array values, not 
> numeric, boolean, or hash values.  It raises an exception if any of the 
> collected values for the give key is of any of the latter types, and it is 
> not clear to me 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 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: randomly changing template (hiera backed)

2013-03-14 Thread Ellison Marks
each_pair, so that a hash structure, yes? Ruby hashes are unordered in 1.8. 
Iterating like that isn't guaranteed to be the same every time. You can 
iterate over the sorted keys, then get the params variable by lookup using 
the key.

<%
cachebins.keys.sort.each do |bin|
  params = cachebins[bin]
%>
[stuff...]
<% end -%>

On Thursday, March 14, 2013 5:24:50 PM UTC-7, jc.listmail wrote:
>
> I have a template that I'm using to build Memcache configs from.  The 
> template looks like this:
>
> USER="memcached"
> MAXCONN="1024"
> OPTIONS=""
> PIDDIR="/var/run/memcached"
>
> <% cachebins.each_pair do |bin, params| %>
> <%= bin.upcase %>_PORT="<%= params['port'] %>"
> <%= bin.upcase %>_CACHESIZE="<%= params['cachesize'] %>"
> <%= bin.upcase %>_PIDFILE="$PIDDIR/<%= bin %>.pid"
> <% end -%>
>
> The hiera config looks like this:
>
> memcache:
>   default:
> port: 11211
> cachesize: 64
>   session:
> port: 11212
> cachesize: 128
>   menu:
> port: 11213
> cachesize: 64
>   views:
> port: 11214
> cachesize: 64
>   filter:
> port: 11215
> cachesize: 32
>   users:
> port: 11216
> cachesize: 32
>   page:
> port: 11217
> cachesize: 32
>
> and init.pp looks like this:
>
> $cachebins = hiera('memcache')
>   
>  file { "memcache_conf":
> path => "/etc/sysconfig/memcached",
> owner => root,
> group => root,
> mode => 644,
> notify => Service["memcached"],
> content => template("memcache/memcached.conf.erb"),
> }
>
> The issue is that when the template is compiled, it periodically (and 
> randomly) gets recompiled in a different order, which causes my notify 
> statement to fire and restart memcache.
>
> The actual contents don't change, just the order in which the bins are 
> listed in the template.  I was expecting the layout to follow my hiera data 
> structure, but it seems to glob them in an unordered (and maybe random) 
> manner when it parses out into the template.
>
> Maybe I'm going about this in the wrong way in terms of importing my hiera 
> data, but is there a way I can force the template to be built in the same 
> order every time so that I don't have the file randomly updating and 
> causing a restart from my notify?
>
>
>

-- 
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_hash lookups for included classes?

2013-03-14 Thread Ellison Marks
I'm pretty sure it does do merging, in the yaml backend at least.

case resolution_type
...
when :hash
raise Exception, "Hiera type mismatch: expected Hash and got 
#{new_answer.class}" unless new_answer.kind_of? Hash
answer ||= {}
answer = new_answer.merge answer

On Thursday, March 14, 2013 7:26:59 AM UTC-7, jcbollinger wrote:
>
>
>
> On Wednesday, March 13, 2013 8:51:04 PM UTC-5, Ellison Marks wrote:
>>
>> You can just call hiera_hash() from within your manifest, no?
>
>
>
> No.  The OP wants hash merging, and hiera_hash() doesn't do that (as far 
> as I understand).  It will instead return a hash whose keys are hierarchy 
> levels, and whose values are those associated with the requested key at the 
> corresponding level.  Hash merging is supposedly included in Hiera 1.2, 
> which is now at release candidate stage, but I don't know what the API for 
> it looks like.
>
> With older hiera, you can use hiera_array() to get the component hashes in 
> hierarchy order, and then merge them manually.  The puppetlabs-stdlib 
> module provides a merge function that does almost what the OP wants, but 
> although it will merge an arbitrary number of hashes, I don't think it will 
> accept them in array-of-hashes form.
>
>
> 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_hash lookups for included classes?

2013-03-13 Thread Ellison Marks
You can just call hiera_hash() from within your manifest, no? It's not 
quite as pretty as auto lookup, but it works, and we can hope we get some 
prettier syntax in the future.

On Wednesday, March 13, 2013 6:28:00 PM UTC-7, Scott Merrill wrote:
>
> When using "include" to include a class Hiera helpfully performs an 
> autolookup on the parameters of the included class. Specially-named 
> variable names are automatically pulled from the Hiera datastore(s) and 
> passed into the included module. This is pretty awesome.
>
> But it looks like included resources _only_ perform a hiera() lookup. If 
> we have a hash defined in several levels of our Hiera data, and we want the 
> hash to be collapsed into a single hash following hierarchy order, does 
> Hiera offer a way to perform a hiera_hash() lookup for the autolookup?
>
> The documentation discourages mixing defined-type module inclusion and 
> "include"-type module inclusion. So if there's no hiera_hash() option for 
> autolookups, we're required to use defined-type inclusion, yes?
>
> 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.




[Puppet Users] Re: get a hash from multiple levels(with the same keys but different values) with hiera

2013-03-13 Thread Ellison Marks
the hiera() call bails out the first time it finds an answer. Assuming 
you're calling something like hiera('sshd_config'), you're getting that 
first answer and nothing else. You need to replace the hiera() call with 
hiera_hash(), which will merge a hash at all levels of the hierarchy, 
preferring more specific answers.

On Wednesday, March 13, 2013 8:26:58 AM UTC-7, Alexandru Dragoescu wrote:
>
> Hello,
>
> I have this configuration:
>
> File: comon.yaml
>
> SSH:
>  ConfigFolder: "/etc/ssh/"
>  sshd_config:
>   Protocol: "1,2"
>   SyslogFacility: "AUTHPRIV"
>   *PermitRootLogin*: "no"
>   PasswordAuthentication: "yes"
>   ChallengeResponseAuthentication: "no"
>   GSSAPIAuthentication: "yes"
>   GSSAPICleanupCredentials: "yes"
>   UsePAM: "yes"
>   *ClientAliveInterval*: "100"
>
> File test_env.yaml [same keys as in comon.yaml but with different values] :
>
> SSH
>  sshd_config:
>   *PermitRootLogin*: "yes"
>   *ClientAliveInterval*: "80"
>
>
> File hiera.yaml:
>
> ---
> :backend:
>   - yaml
> :hierarchy:
>   - %{environment}
>   - comon
>
> :yaml:
> # datadir is empty here, so hiera uses its defaults:
> # - /var/lib/hiera on *nix
> # - %CommonAppData%\PuppetLabs\hiera\var on Windows
> # When specifying a datadir, make sure the directory exists.
>   :datadir: /etc/puppet/hieradata
>
> In puppet code:
>  $ssh_data = hiera_hash('SSH')
>  $sshd_config = $ssh_data('sshd_config')
>
>
> If a node has %{environment} == test_env I want to retrieve a hash 
> (in sshd_config) like:
>
>   Protocol: "1,2"
>   SyslogFacility: "AUTHPRIV"
> *  PermitRootLogin: "yes"*
>   PasswordAuthentication: "yes"
>   ChallengeResponseAuthentication: "no"
>   GSSAPIAuthentication: "yes"
>   GSSAPICleanupCredentials: "yes"
>   UsePAM: "yes"
> *  ClientAliveInterval: "80"*
>
> if environment != test_env then I want to retrieve :
>
>   Protocol: "1,2"
>   SyslogFacility: "AUTHPRIV"
>   *PermitRootLogin: "no"*
>   PasswordAuthentication: "yes"
>   ChallengeResponseAuthentication: "no"
>   GSSAPIAuthentication: "yes"
>   GSSAPICleanupCredentials: "yes"
>   UsePAM: "yes"
>   *ClientAliveInterval: "100"*
>
>
>
> In my setup for the first care i get (it reads only test_env.yaml - that 
> is not what I want):
>   *PermitRootLogin*: "yes"
>   *ClientAliveInterval*: "80"
>
> and for the second (reads only comon.yaml - is ok) :
>
>   Protocol: "1,2"
>   SyslogFacility: "AUTHPRIV"
>   *PermitRootLogin*: "no"
>   PasswordAuthentication: "yes"
>   ChallengeResponseAuthentication: "no"
>   GSSAPIAuthentication: "yes"
>   GSSAPICleanupCredentials: "yes"
>   UsePAM: "yes"
>   *ClientAliveInterval*: "100"
>
> Is this possible with my Hiera definition?
>
>
> Thank you,
> Alex
>
>

-- 
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: Basic stuff, I can't seem to get right, Could not retrieve information from environment production source(s)

2013-03-12 Thread Ellison Marks
If you haven't touched it, it should be fine. Other things to keep in mind:

The puppetmaster is probably running as the user puppet, not root, and even 
if the file itself is readable by all, the intervening directories might be 
more restrictive.

On Tuesday, March 12, 2013 11:02:01 AM UTC-7, Race Boyer wrote:
>
> No, I've never looked at it before. Should it be changed or remain 
> unchanged? Or configured to allow one to access modules?
>
> On Tuesday, March 12, 2013 12:45:51 PM UTC-5, Ellison Marks wrote:
>>
>> Might be an auth.conf problem. Have you changed anything in there?
>>
>> On Tuesday, March 12, 2013 10:16:02 AM UTC-7, Race Boyer wrote:
>>>
>>> I really hate to bother everyone with with something I'm sure is super 
>>> basic, but I'm stumped.
>>>
>>> I've read the module serving guide, I checked my syntax with 
>>> puppet-lint, I think I have everything in place, yet I keep getting the 
>>> same error:
>>>
>>>
>>> Tue Mar 12 11:49:28 -0500 2013 Puppet (notice): Starting Puppet client 
>>>> version 2.6.17
>>>> Tue Mar 12 11:49:28 -0500 2013 /File[/var/lib/puppet/lib] (err): Could 
>>>> not evaluate: Could not retrieve information from environment production 
>>>> source(s) puppet://puppet/plugins
>>>> Tue Mar 12 11:49:29 -0500 2013 /Stage[main]//File[/etc/ssh/sshd_config] 
>>>> (err): Could not evaluate: Could not retrieve information from environment 
>>>> production source(s) puppet:///modules/sshd/sshd_config at 
>>>> /etc/puppet/manifests/site.pp:20
>>>> Tue Mar 12 11:49:29 -0500 2013 /Stage[main]//Service[sshd] (notice): 
>>>> Dependency File[/etc/ssh/sshd_config] has failures: true
>>>> Tue Mar 12 11:49:29 -0500 2013 /Stage[main]//Service[sshd] (warning): 
>>>> Skipping because of failed dependencies
>>>>
>>>
>>> I was thinking there was some sort of permissions error somewhere? But 
>>> since I'm running as root, I don't think that's likely, plus I have even 
>>> 777 the sshd_config to test. Here is my site.pp, if anyone can look it over 
>>> and at least point me in the right direction it would be greatly 
>>> appreciated. I've already scoured this forum, but I think I'm missing 
>>> something.
>>>
>>> package { 'openssh':
>>>>   ensure => installed,
>>>> }
>>>>
>>>> file { '/etc/ssh/sshd_config':
>>>>   source => 'puppet:///modules/sshd/sshd_config',
>>>>   owner => root,
>>>>   group => root,
>>>>   mode => '0640',
>>>>   notify => Service['sshd'], #restart sshd.
>>>>   require => Package['openssh'],
>>>> }
>>>>
>>>> service { 'sshd':
>>>>   ensure => running,
>>>>   enable => true,
>>>>   hasstatus => true,
>>>>   hasrestart => true,
>>>> }
>>>>
>>>
>>> Any help would be greatly appreciated. 
>>>
>>>

-- 
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: Basic stuff, I can't seem to get right, Could not retrieve information from environment production source(s)

2013-03-12 Thread Ellison Marks
Might be an auth.conf problem. Have you changed anything in there?

On Tuesday, March 12, 2013 10:16:02 AM UTC-7, Race Boyer wrote:
>
> I really hate to bother everyone with with something I'm sure is super 
> basic, but I'm stumped.
>
> I've read the module serving guide, I checked my syntax with puppet-lint, 
> I think I have everything in place, yet I keep getting the same error:
>
>
> Tue Mar 12 11:49:28 -0500 2013 Puppet (notice): Starting Puppet client 
>> version 2.6.17
>> Tue Mar 12 11:49:28 -0500 2013 /File[/var/lib/puppet/lib] (err): Could 
>> not evaluate: Could not retrieve information from environment production 
>> source(s) puppet://puppet/plugins
>> Tue Mar 12 11:49:29 -0500 2013 /Stage[main]//File[/etc/ssh/sshd_config] 
>> (err): Could not evaluate: Could not retrieve information from environment 
>> production source(s) puppet:///modules/sshd/sshd_config at 
>> /etc/puppet/manifests/site.pp:20
>> Tue Mar 12 11:49:29 -0500 2013 /Stage[main]//Service[sshd] (notice): 
>> Dependency File[/etc/ssh/sshd_config] has failures: true
>> Tue Mar 12 11:49:29 -0500 2013 /Stage[main]//Service[sshd] (warning): 
>> Skipping because of failed dependencies
>>
>
> I was thinking there was some sort of permissions error somewhere? But 
> since I'm running as root, I don't think that's likely, plus I have even 
> 777 the sshd_config to test. Here is my site.pp, if anyone can look it over 
> and at least point me in the right direction it would be greatly 
> appreciated. I've already scoured this forum, but I think I'm missing 
> something.
>
> package { 'openssh':
>>   ensure => installed,
>> }
>>
>> file { '/etc/ssh/sshd_config':
>>   source => 'puppet:///modules/sshd/sshd_config',
>>   owner => root,
>>   group => root,
>>   mode => '0640',
>>   notify => Service['sshd'], #restart sshd.
>>   require => Package['openssh'],
>> }
>>
>> service { 'sshd':
>>   ensure => running,
>>   enable => true,
>>   hasstatus => true,
>>   hasrestart => true,
>> }
>>
>
> Any help would be greatly appreciated. 
>
>

-- 
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 top down data?

2013-03-11 Thread Ellison Marks
I think what you're describing fits exported resources. That is, each node 
would get it's data from hiera and export it, and then the main node would 
spaceship it all up.

http://docs.puppetlabs.com/puppet/3/reference/lang_exported.html
http://docs.puppetlabs.com/guides/exported_resources.html

On Monday, March 11, 2013 2:52:52 PM UTC-7, Josh Harrison wrote:
>
> Hi all,
> So, I am trying to use Hiera in combination with a glusterfs module from 
> https://forge.puppetlabs.com/thias/glusterfs. 
> What I'd like to be able to do is, in node specific files, define 
> something like
> glusternode:
>   - host: gluster1.blah
>   - ip: 1.2.3.4
> in gluster1.blah.yaml
>
> I'm populating a puppet class call that looks like this:
> class { 'glusterfs::server': peers => $::hostname ? { 'server1' => 
> '192.168.0.2', 'server2' => '192.168.0.1', }, }
>
> What I'd then want to do would be assemble all of the data from each hiera 
> node specific config file into a hash I can pass to puppet listing all my 
> hosts. Is there any way to do this? I suppose another way to say it is that 
> from the root, I want to pull specific data off all of the leaves and pass 
> all that data on to puppet.
>
> I want to essentially do this for in my declaration:
> class { 'glusterfs::server': peers => $::hostname ? {
> hiera(glusternodes) }, }
> Any ideas?
> Thanks!
> -Josh
>

-- 
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: hiera / create_resources / define

2013-03-11 Thread Ellison Marks
You don't have access to the configs variable What you do have access to is 
the $title variable, which I think is what you want. This is automatically 
set by puppet to the name of the defined type's instance. In this case, 
config1, config2... config100.

http://docs.puppetlabs.com/puppet/latest/reference/lang_defined_types.html#title-and-name

On Monday, March 11, 2013 10:46:52 AM UTC-7, jc.listmail wrote:
>
> So, this is mostly working now (thanks for the pointers!), but how can I 
> reference the top level "configs" within my define?  For example:
>
> configs:
>   config1:
> Name: app1
> WorkingDir: /var/app1
>   config2:
> Name: app2
> WorkingDir: /var/app2
>   ...
>   config100:
> Name: app100
> WorkingDir: /var/app100
>
>  define app::virtualApps($Name, $WorkingDir) {
> file {"/etc/apps/$configs[0].conf":
>   owner => root,
>   group => root,
>   mode => 644,
>   content => template("app/foo.conf.erb"
>   }
> I want to be able to reference "config1", "config2", ... "config100" as a 
> variable ($config)from within the define.  In this case, using them as the 
> base file name for each instance of a config file.
>
> The error I get when trying to process this file is:
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Must pass config to app::virtualApps[config1]
>
>
> On Fri, Mar 8, 2013 at 2:49 PM, Ellison Marks 
> > wrote:
>
>> Through create_resources, Name and WorkingDir are being passed to your 
>> defined type as parameters. Your defined type though, does not accept 
>> parameters. something like this:
>>
>> define app::virtualApps($Name, $WorkingDir) {
>>
>> should work, though you'll also have to work out case, as it seems you're 
>> using lower case in your template and upper in your YAML. The YAML, defined 
>> type parameters and template should all match, variable name-wise.
>>
>>
>> On Friday, March 8, 2013 2:18:30 PM UTC-8, jc.listmail wrote:
>>>
>>> I'm trying to use create_resources to create a series of files with 
>>> semi-custom content based on a template.  
>>>
>>> This is what I have:
>>>
>>> foo.conf.erb:
>>>   Name "<%= name %>"
>>>   WorkingDir "<%= working_dir %>"
>>>   ...  a bunch of static entries
>>>
>>> YAML:
>>>
>>> configs:
>>>   config1:
>>> Name: app1
>>> WorkingDir: /var/app1
>>>   config2:
>>> Name: app2
>>> WorkingDir: /var/app2
>>>   ...
>>>   config100:
>>> Name: app100
>>> WorkingDir: /var/app100
>>>
>>> manifest:
>>>   class app {
>>>
>>>create_resources(app::**virtualApps, hiera('configs'))
>>>
>>>   }
>>>
>>>   define app::virtualApps() {
>>> file {"/etc/apps/$app.conf":
>>>   owner => root,
>>>   group => root,
>>>   mode => 644,
>>>   content => template("app/foo.conf.erb"
>>>   }
>>>
>>>
>>> I know this is not correct.  I am missing at least one important concept 
>>> here.  What I am stuck on is how, using create_resources, I can reference 
>>> the parameters named in the YAML config so that I end up with a config file 
>>> on the file system for each.  My understanding of create_resources was that 
>>> this would be a good use for it, in that it will call app::virtualApps() 
>>> once for each hash defined under "configs" in the YAML file, which should 
>>> result in the structure I want.  What I am not getting is what the 
>>> datastructure looks like that is being provided to app::virtualApps() and 
>>> how you can reference those parameters, both in the define AND the 
>>> associated template.
>>>
>>> I'd like to end up with:
>>>
>>> /etc/apps/app1-100.conf with the contents that look like:
>>>
>>> Example:
>>>
>>> /etc/apps/app1.conf:
>>>   Name "app1"
>>>   WorkingDir: "/var/app1"
>>>   
>>>
>>>
>>>  -- 
>> 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.
>>  
>>  
>>
>
>

-- 
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 yaml namespace nesting

2013-03-10 Thread Ellison Marks
What the second structure you wrote evaluates to is a nested nested nested 
hash.

{role => {ui => { public_hostname => test } } }

The keyword looked up in hiera, role::ui::hostname in this case, is just a 
string, nothing special.

On Sunday, March 10, 2013 10:40:11 AM UTC-7, Bilco105 wrote:
>
> Hi, 
>
> I've just got hiera deployed into a new puppet environment, and have 
> defined a class as follows:
>
> modules/role/manifests/ui.pp
> =
> class role::ui (
> $public_hostname
> ) {
> notify {'role::ui::notify':
> message => "role::ui configured for ${::data_center}; hostname: 
> $public_hostname",
> }
> }
>
> This is then included into the default node configuration. 
>
> In my common.yaml, if I lay the file out as follows:
>
> manifests/hieradata/common.yaml
> =
> ---
> role::ui::public_hostname: test
>
> It works fine, and the variable is available within my Puppet manifest. 
> However, if I try and nest the YAML to make the configuration read cleaner:
>
> manifests/hieradata/common.yaml
> =
> ---
> role:
> ui:
> public_hostname: test
>
> The same variable does not get passed through. Is this type of format not 
> supported in either YAML or JSON?
>
> Thanks,
> Rob
>

-- 
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 CentOS package versions with Puppet

2013-03-10 Thread Ellison Marks
If you want to ensure specific versions of packages, then yes, creating 
your own repo with the desired package is the best way to do it. It gives 
you absolute control over what your clients see, and It's fairly simple as 
well. You also get to omit the version numbers from your package 
declaration up there. Just make sure to exclude the packages you mirror 
from the normal repos, so they don't get updated anyway.

There's not really anything horrible about it, if you've already admitted 
to wanting out of date packages. :)

On Sunday, March 10, 2013 9:49:42 AM UTC-7, blalor wrote:
>
> I've been designing the infrastructure for a new team using CentOS 6 and 
> Puppet.  I'm still learning Puppet, but thought I had things pretty well 
> under control.  After this week, I'm beginning to wonder… :-) 
>
> In the last week I've had versions of three packages disappear from the 
> yum repositories I'm using.  Since I'm trying to install specific versions 
> of packages with Puppet, this is a problem.  The most recent one that just 
> turned up this morning is kernel-devel.  I have the following resource 
> defined in one of my Puppet manifests: 
>
> package {"kernel-devel-${::kernelrelease}": 
> alias => 'kernel-devel', 
> } 
>
> I'm trying to ensure that I've got the kernel-devel package installed that 
> matches the kernel I'm currently using.  I naively assumed that once a 
> package was made available via the official CentOS mirrors that it would 
> never disappear.  That doesn't appear to be the case.  I the 
> kernel-2.6.32-279.19.1.el6.x86_64 package installed. 
>  kernel-devel-2.6.32-279.19.1.el6.x86_64 is gone, apparently replaced with 
> kernel-devel-2.6.32-358.0.1.el6.x86_64.  I have a couple of other packages 
> that have given me problems, too, namely ngircd which was upgraded from 18 
> to 20.1. 
>
> How do I manage this problem?  Do I need to maintain my own mirrors?  That 
> seems like a horrible solution.  Is there another CentOS repository I 
> should be using?  Am I just going about this all wrong? 
>
> Thanks, 
> Brian 
>
> -- 
> Brian Lalor 
> bla...@bravo5.org  
>
>
>

-- 
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: error with apply the class

2013-03-08 Thread Ellison Marks
You have two values for ensure in you package resources. For services, you 
need two resources each. First, package, with ensure present to install the 
package. Second, service, with ensure running to start the service. Also, 
neither of those packages has an associated service. Perhaps you meant 
telnet-server?

On Friday, March 8, 2013 3:37:11 PM UTC-8, mike wrote:
>
> Hi,
> I am declaring class (for test)  on my puppet master but when i want apply 
> on my node i have the next error:
>
> [root@nodo1 ~]#  puppet agent --test --noop
> Info: Retrieving plugin
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not find class baseConf for nodo1.example.com on node 
> nodo1.example.com
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
> [root@nodo1 ~]#
>
> My structure puppet master is:
>
> [root@master puppet]# ll modules/baseConf/
> files/ manifests/ templates/
>
> My class: 
>
> [root@master puppet]# less modules/baseConf/manifests/init.pp
> class baseConf {
>
> package { "telnet": ensure => present, ensure => running, }
> package { "nmap": ensure => present, ensure => running, }
>
> }
>
> My statement site.pp
>
> [root@master puppet]# less manifests/site.pp
>
> node 'nodo1.example.com' {
> include baseConf
> }
>
>
> I check the sintax and the structure directory but i don undertand the 
> problem.
>
>
>

-- 
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 / create_resources / define

2013-03-08 Thread Ellison Marks
Through create_resources, Name and WorkingDir are being passed to your 
defined type as parameters. Your defined type though, does not accept 
parameters. something like this:

define app::virtualApps($Name, $WorkingDir) {

should work, though you'll also have to work out case, as it seems you're 
using lower case in your template and upper in your YAML. The YAML, defined 
type parameters and template should all match, variable name-wise.

On Friday, March 8, 2013 2:18:30 PM UTC-8, jc.listmail wrote:
>
> I'm trying to use create_resources to create a series of files with 
> semi-custom content based on a template.  
>
> This is what I have:
>
> foo.conf.erb:
>   Name "<%= name %>"
>   WorkingDir "<%= working_dir %>"
>   ...  a bunch of static entries
>
> YAML:
>
> configs:
>   config1:
> Name: app1
> WorkingDir: /var/app1
>   config2:
> Name: app2
> WorkingDir: /var/app2
>   ...
>   config100:
> Name: app100
> WorkingDir: /var/app100
>
> manifest:
>   class app {
>
>create_resources(app::virtualApps, hiera('configs'))
>
>   }
>
>   define app::virtualApps() {
> file {"/etc/apps/$app.conf":
>   owner => root,
>   group => root,
>   mode => 644,
>   content => template("app/foo.conf.erb"
>   }
>
>
> I know this is not correct.  I am missing at least one important concept 
> here.  What I am stuck on is how, using create_resources, I can reference 
> the parameters named in the YAML config so that I end up with a config file 
> on the file system for each.  My understanding of create_resources was that 
> this would be a good use for it, in that it will call app::virtualApps() 
> once for each hash defined under "configs" in the YAML file, which should 
> result in the structure I want.  What I am not getting is what the 
> datastructure looks like that is being provided to app::virtualApps() and 
> how you can reference those parameters, both in the define AND the 
> associated template.
>
> I'd like to end up with:
>
> /etc/apps/app1-100.conf with the contents that look like:
>
> Example:
>
> /etc/apps/app1.conf:
>   Name "app1"
>   WorkingDir: "/var/app1"
>   
>
>
>

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




  1   2   >