Re: [Puppet Users] puppet-module error with 3.0.2

2013-02-05 Thread Phips
On Thursday, January 17, 2013 10:05:38 AM UTC, Dominic Cleal wrote:
>
> On 17/01/13 09:53, Mark Phillips wrote: 
> > Hey Folks, 
> > 
> > Has anybody seen this when using puppet-module, installed via gem, in 
> puppet 
> > 3.0.2 on CentOS 6.3? 
>
> You don't want to use the puppet-module gem, you want to use the "puppet 
> module" command built into Puppet.  The gem's not maintained and was 
> rolled into Puppet in 2.7.14. 
>

Ah! That'll be it :) Thanks Dom. 

-- 
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 creating AWS EC instances

2013-02-05 Thread PuppetUser
Hi Salum
 
I used latest fog and the errors are gone. Thanks for that. 
 
Regards
 
PuppetUsers
 
 

On Saturday, February 2, 2013 12:03:35 AM UTC+5:30, Felipe Salum wrote:

> Upgrade to latest fog and the errors are gone.
>
> On Friday, February 1, 2013 1:34:50 AM UTC-8, PuppetUser wrote: 
>>
>> Hi,
>>  
>> I have installed fog 0.7.2 on linux amazon ami. Created ~/.fog file and 
>> gave AWS credentials in the file.
>> For verification i used
>>  
>> >ruby -rubygems -e 'require "fog"' -e 'puts Fog::Compute.new(:provider => 
>> "AWS").servers.length >= 0'
>> This returns true but with the following error.
>>  
>> Excon requests with a block are deprecated, pass :response_block instead 
>> (/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/lib/fog/core/connection.rb:20:in 
>> `request')
>> true
>> When i use 
>> puppet node_aws create --image ami-0011e069   --keyname puppet --type 
>> m1.large for creating an instance, the instance is created but it gets 
>> terminated. 
>>  
>> I get the following error in the console repeatedly
>>  
>> Excon requests with a block are deprecated, pass :response_block instead 
>> (/usr/lib/ruby/gems/1.8/gems/fog-0.7.2/lib/fog/core/connection.rb:20:in 
>> `request')
>>  
>> At end the instance will get created.
>> In the console if i see the instance, the instance is terminated.
>>  
>> Can any one say what would be the issue. Waiting for the response
>>  
>> Regards
>>  
>> Srinivas
>>
>>

-- 
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] Augeas and defvar --> regexp

2013-02-05 Thread Dominic Cleal
On 01/02/13 10:35, "Schöke, Karsten" wrote:
> Hallo,
> 
>  
> 
> I have a problem to include augeas…
> 
> I will to change a comment to a entry in /etc/default/tmpfs in Debian
> Wheezy.
> 
> The comment is
> 
> #RAMTMP=no
> 
>  
> 
> I try this on augtool und it is running:
> 
> augtool> defvar ramtmpcomment
> /files/etc/default/tmpfs/#comment[.=~regexp('RAMTMP=no')]
> 
> augtool> ins RAMTMP after $ramtmpcomment
> 
> augtool> set /files/etc/default/tmpfs/RAMTMP yes
> 
> augtool> rm $ramtmpcomment
> 
>  
> 
> After I running this the entry is correct.
> 
>  
> 
> But, I try this on puppet:
> 
> augeas {"tmpfs":
> 
>   context => "/files/etc/default/tmpfs",
> 
>  changes => [
> 
>  "defvar ramtmpcomment #comment[.=~regexp('RAMTMP=no')]",
> 
>  "ins RAMTMP after $ramtmpcomment",

You should use single quotes here, or escape the variable name with
\$ramtmpcomment.  Puppet will be interpolating the variable itself
rather than letting Augeas do it.

-- 
Dominic Cleal
Red Hat Engineering

-- 
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] Fun and games with defined types :(

2013-02-05 Thread Gavin Williams
Morning all

I'm currently scratching my head with this one, as it's something I've done 
several times already in this module... 

Anyways, the problem...

I'm trying to create a defined type which will add a new fragment to a 
concat file... 
The class/define is: 
https://gist.github.com/fatmcgav/4713861#file-tnsnames-pp. The file path 
within the module is: *modules/act/manifests/util/linux/oracle/tnsnames.pp*

Whenever I try and use *tnsnames::add*, I get:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid 
resource type tnsnames::add at 
/etc/puppet/modules/act/manifests/env/oracle/instance/netapp.pp:119 on node 
act-star-db07.card.co.uk
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Example usage is: https://gist.github.com/fatmcgav/4713861#file-netapp-pp

However this defined type model is no different to several others that I've 
defined... A working example is: 
https://gist.github.com/fatmcgav/4713861#file-oraenvs-pp. This file path 
is: *modules/act/manifests/util/linux/oracle/oraenvs.pp*.

I've tried restarting the puppet master service without any success. 

Any ideas why I'm having issues?

Cheers
Gavin 

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




Re: [Puppet Users] Re: puppet client 0.22.1-1 unable to communicate with master on 3.0.2-1

2013-02-05 Thread David Schmitt

On 04.02.2013 12:55, Chux wrote:

Nick,

This is not looking promising .. dapper is on ruby 1.8.4, and the
nearest ubuntu version that could get me up to ruby 1.8.5 is feisty ..

So, I modified apt preferences, to try and pull in the right versions of
ruby from feisty (had to do the same for puppet and facter) .. However,
the major show-stopper in this direction is glibc ...

I need glibc >= 2.5, but the highest possible for dapper (without
risking bricking the system) is glibc 2.3.6 ...


Can http://rvm.io build a "local" ruby for you on that system?


Regards, D.



So, I am afraid this is a no go .. Thanks for the insight you have provided.

best regards ..

On Saturday, 2 February 2013 01:51:03 UTC, Nick Fagerlund wrote:

You're in a gnarly situation. DistroWatch is telling me that you're
probably running Ruby 1.8.4, which, damn.

I think your best bet is:

* Find or build a newer Ruby, preferably 1.8.7.
* Either install Puppet from source
(http://docs.puppetlabs.com/guides/from_source.html
) or force apt
to install a Puppet package meant for a newer distro. I... THINK the
packages from the Puppet Labs repo ought to limp along just fine if
the Ruby is new enough, but I've never heard of it being tried with
Dapper.

Good luck with that.

On Friday, February 1, 2013 10:18:49 AM UTC-8, Chux wrote:

Hi,

I have a client that I cannot upgrade from ubuntu 6.06 (due to
application dependency issues) ... I have been able to get
puppet/facter installed on it, but it seems unable to make
certificate requests ..


#/usr/sbin/puppetd -d -t -v
err: No certificate; running with reduced functionality.
info: Creating a new certificate request for
cofkedit.bodleian.ox.ac.uk 
info: Requesting certificate
warning: peer certificate won't be verified in this SSL session
err: Could not call puppetca.getcert: #
err: Could not request certificate: Certificate retrieval
failed: HTTP-Error: 400 Bad Request
==

I have seem a few admonitions against using clients that are
old, but I have no choice in this one if I hope to deploy puppet
on it .. or are there work arounds I can attempt ?


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




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




[Puppet Users] Re: Fun and games with defined types :(

2013-02-05 Thread Gavin Williams
Doh, just had that brain-wave moment... 

I forgot to include the tnsnames class in my parent server definition 
class... Added it as an include and now working perfectly... 

Cheers
Gavin 

On Tuesday, 5 February 2013 11:35:31 UTC, Gavin Williams wrote:
>
> Morning all
>
> I'm currently scratching my head with this one, as it's something I've 
> done several times already in this module... 
>
> Anyways, the problem...
>
> I'm trying to create a defined type which will add a new fragment to a 
> concat file... 
> The class/define is: 
> https://gist.github.com/fatmcgav/4713861#file-tnsnames-pp. The file path 
> within the module is: *modules/act/manifests/util/linux/oracle/tnsnames.pp
> *
>
> Whenever I try and use *tnsnames::add*, I get:
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid 
> resource type tnsnames::add at 
> /etc/puppet/modules/act/manifests/env/oracle/instance/netapp.pp:119 on node 
> act-star-db07.card.co.uk
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
> Example usage is: https://gist.github.com/fatmcgav/4713861#file-netapp-pp
>
> However this defined type model is no different to several others that 
> I've defined... A working example is: 
> https://gist.github.com/fatmcgav/4713861#file-oraenvs-pp. This file path 
> is: *modules/act/manifests/util/linux/oracle/oraenvs.pp*.
>
> I've tried restarting the puppet master service without any success. 
>
> Any ideas why I'm having issues?
>
> Cheers
> Gavin 
>

-- 
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] dashboard permission issue

2013-02-05 Thread sgd . eriksson
I'm having trouble getting puppet dashboard (1.2.21) to run on apache.

i installed puppetmaster-passenger and puppet-dashboard package. It didn't 
create user puppet-dashboard automatically as stated in the installation 
guide,
so i created one manually and chowned all files under /puppet-dashboard. 
when testing with webrick everything works fine (as root).
when i try with other users this is what happens:

root@puppetmaster:/usr/share/puppet-dashboard/script# sudo -u 
puppet-dashboard ./server -e production
=> Booting WEBrick
=> Rails 2.3.14 application starting on http://0.0.0.0:3000
./../config/../vendor/rails/railties/lib/initializer.rb:926:in `read': 
Permission denied - /usr/share/puppet-dashboard/config/database.yml 
(Errno::EACCES)
from ./../config/../vendor/rails/railties/lib/initializer.rb:926:in 
`database_configuration'
from ./../config/../vendor/rails/railties/lib/initializer.rb:437:in 
`initialize_database'
from ./../config/../vendor/rails/railties/lib/initializer.rb:141:in 
`process'
from ./../config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from ./../config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /usr/share/puppet-dashboard/config/environment.rb:14
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from 
/usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in
 
`require'
from 
/usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:547:in
 
`new_constants_in'
from 
/usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:182:in
 
`require'
from 
/usr/share/puppet-dashboard/vendor/rails/railties/lib/commands/server.rb:84
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./server:3

When running with apache, passneger gives the same error:
Permission denied - /usr/share/puppet-dashboard/config/database.yml
Application root: /usr/share/puppet-dashboard

I tried changing ownerships, giving 777 rights on files etc..
First run with webrick might have been as root. Could this be an issue? If 
so, is it fixable or am i due for a reinstallation?

Thanks a million for any 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] How to set logging destinations via puppet.conf?

2013-02-05 Thread Kubes
All,

Even though I have looked at the documentation and search this group, I can 
seem to find a clear answer.

Can puppet logging preferences be controlled via puppet.conf?  In the docs 
there are two variables that control this:  
puppetdlog
 and 
masterlog.
 
 Setting either of these in the config does not seem to effect the logging, 
always does to syslog.  Only setting the --logdest when starting puppet 
seems to change the logging (command line, /etc/sysconfig or config.ru)? 
 BTW: I have tried to also added logdest to the puppet.conf

1) What is the correct syntax to enable logging to a file (vs syslog) for 
master and also agent?
2) Can the syslog logging be disabled?  What is that syntax?

Here is a sniplet of my config


[main]
 user = puppet
 group = puppet

 logdir = /var/log/puppet
 rundir = /var/run/puppet
 ssldir = $vardir/ssl

 report = true
 reports = log,store

[agent]
 server = puppet.domain.com
 classfile = $vardir/classes.txt
 localconfig = $vardir/localconfig
 puppetdlog = $logdir/puppetd.log

[master]
 masterlog=$logdir/master.log
 #logdest = /var/log/puppet/master.log
 certname = puppet.domain.com
 





-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To 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: Split node definition into multiple files

2013-02-05 Thread jcbollinger


On Monday, February 4, 2013 4:40:19 PM UTC-6, Andre Keller wrote:
>
>
> Is there a way to automatically include child classes? Something like 
> include myzones::* :-) 
>
>

No, not as such.


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] Could not retrieve catalog from remote server: Error 400 on SERVER: No managed repo yet for this distro.

2013-02-05 Thread Mailing Lists
I'm hoping someone else has experienced the error. The puppetmaster and
agent are on the same system and its having trouble pulling the facter
variables. I've got storedconfigs on MySQL and the last time this happened
I deleted the configs and it started working again. This pops up every
couple of months, any suggestions on how to resolve the issue, maybe a
misconfiguration? Master and agent on the same system ok?

err: Could not retrieve catalog from remote server: Error 400 on SERVER: No
managed repo yet for this distro. at
/etc/puppet/modules/yum/manifests/init.pp:54 on node
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

-- 
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] Is it possible to generate a sequence in a template?

2013-02-05 Thread jcbollinger


On Monday, February 4, 2013 11:49:24 PM UTC-6, David Kerr wrote:
>
>
>
> On Monday, February 4, 2013 9:07:49 PM UTC-8, Aaron Russo wrote:
>>
>>
>> On Mon, Feb 4, 2013 at 7:37 PM, David Kerr  wrote:
>>
>>> <% @foo = 0 %>
>>> <% Array(bar).each do |flan| -%>
>>> value <%= @foo %>
>>> <% @foo += 1 %>
>>> <% end %>
>>>
>>
>> This code worked for me.  I just used an inline template, but otherwise I 
>> had exactly what you had:
>>
>> link: https://gist.github.com/arusso23/4712284
>>
>> (I'm on 3.0.1 btw)
>>
>>
>
> hmm, ok thanks, good to know it SHOULD work =) 
>
> I believe my problem is that i'm using concat and my expectations of how 
> that works are incorrect.
>
>

You didn't say what those expectations were, but I'm guessing you hoped the 
counter would retain its value across multiple evaluations of the 
template.  Perhaps that's why you used a member variable for your counter 
instead of a local variable.  You should expect, however, that every time 
you invoke the template() or inline_template() function, a new ERB instance 
will be created to evaluate the given template, so even if you worked 
around the re-initialization of your counter, I would not expect a 
continuous sequence across multiple template evaluations.

Supposing that you have all the data you want to sequence in one place, one 
possibility could be to generate your content all in one template.  If you 
don't have it all in one place, on the other hand, and you can't assign 
sequence numbers manually, then I am skeptical about sequence numbers being 
useful to you / doing what you want even if you could generate them.

If you tell us more about the problem then maybe we'll have better-targeted 
suggestions.


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] Creating users and group with same name

2013-02-05 Thread shadyabhi

Hi,

This is precisely what I am observing.

[root@index11 ~]# puppet resource group logstash ensure=present
notice: /Group[logstash]/ensure: created
group { 'logstash':
  ensure => 'present',
}
[root@index11 ~]# puppet resource user logstash ensure=present
err: /User[logstash]/ensure: change from absent to present failed: Could 
not create user logstash: Execution of '/usr/sbin/useradd -M logstash' 
returned 9: useradd: group logstash exists - if you want to add this 
user to that group, use -g.


user { 'logstash':
  ensure => 'absent',
}
[root@index11 ~]#

How do I fix this? I want to avoid not using execs. :)

Thanks.

--
Cheers,
Abhijeet R
http://blog.abhijeetr.com

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To 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] hiera query yaml parameters

2013-02-05 Thread roadtest
Steven, thanks for your reply!  You are right. It is unnecessary using 
create_resource to query yaml parameters. It can be done directly as 
following:

$sshd_hash = hiera(os_users)
$server_ssh_keys = $sshd_hash[$username][ssh_keys][key]

format of my os_users yaml file was not correct, that is why it failed me. 

Btw, there is no keys function in puppet.

Cheers,

carl



On Sunday, February 3, 2013 10:21:25 PM UTC-5, Steven wrote:
>
>  You can read the hash directly, create_resource is not needed (may or may 
> not be desired)
>
> $user_defs = hiera('os_users') will give you the full hash
>
> What I tend to do for this type of data structure is:
>
> $user_defs = hiera('os_users')
> $user_keys = keys($user_defs)
> if is_array($user_keys) {
>   process_users { $user_keys:; }
> }
>
> define process_users {
>   # Do whatever you want for each element of the hash
>   # $name will be the hash key
>   # $user_defs[$name] is the hash of the current item
>   # $user_defs[$name]['comment'] to access the user's comment field
> }
>
>
> Steven
>
>
> --
> From: yg...@comcast.net 
> Subject: Re: [Puppet Users] hiera query yaml parameters
> Date: Sun, 3 Feb 2013 19:19:25 -0500
> To: puppet...@googlegroups.com 
>
> Could you show your solution, please ?
>
> I would like to see how you did it.
>
> On Feb 3, 2013, at 6:46 PM, roadtest wrote:
>
> I figure out the solution. 
>
> Using the create_resource to convert YAML to a hash array, then I can 
> query retrieve every individual value.  If there is better way, feel free 
> to share with group.
>
> carl
>
> On Saturday, February 2, 2013 3:25:33 PM UTC-5, roadtest wrote:
>
> Hello,
>
> I have a yaml data file containing user account with following information.
> #more users.yaml
> ---
> os_users:
>  user1:
>   locked: false
>   comment: System Operator
>   uid: '700'
>   gid: '700'
>   groups:
>   - admin
>   - sudonopw
>   sshkeys:
>   - ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCmL8j+5zE/VLPIMeDqNQt8L
>  user2:
>   locked: true
>   comment: Test Locked Account
>   uid: '701'
>   gid: '701'
>   groups:
>   - admin
>   - sudonopw
>   sshkeys:
>   - ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCm
>
> I can search os_users information like following:
> #hiera -c /etc/hiera.yaml os_users
> {"user1"=>{"groups"=>["admin", "sudonopw"], "locked"=>false, 
> "comment"=>"System Operator", "uid"=>"700", "sshkeys"=>["ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCmL8j+5zE/VLPIMeDqNQt8L"],
>  
> "gid"=>"700"}, "user2"=>{"groups"=>["admin", "sudonopw"], "locked"=>true, 
> "comment"=>"Test Locked Account", "uid"=>"701", "sshkeys"=>["ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCm"], 
> "gid"=>"701"}}
>
> My question is how I can get value of os_users -> user1 -> sshkeys. I 
> tried:
> #hiera -c /etc/hiera.yaml os_users[user1[sshkeys]]
> nil
>
> Could you please advise whether this is doable or direct me to some 
> document?
>
> Thanks in advance,
>
> carl
>
>
> -- 
> 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...@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.




Re: [Puppet Users] Creating users and group with same name

2013-02-05 Thread Throwe, Jesse
Generally when I see weird errors like this with users/group nscd has
gotten in my way.  Might be worth disabling nscd (and making sure its
really off) then trying this again.


On Tue, Feb 5, 2013 at 9:33 AM, shadyabhi  wrote:

> Hi,
>
> This is precisely what I am observing.
>
> [root@index11 ~]# puppet resource group logstash ensure=present
> notice: /Group[logstash]/ensure: created
> group { 'logstash':
>   ensure => 'present',
> }
> [root@index11 ~]# puppet resource user logstash ensure=present
> err: /User[logstash]/ensure: change from absent to present failed: Could
> not create user logstash: Execution of '/usr/sbin/useradd -M logstash'
> returned 9: useradd: group logstash exists - if you want to add this user
> to that group, use -g.
>
> user { 'logstash':
>   ensure => 'absent',
> }
> [root@index11 ~]#
>
> How do I fix this? I want to avoid not using execs. :)
>
> Thanks.
>
> --
> Cheers,
> Abhijeet R
> http://blog.abhijeetr.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> puppet-users+unsubscribe@**googlegroups.com
> .
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at 
> http://groups.google.com/**group/puppet-users?hl=en
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>
>
>

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




Re: [Puppet Users] Creating users and group with same name

2013-02-05 Thread Abhijeet Rastogi
I don't even have it installed. Thing is, I can add the user by using "-g". 
But, why is puppet not able to do so, that's what is wondering me.

On Tuesday, February 5, 2013 8:51:37 PM UTC+5:30, Jesse Throwe wrote:
>
> Generally when I see weird errors like this with users/group nscd has 
> gotten in my way.  Might be worth disabling nscd (and making sure its 
> really off) then trying this again.
>
>
> On Tue, Feb 5, 2013 at 9:33 AM, shadyabhi 
> > wrote:
>
>> Hi,
>>
>> This is precisely what I am observing.
>>
>> [root@index11 ~]# puppet resource group logstash ensure=present
>> notice: /Group[logstash]/ensure: created
>> group { 'logstash':
>>   ensure => 'present',
>> }
>> [root@index11 ~]# puppet resource user logstash ensure=present
>> err: /User[logstash]/ensure: change from absent to present failed: Could 
>> not create user logstash: Execution of '/usr/sbin/useradd -M logstash' 
>> returned 9: useradd: group logstash exists - if you want to add this user 
>> to that group, use -g.
>>
>> user { 'logstash':
>>   ensure => 'absent',
>> }
>> [root@index11 ~]#
>>
>> How do I fix this? I want to avoid not using execs. :)
>>
>> Thanks.
>>
>> -- 
>> Cheers,
>> Abhijeet R
>> http://blog.abhijeetr.com
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users...@**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] No reports when using refreshonly => true

2013-02-05 Thread Romain LE DISEZ
Hello all,

I'm trying to get notified each time a file is changed.

Puppet Master : 3.1.0
Puppet Agent : 3.1.0

I use tagmail for reports, it works fine. tagmail.conf:
warning, err, alert, emerg, crit: ad...@example.com


My config is :

file { 'vps-functions':
path=> '/usr/libexec/vzctl/scripts/vps-functions',
ensure  => file,
mode=> '0755',
source  => 'puppet:///modules/virtualization/openvz/vps-functions',
replace => false,
audit   => content,
notify  => Exec['vps-functions-changed'],
}

exec { 'vps-functions-changed':
command => '/bin/echo "File changed"',
refreshonly => true,
loglevel=> 'warning',
logoutput   => true,
}


When I run 'puppet agent --test' after I changed file 'vps-functions', I
get the following output on the console:
Warning: 
/Stage[main]/Virtualization::Openvz/Exec[vps-functions-changed]/returns: File 
changed

It is perfect except that I get no report on ad...@example.com.

If I remove 'refreshonly => true', each time I run 'puppet agent --test'
I get the correct output on the console and I get a report by mail.

It seems that when I use 'refreshonly => true', output are not
logged/reported.

Is it a normal behaviour? May be I do something wrong, but after 2 hours
on it, I can't see what...

Thanks for your help.

-- 
Romain LE DISEZ

-- 
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] Problems with PuppetLabs Yum Repo

2013-02-05 Thread Dan White
Trying to update a RHEL5 x86_64 server 

Yum sees puppet-server 3.1.0-1.el5, but does not see puppet 3.1.0-1.el5 

I tried cleaning out the cache and trying again, but no luck. 
I am going to download the RPM and localinstall it so I am not held up. 


“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] hiera query yaml parameters

2013-02-05 Thread Steven Nemetz

keys comes form the PuppetLab's stdlib moduleSo does is_array and a bunch of 
other nice functions

Steven
 Date: Tue, 5 Feb 2013 07:12:45 -0800
From: rai...@gmail.com
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] hiera query yaml parameters

Steven, thanks for your reply!  You are right. It is unnecessary using 
create_resource to query yaml parameters. It can be done directly as following:
$sshd_hash = hiera(os_users)$server_ssh_keys = 
$sshd_hash[$username][ssh_keys][key]
format of my os_users yaml file was not correct, that is why it failed me. 
Btw, there is no keys function in puppet.
Cheers,
carl


On Sunday, February 3, 2013 10:21:25 PM UTC-5, Steven wrote:



You can read the hash directly, create_resource is not needed (may or may not 
be desired)

$user_defs = hiera('os_users') will give you the full hash

What I tend to do for this type of data structure is:

$user_defs = hiera('os_users')
$user_keys = keys($user_defs)
if is_array($user_keys) {
  process_users { $user_keys:; }
}

define process_users {
  # Do whatever you want for each element of the hash
  # $name will be the hash key
  # $user_defs[$name] is the hash of the current item
  # $user_defs[$name]['comment'] to access the user's comment field
}


Steven

From: yg...@comcast.net
Subject: Re: [Puppet Users] hiera query yaml parameters
Date: Sun, 3 Feb 2013 19:19:25 -0500
To: puppet...@googlegroups.com

Could you show your solution, please ?
I would like to see how you did it.
On Feb 3, 2013, at 6:46 PM, roadtest wrote:
I figure out the solution. 
Using the create_resource to convert YAML to a hash array, then I can query 
retrieve every individual value.  If there is better way, feel free to share 
with group.
carl

On Saturday, February 2, 2013 3:25:33 PM UTC-5, roadtest wrote:Hello,
I have a yaml data file containing user account with following 
information.#more users.yaml---os_users: user1:  locked: false  comment: System 
Operator  uid: '700'  gid: '700'  groups:  - admin  - sudonopw  sshkeys:  - 
ssh-rsa 
B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCmL8j+5zE/VLPIMeDqNQt8L
 user2:  locked: true  comment: Test Locked Account  uid: '701'  gid: '701'  
groups:  - admin  - sudonopw  sshkeys:  - ssh-rsa 
B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCm
I can search os_users information like following:#hiera -c /etc/hiera.yaml 
os_users{"user1"=>{"groups"=>["admin", "sudonopw"], "locked"=>false, 
"comment"=>"System Operator", "uid"=>"700", "sshkeys"=>["ssh-rsa 
B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCmL8j+5zE/VLPIMeDqNQt8L"],
 "gid"=>"700"}, "user2"=>{"groups"=>["admin", "sudonopw"], "locked"=>true, 
"comment"=>"Test Locked Account", "uid"=>"701", "sshkeys"=>["ssh-rsa 
B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCm"], 
"gid"=>"701"}}
My question is how I can get value of os_users -> user1 -> sshkeys. I 
tried:#hiera -c /etc/hiera.yaml os_users[user1[sshkeys]]nil
Could you please advise whether this is doable or direct me to some document?
Thanks in advance,
carl


-- 

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

 

 
  

-- 
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] Is it possible to generate a sequence in a template?

2013-02-05 Thread David Kerr


On Tuesday, February 5, 2013 6:27:26 AM UTC-8, jcbollinger wrote:
>
>
>
> On Monday, February 4, 2013 11:49:24 PM UTC-6, David Kerr wrote:
>>
>>
>>
>> On Monday, February 4, 2013 9:07:49 PM UTC-8, Aaron Russo wrote:
>>>
>>>
>>> On Mon, Feb 4, 2013 at 7:37 PM, David Kerr  wrote:
>>>
 <% @foo = 0 %>
 <% Array(bar).each do |flan| -%>
 value <%= @foo %>
 <% @foo += 1 %>
 <% end %>

>>>
>>> This code worked for me.  I just used an inline template, but otherwise 
>>> I had exactly what you had:
>>>
>>> link: https://gist.github.com/arusso23/4712284
>>>
>>> (I'm on 3.0.1 btw)
>>>
>>>
>>
>> hmm, ok thanks, good to know it SHOULD work =) 
>>
>> I believe my problem is that i'm using concat and my expectations of how 
>> that works are incorrect.
>>
>>
>
> You didn't say what those expectations were, but I'm guessing you hoped 
> the counter would retain its value across multiple evaluations of the 
> template.  Perhaps that's why you used a member variable for your counter 
> instead of a local variable.  You should expect, however, that every time 
> you invoke the template() or inline_template() function, a new ERB instance 
> will be created to evaluate the given template, so even if you worked 
> around the re-initialization of your counter, I would not expect a 
> continuous sequence across multiple template evaluations.
>
> Supposing that you have all the data you want to sequence in one place, 
> one possibility could be to generate your content all in one template.  If 
> you don't have it all in one place, on the other hand, and you can't assign 
> sequence numbers manually, then I am skeptical about sequence numbers being 
> useful to you / doing what you want even if you could generate them.
>
> If you tell us more about the problem then maybe we'll have 
> better-targeted suggestions.
>
>
> John
>
>
Sorry about that, I usually try to keep my questions it simple and generic 
to avoid getting bogged down in details, but as you suggested it's the 
details that are killer here. So I'll go deeper into the problem.
 
You guessed correct though, my assumption was that each concact::fragment 
would get a buffer containing every exported element and then i'd have to 
loop over it. And that's obviously not the case, each concat::fragment gets 
executed once per each element.

So what I have is a PgPool config file, it's fairly large and there are a 
number of tunables in it. At the end of the file is the server section that 
looks 
basically needs to look like like:

backend_hostname0 = 192.168.1.10
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/db/pg'
backend_flag0 = 'ALLOW_TO_FAILOVER' 

backend_hostname1 = 192.168.1.11
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/db/pg'
backend_flag1 = 'ALLOW_TO_FAILOVER' 


pgpool requires you start with 0 and go in sequence, i tried putting random 
#s in there and it doesn't work.

Each postgres server will register the info via exported resources.

This is fairly easy with concat (except for the sequence) but w/o it I'm 
not entirely sure how to make it happen.

Thanks

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




Re: [Puppet Users] hiera query yaml parameters

2013-02-05 Thread roadtest
you are right again:-) 

For people who are new to puppet,  here is the installation instruction - 
http://forge.puppetlabs.com/puppetlabs/stdlib.  stdlib is built in Puppet 
Enterprise and needs to be installed for community version.

cheers,

carl

On Tuesday, February 5, 2013 11:28:46 AM UTC-5, Steven wrote:
>
>  keys comes form the PuppetLab's stdlib module
> So does is_array and a bunch of other nice functions
>
>
> Steven
>
>  
> --
> Date: Tue, 5 Feb 2013 07:12:45 -0800
> From: rai...@gmail.com 
> To: puppet...@googlegroups.com 
> Subject: Re: [Puppet Users] hiera query yaml parameters
>
> Steven, thanks for your reply!  You are right. It is unnecessary using 
> create_resource to query yaml parameters. It can be done directly as 
> following:
>
> $sshd_hash = hiera(os_users)
> $server_ssh_keys = $sshd_hash[$username][ssh_keys][key]
>
> format of my os_users yaml file was not correct, that is why it failed me. 
>
> Btw, there is no keys function in puppet.
>
> Cheers,
>
> carl
>
>
>
> On Sunday, February 3, 2013 10:21:25 PM UTC-5, Steven wrote:
>
>  You can read the hash directly, create_resource is not needed (may or may 
> not be desired)
>
> $user_defs = hiera('os_users') will give you the full hash
>
> What I tend to do for this type of data structure is:
>
> $user_defs = hiera('os_users')
> $user_keys = keys($user_defs)
> if is_array($user_keys) {
>   process_users { $user_keys:; }
> }
>
> define process_users {
>   # Do whatever you want for each element of the hash
>   # $name will be the hash key
>   # $user_defs[$name] is the hash of the current item
>   # $user_defs[$name]['comment'] to access the user's comment field
> }
>
>
> Steven
>
>
> --
> From: yg...@comcast.net
> Subject: Re: [Puppet Users] hiera query yaml parameters
> Date: Sun, 3 Feb 2013 19:19:25 -0500
> To: puppet...@googlegroups.com
>
> Could you show your solution, please ?
>
> I would like to see how you did it.
>
> On Feb 3, 2013, at 6:46 PM, roadtest wrote:
>
> I figure out the solution. 
>
> Using the create_resource to convert YAML to a hash array, then I can 
> query retrieve every individual value.  If there is better way, feel free 
> to share with group.
>
> carl
>
> On Saturday, February 2, 2013 3:25:33 PM UTC-5, roadtest wrote:
>
> Hello,
>
> I have a yaml data file containing user account with following information.
> #more users.yaml
> ---
> os_users:
>  user1:
>   locked: false
>   comment: System Operator
>   uid: '700'
>   gid: '700'
>   groups:
>   - admin
>   - sudonopw
>   sshkeys:
>   - ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCmL8j+5zE/VLPIMeDqNQt8L
>  user2:
>   locked: true
>   comment: Test Locked Account
>   uid: '701'
>   gid: '701'
>   groups:
>   - admin
>   - sudonopw
>   sshkeys:
>   - ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCm
>
> I can search os_users information like following:
> #hiera -c /etc/hiera.yaml os_users
> {"user1"=>{"groups"=>["admin", "sudonopw"], "locked"=>false, 
> "comment"=>"System Operator", "uid"=>"700", "sshkeys"=>["ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCmL8j+5zE/VLPIMeDqNQt8L"],
>  
> "gid"=>"700"}, "user2"=>{"groups"=>["admin", "sudonopw"], "locked"=>true, 
> "comment"=>"Test Locked Account", "uid"=>"701", "sshkeys"=>["ssh-rsa 
> B3NzaC1yc2EBIwAAAQEAwLBhQefRiXHSbVNZYKu2o8VWJjZJ/B4LqICXuxhiiNSCm"], 
> "gid"=>"701"}}
>
> My question is how I can get value of os_users -> user1 -> sshkeys. I 
> tried:
> #hiera -c /etc/hiera.yaml os_users[user1[sshkeys]]
> nil
>
> Could you please advise whether this is doable or direct me to some 
> document?
>
> Thanks in advance,
>
> carl
>
>
> -- 
> 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...@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...@googlegroups.com .
> To post to this group, send email to puppet...@googlegroups.com
> .
> Visit this group at http://gro

[Puppet Users] Re: Puppet/Juniper Networks automation discussion at BAJUG March 6th

2013-02-05 Thread Derick Winkworth
Here are some more details:
 
Please tell your friends and co-workers about the event. We welcome 
newcomers. Please register at: 

*http://bajug.eventbrite.com*  

The keynote for BAJUG3 will be introducing Puppet Labs and Junos. It's now 
possible to do configuration management and provisioning with puppet and 
your networking infrastructure. 

In an interesting turn of events, I noticed a lot of Juniper authors are 
going to attend BAJUG. We'll be hosting a book signing for the following 
books: 

Junos Enterprise Switching 
Junos Enterprise Routing 
Junos Security 
Juniper Warrior 
Juniper MX Series 

The publisher was nice enough to give away five free copies of each of the 
book, so we'll be giving those out. If you're interested in getting your 
book autographed, be sure to bring your book with you. 

5:30PM - Check In 
5:45PM - Welcome and Introduction - Doug Hanks 
6:00PM - Message from Proteus 
6:05PM - Keynote Speaker: Puppet + Junos - Jeremy Schulman and Derick 
Winkworth 
6:50PM - Audience Q&A 
7:00PM - Break 
7:10PM - Lightning Talk - TBA 
7:20PM - Lightning Talk - TBA 
7:30PM - Lightning Talk - TBA 
7:40PM - Lightning Talk - TBA 
7:50PM - Lightning Talk - TBA 
8:00PM - Book Signing 
8:00PM - Social 
9:30PM - Close 
 
So there's the potential for free books!  I know this the Puppet User's 
group and some of you might not be that familar with networking stuff, but 
hey...  what if Puppet ran right on those routers, switches, and 
firewalls?  Well.. come see what that might look like! 
 
Derick
 
 
 

On Saturday, 2 February 2013 18:20:28 UTC-6, Derick Winkworth wrote:

> Come and join the discussion at the Bay Area Juniper Users Group, March 
> 6th.
>
> Sign up here (it's free): http://bajug.eventbrite.com/#
>
> From 5:30PM to 9:00PM in Sunnyvale (see link above for directions). 
>  Includes kegs of beer as well as a variety of other inferior beverages. 
>  And Pizza.
>
>
>
> -Derick
>
>

-- 
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] Problems with PuppetLabs Yum Repo

2013-02-05 Thread Moses Mendoza
Hey Dan,

I couldn't replicate the issue, I was able to install the el5 package
from yum.puppetlabs.com without issue. Perhaps you have a stale
metadata issue?

Moses

-- 
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] Best way for conditional dependency?

2013-02-05 Thread Bret Wortman
I have a situation where I have a module which manages some user accounts 
which, if required by a system, need to be physically present on that box. 
I have another module which sets up freeipa-client for all systems.

The catch is that when the first module is present, it needs to be 
installed prior to the ipa-client module. But if I give ipa-client a 
dependency on it, it will force it to always be installed, which isn't what 
I want. 

What's the most puppet-ish way to handle this?

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




Re: [Puppet Users] Recent RoR Vulns and puppet 3x on RHEL 6?

2013-02-05 Thread Kodiak Firesmith
Thanks for the confirmation, Michael.

On Monday, February 4, 2013 6:26:17 PM UTC-5, Michael Stanhke wrote:
>
> Unless you've elected to use legacy storeconfigs (with activerecord), 
> you are correct, your system should not be vulnerable. 
>
> stahnma 
>
>
>
> On Mon, Feb 4, 2013 at 6:15 AM, Kodiak Firesmith 
> > 
> wrote: 
> > Hello fellow Puppet users! 
> > 
> > I'm trying to perform due diligence to make sure that our Puppet 
> > installations aren't affected by all the RoR vulns in the news recently. 
> > (
> http://www.kalzumeus.com/2013/01/31/what-the-rails-security-issue-means-for-your-startup/)
>  
>
> > (
> http://www.informationweek.com/security/vulnerabilities/critical-ruby-on-rails-issue-threatens-2/240145891)
>  
>
> > 
> > I've been watching the PuppetLabs security 
> > (https://puppetlabs.com/security/) page, and the RedHat CVE DB 
> > (https://access.redhat.com/security/cve/) and haven't seen anything 
> that 
> > appears to directly affect a typical Puppet3 installation on RHEL 6 
> running 
> > the latest RHEL6-supported Ruby (1.8.7.352-7). 
> > 
> > Is it safe to say that my platform is not affected? 
> > 
> > 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...@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] Referencing a variable in template, loaded from Ruby DSL each loop

2013-02-05 Thread Andriy Yurchuk
hostclass :class do
  items = scope.lookupvar('items_list')
  items.each do |item|
file("/etc/init.d/#{item}",
 :content => template(['class/item_init.erb']))
  end
end

Having this class written in Ruby DSL, how do I properly reference the 
itemvariable in the template? I tried <%= 
item %>, <%= @item %>,<%= scope.lookupvar('item')%> but none of them 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: Puppet custom recursive directory synchronization

2013-02-05 Thread Andriy Yurchuk
I ended up implementing this using Puppet Ruby DSL.

-- 
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] Problems with PuppetLabs Yum Repo

2013-02-05 Thread Dan White
Thanks, Moses, for your responses. 
I found it ! 

I was shooting my own foot with yum-priorities. 


“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) 

- Original Message -
From: "Moses Mendoza"  
To: puppet-users@googlegroups.com 
Sent: Tuesday, February 5, 2013 1:02:22 PM 
Subject: Re: [Puppet Users] Problems with PuppetLabs Yum Repo 

Hey Dan, 

I couldn't replicate the issue, I was able to install the el5 package 
from yum.puppetlabs.com without issue. Perhaps you have a stale 
metadata issue? 

Moses 

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


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




[Puppet Users] Re: Best way for conditional dependency?

2013-02-05 Thread joe
If freeipa-client will be on all systems, just order it the other way. 

In the user module, make your class before freeipa-client. That way, the 
ordering is only in place when you include the user class.

On Tuesday, February 5, 2013 11:21:30 AM UTC-7, Bret Wortman wrote:
>
> I have a situation where I have a module which manages some user accounts 
> which, if required by a system, need to be physically present on that box. 
> I have another module which sets up freeipa-client for all systems.
>
> The catch is that when the first module is present, it needs to be 
> installed prior to the ipa-client module. But if I give ipa-client a 
> dependency on it, it will force it to always be installed, which isn't what 
> I want. 
>
> What's the most puppet-ish way to handle this?
>

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




Re: [Puppet Users] Inventory access forbidden

2013-02-05 Thread khouse
This is literally the exact answer to my problems. Thanks!!!

On Thursday, July 5, 2012 4:06:10 AM UTC-4, Matthew Burgess wrote:
>
> On Thu, Jul 5, 2012 at 2:52 AM, Dennis Jacobfeuerborn 
> > wrote: 
> > Hi, 
> > I've just set up a puppet server using passenger plus the dashboard and 
> > these parts all work fine but now I have enabled the inventory and added 
> > this to the auth.conf: 
> > 
> > path /facts 
> > auth any 
> > method find, search 
> > allow * 
>
> Where abouts in auth.conf did you place this configuration?  Note that 
> it has to be placed *before* the last stanza in the default config 
> which reads: 
>
> # this one is not strictly necessary, but it has the merit 
> # to show the default policy which is deny everything else 
> path / 
> auth any 
>
> Hope this helps, 
>
> Matt. 
>

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




[Puppet Users] How to set logging destinations via puppet.conf?

2013-02-05 Thread Kubes
All,

Even though I have looked at the documentation and search this group, I can 
seem to find a clear answer.

Can puppet logging preferences be controlled via puppet.conf?  In the docs 
there are two variables that control this:  
puppetdlog
 and 
masterlog.
 
 Setting either of these in the config does not seem to effect the logging, 
always does to syslog.  Only setting the --logdest when starting puppet 
seems to change the logging (command line, /etc/sysconfig orconfig.ru)? 
 BTW: I have tried to also added logdest to the puppet.conf

1) What is the correct syntax to enable logging to a file (vs syslog) for 
master and also agent?
2) Can the syslog logging be disabled?  What is that syntax?

Here is a sniplet of my config


[main]
 user = puppet
 group = puppet

 logdir = /var/log/puppet
 rundir = /var/run/puppet
 ssldir = $vardir/ssl

 report = true
 reports = log,store

[agent]
 server = puppet.domain.com
 classfile = $vardir/classes.txt
 localconfig = $vardir/localconfig
 puppetdlog = $logdir/puppetd.log

[master]
 masterlog=$logdir/master.log
 #logdest = /var/log/puppet/master.log
 certname = puppet.domain.com




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To 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: Could not retrieve catalog from remote server: Error 400 on SERVER: No managed repo yet for this distro.

2013-02-05 Thread Mailing Lists
After investigating a little futhur I found that the yaml file for this
node (and puppetmaster) has only time stamps:

--- !ruby/object:Puppet::Node
 classes: []
 expiration: 2013-02-05 16:52:21.747019 -05:00
 name: node
 parameters:
   environment: production
   "--- !ruby/sym _timestamp":
 - 2013-02-05 14:05:44
 - 2013-02-05 13:58:05
 - 2013-02-05 13:28:06
 - 2013-02-05 12:58:06
 - 2013-02-05 12:28:06
 - 2013-02-05 11:58:06
 - 2013-02-05 11:28:12
 - 2013-02-05 11:28:12
 - 2013-02-05 10:58:06
 - 2013-02-05 10:28:04
 - 2013-02-05 09:58:04
 - 2013-02-05 09:28:05
 - 2013-02-05 08:58:04
 - 2013-02-05 08:28:05
 - 2013-02-05 08:26:45
 - 2013-02-05 07:58:05
 - 2013-02-05 10:58:06
 - 2013-02-05 10:28:04
 - 2013-02-05 09:58:04
 - 2013-02-05 09:28:05
 - 2013-02-05 08:58:04
 - 2013-02-05 08:28:05
 - 2013-02-05 08:26:45
 - 2013-02-05 07:58:05
 - 2013-02-05 07:28:05
 - 2013-02-05 07:28:05
 - 2013-02-05 06:58:05
 - 2013-02-05 06:28:05
 - 2013-02-05 05:58:04
 - 2013-02-05 05:28:04

Instead of having populating facts/node information like the other nodes:

--- !ruby/object:Puppet::Node
 classes: []
 environment: &id001 production
 expiration: 2013-02-05 16:51:05.079351 -05:00
 name: node1
 parameters:
   swapfree: 3.97 GB

Can anyone explain to me why this happens?

On Tuesday, February 5, 2013, Mailing Lists  wrote:
> I'm hoping someone else has experienced the error. The puppetmaster and
agent are on the same system and its having trouble pulling the facter
variables. I've got storedconfigs on MySQL and the last time this happened
I deleted the configs and it started working again. This pops up every
couple of months, any suggestions on how to resolve the issue, maybe a
misconfiguration? Master and agent on the same system ok?
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
No managed repo yet for this distro. at
/etc/puppet/modules/yum/manifests/init.pp:54 on node
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping run

-- 
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] Creating users and group with same name

2013-02-05 Thread John Julien
This appears to be a bug.  I've opened a ticket for resolution.
https://projects.puppetlabs.com/issues/19090

You can work around it by specifying the group in your user resource.

#puppet resource user logstash ensure=present gid=logstash


On Feb 5, 2013, at 10:01 AM, Abhijeet Rastogi  wrote:

I don't even have it installed. Thing is, I can add the user by using "-g". 
But, why is puppet not able to do so, that's what is wondering me.

On Tuesday, February 5, 2013 8:51:37 PM UTC+5:30, Jesse Throwe wrote:
Generally when I see weird errors like this with users/group nscd has gotten in 
my way.  Might be worth disabling nscd (and making sure its really off) then 
trying this again.


On Tue, Feb 5, 2013 at 9:33 AM, shadyabhi  wrote:
Hi,

This is precisely what I am observing.

[root@index11 ~]# puppet resource group logstash ensure=present
notice: /Group[logstash]/ensure: created
group { 'logstash':
  ensure => 'present',
}
[root@index11 ~]# puppet resource user logstash ensure=present
err: /User[logstash]/ensure: change from absent to present failed: Could not 
create user logstash: Execution of '/usr/sbin/useradd -M logstash' returned 9: 
useradd: group logstash exists - if you want to add this user to that group, 
use -g.

user { 'logstash':
  ensure => 'absent',
}
[root@index11 ~]#

How do I fix this? I want to avoid not using execs. :)

Thanks.

-- 
Cheers,
Abhijeet R
http://blog.abhijeetr.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users...@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.
 
 

-- 
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: Need a solution for "puppet node clean" (puppet v3.0.2)

2013-02-05 Thread David Kerr
We upgraded to the new release of Puppet 3.1 and puppet node clean still 
doesn't work.

I've found that the delete query comes back empty, but the node is still in 
the system.

puppet node deactivate still works. 

-- 
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: Need a solution for "puppet node clean" (puppet v3.0.2)

2013-02-05 Thread Josh Cooper
Hi David,

On Tue, Feb 5, 2013 at 7:44 PM, David Kerr  wrote:
> We upgraded to the new release of Puppet 3.1 and puppet node clean still
> doesn't work.
>
> I've found that the delete query comes back empty, but the node is still in
> the system.
>
> puppet node deactivate still works.
>
> --
> 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.
>
>

Sounds like you're running into http://projects.puppetlabs.com/issues/15051

Josh

--
Josh Cooper
Developer, Puppet Labs

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




Re: [Puppet Users] Re: Need a solution for "puppet node clean" (puppet v3.0.2)

2013-02-05 Thread David Kerr
On Tuesday, February 5, 2013 8:54:47 PM UTC-8, Josh Cooper wrote:

> Hi David, 
>
> On Tue, Feb 5, 2013 at 7:44 PM, David Kerr > 
> wrote: 
> > We upgraded to the new release of Puppet 3.1 and puppet node clean still 
> > doesn't work. 
> > 
> > I've found that the delete query comes back empty, but the node is still 
> in 
> > the system. 
> > 
> > puppet node deactivate still works. 
> > 
> > -- 
> > 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. 
> > 
> > 
>
> Sounds like you're running into 
> http://projects.puppetlabs.com/issues/15051 
>
> Josh 
>
> -- 
> Josh Cooper 
> Developer, Puppet Labs 
>


ah, ok, i thought it was supposed to be fixed in 3.1

5 months old on the last update, any hope for a solution soon?

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.