Re: [Puppet Users] Exec resource and environment parameter

2012-10-11 Thread Tom

On 10/10/12 21:52, Felipe Salum wrote:

exec { 'test':
 path= 
'/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',

 environment = [HOME=test, HOME2=test2],
command= echo $HOME  /tmp/key,
user= 'root',
group  = 'root',
   }

Hi.  You need to escape the $ character!

For instance: echo \$HOME  /tmp/key

If you had defined $HOME within your manifest, then that would be the 
value that puppet substituted:


  $HOME = 'HI'
  exec { 'test':
path= 
'/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',

environment = [HOME=test, HOME2=test2],
command = echo $HOME  /tmp/key,
user= 'root',
group   = 'root',
   }


Cheers.  Tom.

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



Re: [Puppet Users] expiry attribut of users applied every time

2012-10-11 Thread digrouz
Hello,

Here is the output. It seems strange as puppet resource user foo does not 
return something about expiry. Even if it's set correctly as chage -l is 
showing. Does this help?

[root@host ~]# puppet resource user foo
user { 'foo':
  ensure   = 'present',
  comment  = 'userfoo',
  gid  = '2111',
  groups   = ['group1'],
  home = '/home/foo',
  password = '$6$Poreu0cX$LOCKEDBYPUPPET',
  password_max_age = '9',
  password_min_age = '0',
  shell= '/bin/bash',
  uid  = '2113',
}
[root@host ~]# chage -l foo
Last password change: Jul 27, 2012
Password expires: never
Password inactive   : never
Account expires : Jan 01, 2012
Minimum number of days between password change  : 0
Maximum number of days between password change  : 9
Number of days of warning before password expires   : 7


On Wednesday, October 10, 2012 8:20:52 PM UTC+2, digrouz wrote:

 I'm experencing this issue on both Red Hat 5 and 6.

 I'll post the output of the puppet resource user foo tomorrow when i'll be 
 at work.

 it seems that this is an active bug: 
 http://projects.puppetlabs.com/issues/11675#change-73099


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/cuYKVmyFDooJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Need help with rspec-puppet

2012-10-11 Thread Jian
I haven't puppetlabs-rspec-helper gem installed.
 
I added it to my ruby gems and chaneged both spec_helper.rb and Rakefile as 
described here:
 
https://github.com/cloudsmith/geppetto/issues/391
 
and it works now.
 
Big thanks to everyone that tried to help me. :-)

Dňa streda, 10. októbra 2012 16:48:39 UTC+2 llowder napísal(-a):



 On Wednesday, October 10, 2012 9:43:47 AM UTC-5, Jian wrote:

 Anybody else received this or similar error?
  
 What I was able to figure out so far is that:
 by adding require 'puppet' to the spec test my error changes to:
  
  Error converting value for param 'plugindest': Error converting value 
 for param 'libdir': Could not find value for $vardir on node puppet-demo
  
 So not a big improvement. The error probably occurs before the test 
 itself. Because the error is the same even if I delete the tested .pp file.
  
 Any help would be appreciated :-). 


 What version of puppet are you using?

 Can you share your code - module and test? Either put in the email, or for 
 better readability, use pastie or gist.
  

  

 Dňa štvrtok, 4. októbra 2012 10:24:48 UTC+2 Jian napísal(-a):

 Hello Everyone,
  
 I am fairly new to puppet and I would like to run som unit tests. I hope 
 rspec is the right tool for it. Unfortunately, after setting it up, when I 
 try to execute it I receive the following error:
  
 Failures:
   1) helloworld
  Failure/Error: it { should include_class('helloworld') }
  Puppet::Error:
Error converting value for param 'deviceconfig': Could not find 
 value for $confdir on node puppet-demo
  # ./spec/classes/helloworld_spec.rb:8
 Thiss error pops up for any test I try.
  
 I wasn't able to find a solution yet. Can you please give me any advice? 
  
 Thank you.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ugccNfov_CEJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] curious problem with puppet run

2012-10-11 Thread Patrick
Hello,

i have a curious problem with a node.
Every puppetrun the node says.
err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
syntax error on line 105, col 0: `$InputFileSeverity info'

There are 4 nodes which use the same modul but only one node have this 
problem??

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Q0t634htwGIJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Force unmount??

2012-10-11 Thread timo
Thanks for the replies. 

I created a module and made it a 'requires' of mount.pp, The exec 
subscribes to a text file that holds the current environment 
(test/production) then kills any PID's 'onlyif' lsof -N returns a 0. So in 
the event of DR, puppet can unmount and remount without a problem. Dirty 
but it works.

Cheers,



On Monday, October 8, 2012 1:38:23 PM UTC+1, timo wrote:

 Is there any method of forcibly umounting an NFS mounted directory?

 We have a test environment managed under puppet that is also our DR 
 environment. In a DR scenario we'll be umounting all NFS shares from out 
 test array and remounting to our DR array. 

 However, as this is a test environment we have users logged on, so when 
 Puppet attempts to unmount the test directories, it fails with umount: 
 /test/dir: device is busy if I fuser against the /test/dir directory and 
 kill the PID all is OK. 

 I need a method of either forcibly umounting the array, or killing all 
 PID's using the mounted directores so Puppet can unmount them. I'd like all 
 this done from Puppet.

 Any ideas? 




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/o__ruNxeTMMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: razor hang

2012-10-11 Thread Markus Falb
On 9.10.2012 18:39, Daniel Pittman wrote:
 On Monday, October 8, 2012 9:30:37 AM UTC-7, Markus Falb wrote:
 

 I was playing with razor today. But I am not going far. 

 ipxe is downloading the microkernel but stays at 98% 
 On the server side I see 

 /opt/razor/Razor/bin/razor -w boot default 
 '{hw_id:00:50:56:2e:c4:50___,dhcp_mac:01-00-50-56-2e-c4-50}' 
 /opt/razor/Razor/bin/razor -w image path  mk kernel 
 {http_err_code:200,errcode:0,response:/opt/razor/Razor/image/mk/687EqtppQJQPbgeirdhZy4/boot/vmlinuz,command:null,result:Ok,resource:ProjectRazor::Slice::Image}
  


 This suggests that the download of the microkernel finished 
 successfully. If so, why doesnt the microkernel do something? Or did it 
 and I only don't know how to tell? 

 
 The iPXE progress meter is a bit special, in the classic run to 99 
 percent, sit there forever sense, but you are not wrong: this is not doing 
 the right thing.
 
 The client should download the kernel, then download an initrd, and then 
 boot a full Linux environment and run in it.  You should see the usual 
 (verbose) Linux boot sequence progress through.

well, my razor test server is a virtualbox guest bridged to the lan.
The virtual host box is connected by wire.

My initial test client was a vmware guest on my laptop which is
connected per wlan.

I tried a virtualbox guest instead on my laptop with similar experience.
It downloaded the kernel but hangs at the initrd.

i tried a virtualbox guest on the same host as the razor server is and
the kernel boots and registers with razor.

So I got something to work with at least, in a limited scope for now,
though.

Thank You, hoping that the puppet mailing list is the appropiate media
for questions about razor.
-- 
Kind Regards, Markus Falb



signature.asc
Description: OpenPGP digital signature


[Puppet Users] puppet facts.d executable PROBLEM

2012-10-11 Thread Jones
Hi folks,

I'm using this 
plugin https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d
and I can't get a fact out of a simple shell script. YAML TXT JSON works 
well

My little shell script testfact.sh looks like

#!/bin/bash
echo TEST=NOT WORKING

made it executable
chmod +x testfact.sh

made a puppet agent -t to read the new fact

BUT 
$facter --puppet 
is not getting the fact

Thanx a lot!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ozS0Ol78TNoJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Hello,

I have a class like:

class wrapper {
  include foo
  include bar
  include baz
}

And a node like:

node x {
  include someclass
  include wrapper
  Class[someclass]-Class[wrapper]
}

The class chaining in node x doesn't get respected. In irc I was
suggested there being a possibility of this being related to #8040.
Can anyone suggest if that indeed might be the case ? Is there a clear
process to tell if certain chaining of classes or resources would
mandate using anchors or not ? Just to be clear, there is no order
required in the classes inside the wrapper class. But just that to
ensure before any of these, the class someclass gets applied. Any
ideas, and possible approaches would be nice.

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



[Puppet Users] Re: performance of source vs template vs file

2012-10-11 Thread jcbollinger


On Tuesday, October 9, 2012 9:45:42 AM UTC-5, Mihai Stan wrote:

 Hello everyone,

 I'm currently looking into using puppet to manage my homedir .dot files, 
 including .vim/ folder with a bunch of plugins totaling a few tens of files 
 (almost 100), in order to have a pleasant and productive working experience 
 on our organization's 500+ machines.

 While this looks like a cool thing to do, I can't help but wonder how will 
 this affect puppet's performance both on the masters' and agents' sides and 
 how good puppet is at distributing lots of infrequently updated files.

 My common sense tells me that from a performance point of view, I could 
 use the following methods, first in the list being the most recommended:

 file {
 content = file('file'),
 }

 file {
   source = puppet:///modules/...,
 }

 file {
   content = template('template.erb'),
 }


 Personally, I'd go with using file() function for distributing static 
 files and source = puppet:/// to manage directories recursively, which 
 would simplify the setup part a lot.


 Does anyone have a more in-depth insight into the performance of all these 
 methods ? Or, for that matter, why I shouldn't be doing the above as it 
 blows puppet performance in ways I can't comprehend ?


I would expect a bigger difference between using 'content' and using 
'source' than between specifying the content via file() and specifying it 
via template().  When you use 'content', the body of the target file is 
included in the catalog, whereas when you use 'source', the agent will 
request file content from the Puppet file server if it needs it.

For ~100 small files (= 1 KB on average, say), my gut tells me that 
'content' will win at least when there are more than a couple of changes, 
and that it will not lose too badly when there are few or none.

Certainly you should not use template() for completely static files, but 
when you do need it, you need it.

Managing directories recursively is a potential problem, but it really 
comes down more to the total number and combined size of the files you are 
managing.  Each file and directory adds memory and processing cost on both 
ends, and, separately, Puppet expends computing effort proportional to the 
total content size to compute hashes of file contents.

My expectation would be that for dotfiles, you will see acceptable 
performance any way around.  Nevertheless, as with any performance 
question, the only way to get a reliable answer is to test it.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/wmKO8HfxPvMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Windows Exec ifonly equals true

2012-10-11 Thread jim
Hello Puppet Users

Can some one please help me, as i'm new to puppet and its syntax.

I want to run an exec

exec { PowerShell_Install:
command = 
C:/Install/WindowsServer2003-KB968930-x86-ENG.exe /quiet,

but only if this file DOESN'T exist
C:/WINDOWS/system32/WindowsPowerShell/v1.0/powershell.exe

Regards

Jim

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/jTWLC6Vz4FQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] puppet patterns

2012-10-11 Thread Stuart Cracraft
Anyone know various resources besides forge.puppetlabs.com and the various 
books for
usable puppet patterns?

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



[Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread llowder


On Thursday, October 11, 2012 8:37:39 AM UTC-5, alcy wrote:

 Hello, 

 I have a class like: 

 class wrapper { 
   include foo 
   include bar 
   include baz 
 } 

 And a node like: 

 node x { 
   include someclass 
   include wrapper 
   Class[someclass]-Class[wrapper] 
 } 

 The class chaining in node x doesn't get respected. In irc I was 
 suggested there being a possibility of this being related to #8040. 
 Can anyone suggest if that indeed might be the case ? Is there a clear 
 process to tell if certain chaining of classes or resources would 
 mandate using anchors or not ? Just to be clear, there is no order 
 required in the classes inside the wrapper class. But just that to 
 ensure before any of these, the class someclass gets applied. Any 
 ideas, and possible approaches would be nice. 



From what I can tell, this looks like the main use case for the anchor 
pattern in stdlib.

https://github.com/puppetlabs/puppetlabs-stdlib
 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/vd9gYqJEADgJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: puppet facts.d executable PROBLEM

2012-10-11 Thread Jones
It's finally working some guy thought it's a good idea to comment the 
part out in the factsd script ^^

Am Donnerstag, 11. Oktober 2012 15:24:57 UTC+2 schrieb Jones:

 Hi folks,

 I'm using this plugin 
 https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d
 and I can't get a fact out of a simple shell script. YAML TXT JSON works 
 well

 My little shell script testfact.sh looks like

 #!/bin/bash
 echo TEST=NOT WORKING

 made it executable
 chmod +x testfact.sh

 made a puppet agent -t to read the new fact

 BUT 
 $facter --puppet 
 is not getting the fact

 Thanx a lot!


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Ur5j_wsgjQsJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Luke Bigum


On Thursday, October 11, 2012 3:09:02 PM UTC+1, llowder wrote:



 On Thursday, October 11, 2012 8:37:39 AM UTC-5, alcy wrote:

 Hello, 

 I have a class like: 

 class wrapper { 
   include foo 
   include bar 
   include baz 
 } 

 And a node like: 

 node x { 
   include someclass 
   include wrapper 
   Class[someclass]-Class[wrapper] 
 } 

 The class chaining in node x doesn't get respected. In irc I was 
 suggested there being a possibility of this being related to #8040. 
 Can anyone suggest if that indeed might be the case ? Is there a clear 
 process to tell if certain chaining of classes or resources would 
 mandate using anchors or not ? Just to be clear, there is no order 
 required in the classes inside the wrapper class. But just that to 
 ensure before any of these, the class someclass gets applied. Any 
 ideas, and possible approaches would be nice. 



 From what I can tell, this looks like the main use case for the anchor 
 pattern in stdlib.

 https://github.com/puppetlabs/puppetlabs-stdlib
  


As I found out recently (Dan Bode clarified this on Oct 4th) anchors should 
only be needed for nested classes, unless I've misinterpreted that. The 
problem above is that you are defining a relationship on your 'wrapper' 
class, but your wrapper class has no relationship with the classes it 
itself declares (feature of the 'include' syntax). I think this should work:

class wrapper { 
  include foo 
  include bar 
  include baz 
  Class[foo] - Class[wrapper]
  Class[bar] - Class[wrapper]
  Class[baz] - Class[wrapper]
} 

node x { 
  include someclass 
  include wrapper 
  Class[someclass]-Class[wrapper] 
} 

Or in your wrapper class you could change all the include statements to 
require statements, but then you are mixing two types of creating 
dependencies and personally I think it's purer to stay with the 
relationship chaining operators.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/622uffYRUW8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Help- Parsing data from a yaml file using puppet 3.0 and hiera

2012-10-11 Thread Nishant Jain
Can anybody reply to this post.

Thanks Nishant

On Wednesday, October 10, 2012 4:31:26 PM UTC-4, Nishant Jain wrote:

 Hello Everybody,
 Can anybody please provide an example about how to 
 read an array using hiera in puppet 3.0.
 Right now the agents are giving the following error when connecting to the 
 master   Could not retrieve catalog from remote server: Error 400 on 
 SERVER: Could not find data item users in any Hiera data file and no 
 default supplied .

 Following is the structure of hiera.yaml 
 ---
 :backend:
   - yaml
 :hierarchy:
   - global
 :puppet:
 :datasource: data
 :yaml:
 # datadir is empty here, so hiera uses its defaults
 # When specifying a datadir, make sure the path of the datadir exists
   :datadir: /etc/puppet/hiera/data


 Followin is the structure of global.yaml file:-
 ---
  users:
- 'seventeen'
- 'eighteen'



 Following is the code where am trying to use it in site.pp

 $declared_users=hiera_array(users)

 I am not getting, if I am missing 
 something obvious here or is there any problem with hiera inside puppet.


 Thanks,
 Nishant




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/2-LVNH421mYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Using collections

2012-10-11 Thread Maarten Thibaut
Hi,

I'm trying to use collections as shown below. The files I wish to collect 
get populated on the client, so the puppetmaster doesn't know the contents. 
I.e. I need to push these files to the server, and then distribute them 
back to the clients:

@@file { /etc/ssh-keys.d/$hostname.pub:
tag = ssh_pub_keys,
require = Exec[copy_key],
}

File | tag == 'ssh_pub_keys' |

But this isn't working. Do collections only work for files where the 
puppetmaster provides the content?

If so, has anyone thought of any strategies to overcome this issue?

Thanks!
maarten

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/8T_SC00sFYAJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Using collections

2012-10-11 Thread Jeff McCune
On Oct 11, 2012, at 7:48 AM, Maarten Thibaut mthib...@cisco.com wrote:

Hi,

I'm trying to use collections as shown below. The files I wish to collect
get populated on the client, so the puppetmaster doesn't know the contents.
I.e. I need to push these files to the server, and then distribute them
back to the clients:

@@file { /etc/ssh-keys.d/$hostname.pub:
tag = ssh_pub_keys,
require = Exec[copy_key],
}

File | tag == 'ssh_pub_keys' |

But this isn't working. Do collections only work for files where the
puppetmaster provides the content?


The way I've thought about collections is that they only work when the
compiler has the data you want in a variable and that variable is fed into
the resource's parameter value.

So the way I get data off the client and into the master is by using a
custom fact. The fact gets the data into a variable, then the variable is
used in the (exported) resource declaration.

Hope this helps,
-Jeff


If so, has anyone thought of any strategies to overcome this issue?

Thanks!
maarten

-- 
You received this message because you are subscribed to the Google Groups
Puppet Users group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/8T_SC00sFYAJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.

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



Re: [Puppet Users] Puppet client not listening on port 8139

2012-10-11 Thread Josh Cooper
Hi,

On Oct 10, 2012, at 6:58 PM, Pondy m.p...@griffith.edu.au wrote:

 Hi Gabrielle,
 
 Yes, I have listen = true and I cannot see that port open with netstat... I 
 am truly confused, theres not much showing in the logs either.
 
 Thanks!
 
 
 On Thursday, 11 October 2012 09:46:31 UTC+10, Lelutin wrote:
 
 On 2012-10-10 18:37, Pondy wrote: 
  Hi All, thanks for your input. So, I am talking about the puppet client. 
 
 ah oops sorry, I'm not used to dealing with this option :\ my bad 
 
  The puppet master server and all other clients seem to be working ok. I 
  am also unable to telnet locally to port 8139 or 8140. 
 
 hmm this is weird. in your original post you showed us that there were 
 no iptables rules, and you do have listen = true in your puppet.conf. 
 
 do you see the port as open and listening with netstat? 
 
 -- 
 Gabriel Filion
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/puppet-users/-/idS-uhlhCSMJ.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.

Try running with --debug. Note you'll need to provide an auth.conf on the 
client otherwise no one will be allowed to connect, and puppet will ignore the 
listen setting.

Josh

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Jeff McCune
On Oct 11, 2012, at 7:09 AM, llowder llowde...@gmail.com wrote:



On Thursday, October 11, 2012 8:37:39 AM UTC-5, alcy wrote:

 Hello,

 I have a class like:

 class wrapper {
   include foo
   include bar
   include baz
 }

 And a node like:

 node x {
   include someclass
   include wrapper
   Class[someclass]-Class[wrapper]
 }

 The class chaining in node x doesn't get respected. In irc I was
 suggested there being a possibility of this being related to #8040.
 Can anyone suggest if that indeed might be the case ? Is there a clear
 process to tell if certain chaining of classes or resources would
 mandate using anchors or not ? Just to be clear, there is no order
 required in the classes inside the wrapper class. But just that to
 ensure before any of these, the class someclass gets applied. Any
 ideas, and possible approaches would be nice.



From what I can tell, this looks like the main use case for the anchor
pattern in stdlib.


Yes, this is a perfect example of when to employ the anchor pattern. It's
also a perfect example of the bug we need to fix in puppet.

Class foo, bar, an baz will float off in the relationship graph because
class wrapper contains no other resources to anchor them down.

If you add a begin an end anchor resources to class wrapper and establish
relationships between them and the three contained classes, it should work
as you expect

I will give a concrete example, if you wish, once I get to my desk.

-Jeff


https://github.com/puppetlabs/puppetlabs-stdlib


-- 
You received this message because you are subscribed to the Google Groups
Puppet Users group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/vd9gYqJEADgJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.

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



Re: [Puppet Users] Re: Service Resources and Selinux

2012-10-11 Thread jcbollinger


On Wednesday, October 10, 2012 3:19:17 PM UTC-5, Tom B. wrote:

  On 10/10/12 16:09, jcbollinger wrote:
  


 On Tuesday, October 9, 2012 10:02:26 AM UTC-5, Tom B. wrote: 

 Hi list, 

 I've got an issue at the moment, which isn't really a big problem, but 
 an untidy annoyance really, and I'd just like to understand what the 
 best practice might be when dealing with the issue. 

 As a really quick summary, the issue is that Puppet is starting up the 
 mysqld service for the first time as unconfined_u, and then when MySQL 
 goes and creates a load of its initial files also as unconfined_u, 
 Puppet goes and resets them all to system_u which is what they should be 
 when checking matchpathcon: 

  
 Unless you configure it differently, Puppet uses the system's normal 
 service management commands to control services.  It is the responsibility 
 of that tool (e.g. /sbin/service) to start the service in the correct way, 
 including SELinux context, based on whatever criteria it uses to choose 
 such things.  Among other things, this means that you will get the same 
 result if Puppet starts the service as you would if the system 
 initialization program starts it at boot.
  
 by using runcon or run_init you are starting the service in the same 
 context that it will be started with at system boot by init.  /sbin/service 
 is not the correct way to start an selinux confined service technically, 
 although practically it makes little difference because user contexts are 
 not heavily used in the targeted selinux policy, unless users themselves 
 are confined, which they usually aren't.  Perhaps there should be an 
 selinux aware provider for services


Certainly Puppet's Linux-relevant providers should be SELinux-friendly, or 
else it should have a separate set of providers, and choose those 
automatically when it finds SELinux enabled.

My limited research suggests that at least on RedHat-family systems, 
/sbin/service is supposed to be the correct command to use to manage 
services even under SELinux; it is expected (at least by some) to start the 
target service in the right context.  Upon looking at the code (CentOS 5 
and CentOS 6), however, it does not appear to do anything special to take 
the SELinux context into account.  In effect, that delegates responsibility 
to the service control script.  That's not unreasonable, really; I would 
account it part of the control script's job to run the service in the 
correct context.

Now, RedHat-family Linuxes do have run_init, which leaves me a bit 
perplexed.  Moreover, its docs seem to indicate that it reads the context 
to use from /etc/selinux/POLICYTYPE/contexts/initrc_context, and for my 
version of the targeted policy that file contains 
user_u:system_r:initrc_t:s0.  I don't think that would get you system_u, 
either.  In the end, therefore, I think on these systems it does still come 
down to the initscript's and / or the daemon's own job to run the daemon in 
the appropriate context.

If you are on a different Linux family, however, then you may have a more 
viable issue against Puppet.  On a lot of systems, including Debian and 
Gentoo, Puppet manages services by directly invoking the initscripts.  If 
there is a different command that Puppet should be using instead then I'm 
sure PuppetLabs would appreciate you filing a ticket to tell them about it.

In any event, I maintain that it would be inappropriate for Puppet to 
provide for explicitly setting the SELinux context to use for starting 
services.  The system initialization program -- whether init, upstart, or 
something else -- either knows somehow which context to use for each 
service, or else delegates to individual services' configurations to choose 
this.  Puppet should be able to do the same.

Moreover, I reiterate that the best solution would be to configure the 
service correctly in the first place.  If that's not viable (e.g. if it 
would require modifying the initscript and you are unwilling to do that) 
then you have the alternative of writing a custom provider for the Service 
type, and explicitly directing that provider to be used where needed in 
your Service declarations.  There are good base classes and a lot of 
examples of Service providers in the Puppet distribution, so I don't think 
that would be so hard.  You definitely should not need to come back and 
correct files' SELinux contexts after the fact.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/A0_F_SrsfUQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Help- Parsing data from a yaml file using puppet 3.0 and hiera

2012-10-11 Thread Stephen Gran
Hi,

On Thu, 2012-10-11 at 07:45 -0700, Nishant Jain wrote:
 Can anybody reply to this post.
 
 
 Thanks Nishant
 
 On Wednesday, October 10, 2012 4:31:26 PM UTC-4, Nishant Jain wrote:
 Hello Everybody,
 Can anybody please provide an example
 about how to read an array using hiera in puppet 3.0.
 Right now the agents are giving the following error when
 connecting to the master   Could not retrieve catalog from
 remote server: Error 400 on SERVER: Could not find data item
 users in any Hiera data file and no default supplied .
 
 
 Following is the structure of hiera.yaml 
 ---
 :backend:
   - yaml
 :hierarchy:
   - global
 :puppet:
 :datasource: data
 :yaml:
 # datadir is empty here, so hiera uses its defaults
 # When specifying a datadir, make sure the path of the datadir
 exists
   :datadir: /etc/puppet/hiera/data
 
 
 
 
 Followin is the structure of global.yaml file:-
 ---
  users:
- 'seventeen'
- 'eighteen'

Are you sure /etc/puppet/hiera/data/global.yaml exists on the puppet
master?  Why are you using :puppet: and :datasource: ?

Cheers,
-- 
Stephen Gran
Senior Systems Integrator - guardian.co.uk

Please consider the environment before printing this email.
--
Visit guardian.co.uk - newspaper of the year

www.guardian.co.ukwww.observer.co.uk www.guardiannews.com 

On your mobile, visit m.guardian.co.uk or download the Guardian
iPhone app www.guardian.co.uk/iphone and iPad edition www.guardian.co.uk/iPad 
 
Save up to 37% by subscribing to the Guardian and Observer - choose the papers 
you want and get full digital access. 
Visit guardian.co.uk/subscribe 

-
This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.
 
Guardian News  Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.

Guardian News  Media Limited

A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP

Registered in England Number 908396

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Hello,

On Thu, Oct 11, 2012 at 8:39 PM, Jeff McCune j...@puppetlabs.com wrote:
 Yes, this is a perfect example of when to employ the anchor pattern. It's
 also a perfect example of the bug we need to fix in puppet.

 Class foo, bar, an baz will float off in the relationship graph because
 class wrapper contains no other resources to anchor them down.

 If you add a begin an end anchor resources to class wrapper and establish
 relationships between them and the three contained classes, it should work
 as you expect

 I will give a concrete example, if you wish, once I get to my desk.


Thank you for the response, an example for the wrapper class would
indeed be nice.

And although this might be a difficult question to give a generalized
(or rather, a slightly less technical) answer, but this behaviour of
floating off of the graph, is it easy to attribute this to particular
scenarios ? For example, as you noticed in the previous replies - Luke
suggested this for nested classes, while llowder thought this was a
perfect example, as so you ! :)

Also, @Luke, your suggestion to be explicit about the relationships like so:
class wrapper {
  include foo
  include bar
  class[foo]-Class[wrapper]
  class[bar]-Class[wrapper]
}

node x {
  include someclass
  include wrapper
  class[someclass]-Class[wrapper]
}

... didn't work. someclass was still applied after the wrapper
class's classes.

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



[Puppet Users] Error while installing puppet

2012-10-11 Thread mastinder singh
I am getting below error.

 ruby install.rb
Could not load openssl; cannot install
[root@BL08DL365 puppet-3.0.0]#


-- 
regards,

Mastinder singh
Uk Number +447624169401
India +918105601518
USA 1-855-946-2329 / (205) 588-4757
Israel *057 - 9463862
Website: http://mastinder.in
*

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



[Puppet Users] Automate adding new host to nagios server?

2012-10-11 Thread Brent Clark

Good day

I was wondering if someone could help me.

Say I have three servers. One puppet master, one webserver, and one nagios 
server.

Is there a way to automate the process of adding the web server to the nagios 
server for monitoring via a puppet.

If someone could assists, or suggest a better means, it would be appreciated.

Kind Regards
Brent Clark

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



RE: [Puppet Users] Automate adding new host to nagios server?

2012-10-11 Thread Bernd Adamowicz
See:

* http://docs.puppetlabs.com/guides/exported_resources.html  or
* http://www.bernd-adamowicz.de/12/puppet-stored-configurations-and-icinga/

Cheers,
Bernd

-Original Message-
From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On 
Behalf Of Brent Clark
Sent: Donnerstag, 11. Oktober 2012 17:03
To: puppet-users@googlegroups.com
Subject: [Puppet Users] Automate adding new host to nagios server?

Good day

I was wondering if someone could help me.

Say I have three servers. One puppet master, one webserver, and one nagios 
server.

Is there a way to automate the process of adding the web server to the nagios 
server for monitoring via a puppet.

If someone could assists, or suggest a better means, it would be appreciated.

Kind Regards
Brent Clark

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

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



Re: [Puppet Users] Re: razor hang

2012-10-11 Thread Daniel Pittman
On Thursday, October 11, 2012 5:34:47 AM UTC-7, Markus Falb wrote:

 On 9.10.2012 18:39, Daniel Pittman wrote: 
  On Monday, October 8, 2012 9:30:37 AM UTC-7, Markus Falb wrote: 
  
  I was playing with razor today. But I am not going far. 
  
  ipxe is downloading the microkernel but stays at 98% 
  On the server side I see 
  
  /opt/razor/Razor/bin/razor -w boot default 
  
 '{hw_id:00:50:56:2e:c4:50___,dhcp_mac:01-00-50-56-2e-c4-50}' 
  /opt/razor/Razor/bin/razor -w image path  mk kernel 
  
 {http_err_code:200,errcode:0,response:/opt/razor/Razor/image/mk/687EqtppQJQPbgeirdhZy4/boot/vmlinuz,command:null,result:Ok,resource:ProjectRazor::Slice::Image}
  

  
  
  This suggests that the download of the microkernel finished 
  successfully. If so, why doesnt the microkernel do something? Or did it 
  and I only don't know how to tell? 
  
  The iPXE progress meter is a bit special, in the classic run to 99 
  percent, sit there forever sense, but you are not wrong: this is not 
 doing 
  the right thing. 
  
  The client should download the kernel, then download an initrd, and then 
  boot a full Linux environment and run in it.  You should see the usual 
  (verbose) Linux boot sequence progress through. 

 well, my razor test server is a virtualbox guest bridged to the lan. 
 The virtual host box is connected by wire. 

 My initial test client was a vmware guest on my laptop which is 
 connected per wlan. 

 I tried a virtualbox guest instead on my laptop with similar experience. 
 It downloaded the kernel but hangs at the initrd. 

 i tried a virtualbox guest on the same host as the razor server is and 
 the kernel boots and registers with razor. 

 So I got something to work with at least, in a limited scope for now, 
 though. 


Hrm.  That seems to point fairly squarely to some oddity at the network 
layer: sending those files is pretty close to static file serving.  If you 
could capture a packet trace to figure out what was happening that would be 
great.
 

 Thank You, hoping that the puppet mailing list is the appropiate media 
 for questions about razor. 


Yes, it is - no problems there. :)

-- 
Daniel Pittman

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/LjBt0ZkvnlMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Help- Parsing data from a yaml file using puppet 3.0 and hiera

2012-10-11 Thread Nishant Jain

Yes /etc/puppet/hiera/data/global.yaml exists . I even tried removing 
:puppet and :datasource, but still its not working.
On Thursday, October 11, 2012 11:31:03 AM UTC-4, Stephen Gran wrote:

 Hi, 

 On Thu, 2012-10-11 at 07:45 -0700, Nishant Jain wrote: 
  Can anybody reply to this post. 
  
  
  Thanks Nishant 
  
  On Wednesday, October 10, 2012 4:31:26 PM UTC-4, Nishant Jain wrote: 
  Hello Everybody, 
  Can anybody please provide an example 
  about how to read an array using hiera in puppet 3.0. 
  Right now the agents are giving the following error when 
  connecting to the master   Could not retrieve catalog from 
  remote server: Error 400 on SERVER: Could not find data item 
  users in any Hiera data file and no default supplied . 
  
  
  Following is the structure of hiera.yaml 
  --- 
  :backend: 
- yaml 
  :hierarchy: 
- global 
  :puppet: 
  :datasource: data 
  :yaml: 
  # datadir is empty here, so hiera uses its defaults 
  # When specifying a datadir, make sure the path of the datadir 
  exists 
:datadir: /etc/puppet/hiera/data 
  
  
  
  
  Followin is the structure of global.yaml file:- 
  --- 
   users: 
 - 'seventeen' 
 - 'eighteen' 

 Are you sure /etc/puppet/hiera/data/global.yaml exists on the puppet 
 master?  Why are you using :puppet: and :datasource: ? 

 Cheers, 
 -- 
 Stephen Gran 
 Senior Systems Integrator - guardian.co.uk 

 Please consider the environment before printing this email. 
 -- 
 Visit guardian.co.uk - newspaper of the year 

 www.guardian.co.ukwww.observer.co.uk www.guardiannews.com 

 On your mobile, visit m.guardian.co.uk or download the Guardian 
 iPhone app www.guardian.co.uk/iphone and iPad edition 
 www.guardian.co.uk/iPad 
   
 Save up to 37% by subscribing to the Guardian and Observer - choose the 
 papers you want and get full digital access. 
 Visit guardian.co.uk/subscribe 

 - 
 This e-mail and all attachments are confidential and may also 
 be privileged. If you are not the named recipient, please notify 
 the sender and delete the e-mail and all attachments immediately. 
 Do not disclose the contents to another person. You may not use 
 the information for any purpose, or store, or copy, it in any way. 
   
 Guardian News  Media Limited is not liable for any computer 
 viruses or other material transmitted with or as part of this 
 e-mail. You should employ virus checking software. 

 Guardian News  Media Limited 

 A member of Guardian Media Group plc 
 Registered Office 
 PO Box 68164 
 Kings Place 
 90 York Way 
 London 
 N1P 2AP 

 Registered in England Number 908396 



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/zBdi787bfH4J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] PuppetDB/Hiera post-install verification??

2012-10-11 Thread Worker Bee
Hi Everyone;

Can anyone suggest any post installationtests to verify the functionality
of both puppetdb (using postgres) and hiera?
I am a somewhat nbew user and I am not really sure what a good, quick
method is to verify the functionality pst install.

If anyone could suggest steps/test cases, that would be greatly
apprecaited!  I also think this would be useful to include as a section in
the installation docs.

Thanks!
Bee

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Jeff McCune
On Thu, Oct 11, 2012 at 8:32 AM, Mohit Chawla mohit.chawla.bin...@gmail.com
 wrote:

 Hello,

 On Thu, Oct 11, 2012 at 8:39 PM, Jeff McCune j...@puppetlabs.com wrote:
  Yes, this is a perfect example of when to employ the anchor pattern. It's
  also a perfect example of the bug we need to fix in puppet.
 
  Class foo, bar, an baz will float off in the relationship graph because
  class wrapper contains no other resources to anchor them down.
 
  If you add a begin an end anchor resources to class wrapper and establish
  relationships between them and the three contained classes, it should
 work
  as you expect
 
  I will give a concrete example, if you wish, once I get to my desk.
 

 Thank you for the response, an example for the wrapper class would
 indeed be nice.

 And although this might be a difficult question to give a generalized
 (or rather, a slightly less technical) answer, but this behaviour of
 floating off of the graph, is it easy to attribute this to particular
 scenarios ? For example, as you noticed in the previous replies - Luke
 suggested this for nested classes, while llowder thought this was a
 perfect example, as so you ! :)

 Also, @Luke, your suggestion to be explicit about the relationships like
 so:
 class wrapper {
   include foo
   include bar
   class[foo]-Class[wrapper]
   class[bar]-Class[wrapper]
 }

 node x {
   include someclass
   include wrapper
   class[someclass]-Class[wrapper]
 }

 ... didn't work. someclass was still applied after the wrapper
 class's classes.



Here's how I'd do it:

class wrapper {
  anchor { 'wrapper::begin': }
  anchor { 'wrapper::end':
require = Anchor['wrapper::begin'],
  }

  # Note, foo, bar, baz still do not have relationships between one another.
  class { foo:
require = Anchor['wrapper::begin'],
before = Anchor['wrapper::end'],
  }
  class { bar:
require = Anchor['wrapper::begin'],
before = Anchor['wrapper::end'],
  }
  class { baz:
require = Anchor['wrapper::begin'],
before = Anchor['wrapper::end'],
  }
}

And a node like:

node x {
  include someclass
  include wrapper
  Class[someclass]-Class[wrapper]
}

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



Re: [Puppet Users] Error while installing puppet

2012-10-11 Thread Jeff McCune
Did you build your own Ruby and forget to compile the openssl ruby bindings
into MRI?  I've certainly done this and forgot to compile against OpenSSL
which caused this error.

If you're building your own ruby, I strongly recommend using a build tool
like rbenv [1] and ruby-build [2] to get a consistent build.

Also, I strongly encourage you _not_ to use install.rb.  These days,
install.rb is really meant for package maintainers instead of end users.
 I'd recommend using a package from {apt,yum,downloads}.puppetlabs.com,
your distribution, or rubygems.org.

[1] https://github.com/sstephenson/rbenv
[2] https://github.com/sstephenson/ruby-build

-Jeff

On Thu, Oct 11, 2012 at 8:28 AM, mastinder singh mastin...@gmail.comwrote:

 I am getting below error.

  ruby install.rb
 Could not load openssl; cannot install
 [root@BL08DL365 puppet-3.0.0]#


 --
 regards,

 Mastinder singh
 Uk Number +447624169401
 India +918105601518
 USA 1-855-946-2329 / (205) 588-4757
 Israel *057 - 9463862
 Website: http://mastinder.in
 *

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


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



Re: [Puppet Users] puppet patterns

2012-10-11 Thread Ryan Coleman
On Thu, Oct 11, 2012 at 6:21 AM, Stuart Cracraft smcracr...@me.com wrote:

 Anyone know various resources besides forge.puppetlabs.com and the
 various books for
 usable puppet patterns?


http://puppetcookbook.com/

-- 
Ryan Coleman | @ryanycoleman
Modules  Forge | Puppet Labs

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Thank you, that worked nicely !

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



Re: [Puppet Users] Windows Exec ifonly equals true

2012-10-11 Thread Josh Cooper
Hi Jim,

On Thu, Oct 11, 2012 at 6:52 AM, jim stra...@gmail.com wrote:
 Hello Puppet Users

 Can some one please help me, as i'm new to puppet and its syntax.

 I want to run an exec

 exec { PowerShell_Install:
 command =
 C:/Install/WindowsServer2003-KB968930-x86-ENG.exe /quiet,

 but only if this file DOESN'T exist
 C:/WINDOWS/system32/WindowsPowerShell/v1.0/powershell.exe

 Regards

 Jim

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/puppet-users/-/jTWLC6Vz4FQJ.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.

You'll want to use the `creates` parameter so that the exec will only
run if that file doesn't exist. See
http://docs.puppetlabs.com/references/latest/type.html#exec

Since that path is in the windows system directory, be careful of
Windows filesystem redirection. You may need to specify the path as
`c:/windows/sysnative/...` See
http://docs.puppetlabs.com/windows/running.html#file-system-redirection-in-64-bit-windows-versions

Josh

-- 
Josh Cooper
Developer, Puppet Labs

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



Re: [Puppet Users] expiry attribut of users applied every time

2012-10-11 Thread Jeff McCune
Nicholas,

An easy way to reproduce the problem is to run `puppet resource` a number
of consecutive times.  We expect subsequent executions of Puppet to be
idempotent, but they're clearly not:

root@puppetmaster:~# puppet resource user jefftest expiry=2012-01-01
/User[jefftest]/expiry: defined 'expiry' as '2012-01-01'
user { 'jefftest':
  ensure = 'present',
}
root@puppetmaster:~# puppet resource user jefftest expiry=2012-01-01
/User[jefftest]/expiry: defined 'expiry' as '2012-01-01'
user { 'jefftest':
  ensure = 'present',
}
root@puppetmaster:~# puppet resource user jefftest expiry=2012-01-01
/User[jefftest]/expiry: defined 'expiry' as '2012-01-01'
user { 'jefftest':
  ensure = 'present',
}

A common trick I employ in situations like these is to run with debugging
turned on.  This should display the value Puppet thinks the parameter
_should_ be, which is what we specify in the manifest or on the command
line, versus what the parameter _is_ on the system.  If they mis-match,
then I change my manifest to match the is value and that usually makes
Puppet idempotent again.

Unfortunately, in this case we're not getting the is values in the debug
output.  =(

root@puppetmaster:~# puppet resource user jefftest expiry=2012-01-01 --debug
Debug: Puppet::Type::User::ProviderLdap: true value when expecting false
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not
exist
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl
does not exist
Debug: Loaded state in 0.00 seconds
Debug: Executing '/usr/sbin/usermod -e 2012-01-01 jefftest'
/User[jefftest]/expiry: defined 'expiry' as '2012-01-01'
Debug: Finishing transaction 70035535867960
Debug: Storing state
Debug: Stored state in 0.00 seconds
user { 'jefftest':
  ensure = 'present',
}

So then I dive into the ruby debugger.  I used ack to search for defined
' in the l ib/ directory and came up with this:

https://github.com/puppetlabs/puppet/blob/3.0.x/lib/puppet/property.rb#L104-106

So Puppet is thinking the current value from the system is totally absent.
 We can't make this idempotent as a result.  This is definitely a bug,
would you mind filing it?  If so, I'd be happy to do so on your behalf, but
bugs from users are always better than bugs I report.

Please feel free to add me as a watcher, I'll update it with the
information I found.

Hope this helps,
-Jeff

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



[Puppet Users] Re: user management

2012-10-11 Thread siva kumar
Dear Sukh, 
 
I am siva kumar from India , I am new to the puppet and we are planing to 
deploy puppet in our env. and i m learning puppet and working in basic 
modules. However, i came across 
http://itand.me/using-puppet-to-manage-users-passwords-and-ss... for 
user management in puppet. and i follwoed it to deploy and test in my test 
servers. But , the above post no fullfilling my require ment.  Could you 
please share you user management Module with me it very usefull to me.. 
thanks in advance..
 
Regards,
 
Siva Kumar .

On Saturday, January 9, 2010 1:14:22 PM UTC-6, Sukh Khehra wrote: 

 We're using local passwd/shadow files on all our linux hosts for
 authentication and manage them by defining virtual resources like the
 following and realizing them in the appropriate classes based on
 authorization requirements. 

 @user {
 username:
 comment = User Name,
 uid = 6,
 password= '$9$5/PrhlML$AttWraRXLd0ASwCq.uIss1',
 home= /home/username,
 ensure  = present,
 gid = 6,
 groups  = [groupname],
 shell   = /bin/sh,
 managehome  = true,
 require = [Group[groupname]],
 membership  = minimum;
 }   

 Currently there is no way for me to directly tie puppet to ldap in our
 environment (for various non technical reasons) but I would like to keep
 the passwords synched with ldap. So I was thinking of writing a script
 to query ldap and create perhaps a csv file containing username,password
 hash,  shell values. 

 My questions is can I have my puppet manifests, like the snippet above,
 grab the values for password and shell from an external file? ... a file
 that I create from ldap every night? I found
 http://nephilim.ml.org/~rip/puppet/extlookup.rb; but also wanted to ask
 the community here if that's the best way to go. Any ideas will be
 appreciated. 

 Regards,
 Sukh

  
On Saturday, January 9, 2010 1:14:22 PM UTC-6, Sukh Khehra wrote: 

 We're using local passwd/shadow files on all our linux hosts for
 authentication and manage them by defining virtual resources like the
 following and realizing them in the appropriate classes based on
 authorization requirements. 

 @user {
 username:
 comment = User Name,
 uid = 6,
 password= '$9$5/PrhlML$AttWraRXLd0ASwCq.uIss1',
 home= /home/username,
 ensure  = present,
 gid = 6,
 groups  = [groupname],
 shell   = /bin/sh,
 managehome  = true,
 require = [Group[groupname]],
 membership  = minimum;
 }   

 Currently there is no way for me to directly tie puppet to ldap in our
 environment (for various non technical reasons) but I would like to keep
 the passwords synched with ldap. So I was thinking of writing a script
 to query ldap and create perhaps a csv file containing username,password
 hash,  shell values. 

 My questions is can I have my puppet manifests, like the snippet above,
 grab the values for password and shell from an external file? ... a file
 that I create from ldap every night? I found
 http://nephilim.ml.org/~rip/puppet/extlookup.rb; but also wanted to ask
 the community here if that's the best way to go. Any ideas will be
 appreciated. 

 Regards,
 Sukh

  

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/1zQCMDCuO9YJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: puppet facts.d executable PROBLEM

2012-10-11 Thread Ellison Marks
The facter dot d plugin is probably in a little bit of flux right now. I 
know it was included in the puppet stdlib module for a while, but it 
apparently was recently removed from there(commit 
8fc00ea5b6b39b220ebc6391489915dbeeb364ab). R.I.P's version is what the 
stdlib version was based on, and is a little on the old side now, I 
believe, which could be why part of it was commented. I'm not sure if there 
are plans to include that plugin in a more core role in the future, perhaps 
one of the puppet team could comment on that.

On Thursday, October 11, 2012 6:24:57 AM UTC-7, Jones wrote:

 Hi folks,

 I'm using this plugin 
 https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d
 and I can't get a fact out of a simple shell script. YAML TXT JSON works 
 well

 My little shell script testfact.sh looks like

 #!/bin/bash
 echo TEST=NOT WORKING

 made it executable
 chmod +x testfact.sh

 made a puppet agent -t to read the new fact

 BUT 
 $facter --puppet 
 is not getting the fact

 Thanx a lot!


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/8j209ZU2cEkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread jcbollinger


On Thursday, October 11, 2012 10:32:29 AM UTC-5, alcy wrote:

 And although this might be a difficult question to give a generalized 
 (or rather, a slightly less technical) answer, but this behaviour of 
 floating off of the graph, is it easy to attribute this to particular 
 scenarios ?


Yes.  When one class declares another, whether via the 'include' or 
'require' function or via a parametrized-style declaration, that 
(intentionally) does not establish any ordering relationship between the 
declaring and declared classes.  Without something else, such as anchors, 
to establish an order between them, the two classes are disconnected in the 
relationship graph; that has come to be described as the declared class 
floating off, especially when the declaring class is connected to 
multiple others in the relationship graph.

Such disconnectedness is not necessarily a problem, because it may indeed 
be that no relative ordering of the classes involved is necessary or 
expected.  If, however, the purpose of the one class declaring the other is 
to aggregate the latter into a larger unit, then it is a indeed an issue 
that needs to be addressed.  That's where you need to use the anchor 
pattern.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/JO_lAA64ifcJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Help- Parsing data from a yaml file using puppet 3.0 and hiera

2012-10-11 Thread jcbollinger


On Thursday, October 11, 2012 11:11:07 AM UTC-5, Nishant Jain wrote:


 Yes /etc/puppet/hiera/data/global.yaml exists . I even tried removing 
 :puppet and :datasource, but still its not working.


Is that file readable by the puppetmaster?  Remember that, at least in a 
typical installation, the master runs as an unprivileged user (often 
'puppet').  If file ownership and permissions, ACLs, and/or SELinux 
labeling prevent the master from reading the data file then you might get 
an error such as you report.  (Look not only at the file itself, but also 
at each directory in the path to it.)


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/nGVf4N0kcTAJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Nagios

2012-10-11 Thread TFML
I've got a Nagios setup with puppet to add nodes/contacts/command running at 
one datacenter, I'm trying to setup a second Nagios server using the same 
manifests, but I'm getting this error:

info: Retrieving plugin
info: Loading facts in snmpd
info: Loading facts in snmpd
err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Exported resource Nagios_timeperiod[24x7] cannot override local resource on 
node nagios2.theflux.net
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
Time:
 Last run: 1349977873

Can someone give me some direction on why this is happening?  Thanks!

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



Re: [Puppet Users] Re: Help- Parsing data from a yaml file using puppet 3.0 and hiera

2012-10-11 Thread Nishant Jain
Thanks Everybody, I got it working, but am still not able to read the array 
using hiera. It always read the last element of the array.
For example in the following global.yaml file:-
---
 users:
   - 'seventeen'
   - 'eighteen'


when i write hiera('users') and print it as a content it a file, It always 
write eighteen in the file, instead of seventeen , eighteen.


It always read the last value, i.e. eighteen.

Any idea how I can make it read the whole array.


Thanks,
Nishant



On Thursday, October 11, 2012 2:32:20 PM UTC-4, jcbollinger wrote:



 On Thursday, October 11, 2012 11:11:07 AM UTC-5, Nishant Jain wrote:


 Yes /etc/puppet/hiera/data/global.yaml exists . I even tried removing 
 :puppet and :datasource, but still its not working.


 Is that file readable by the puppetmaster?  Remember that, at least in a 
 typical installation, the master runs as an unprivileged user (often 
 'puppet').  If file ownership and permissions, ACLs, and/or SELinux 
 labeling prevent the master from reading the data file then you might get 
 an error such as you report.  (Look not only at the file itself, but also 
 at each directory in the path to it.)


 John



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/dV0jz1_K9TcJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] always changing sshkeys

2012-10-11 Thread Stefan Schulte
On Tue, Oct 09, 2012 at 03:46:36PM +0100, Klaus Ethgen wrote:
 I have a setup where I construct the host_aliases of sshkey. This work
 fine. But now I encounter that several (not all) keys are changed every
 run of puppet:
notice: /Stage[main]/Ssh/Sshkey[XX.XXX.XXrsa]/host_aliases: 
 host_aliases changed 'XX257.257.257.257' to  'XX 257.257.257.257'
 
 I changed the name part to Xes and the IP to 257.257.257.257, but they
 are the correct IP and name of one host.
 
 So why is this happening? Except from the fact that the first output is
 not separated by space and the second is. (In the file
 /etc/ssh/sshd_known_hosts all entries are separated correctly by coma.)
 
 It seems not have to do with versions of puppet. I use versions 2.7.6,
 2.6.16, 0.25.4 and 2.7.11.
 
 I tried to debug this to find where the decision is made to replace an
 entry but failed to find.
 
 Any Idea?
 

It's a bit hard to debug your problem without seeing the actual line in
your /etc/ssh/ssh_known_hosts file. If you dont want to paste it please
do this:

extract the complete line from the target file. Now run

  # irb
  irb line = 'your actual line'
  irb fields = line.split(/\s+/)
  # you should now see an array. The first item should be hostname and
  # all aliases
  irb name = fields[0]
  irb name.split(',')

What do you see after executing the last line? You should see something
like [ name, host_alias1, host_alias2 ]

-Stefan

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



Re: [Puppet Users] expiry attribut of users applied every time

2012-10-11 Thread Stefan Schulte
On Thu, Oct 11, 2012 at 10:47:41AM -0700, Jeff McCune wrote:
 Nicholas,
 
 [...]
  We can't make this idempotent as a result.  This is definitely a bug,
 would you mind filing it?  If so, I'd be happy to do so on your behalf, but
 bugs from users are always better than bugs I report.
 
 Please feel free to add me as a watcher, I'll update it with the
 information I found.
 
 Hope this helps,
 -Jeff
 

As Nicolas stated there already is a bug report:
http://projects.puppetlabs.com/issues/11675#change-73099

Puppet simply does not check the current state at (it is not even
implemented anywhere in the code, at least I have not found it)

-Stefan

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



[Puppet Users] Facter not parsing puppet_enterprise_installer.txt

2012-10-11 Thread Kyel Woodard
I have 2 puppet clients, 1 works, and 1 doesn't.

When I run facter, I get this line on the working one: 
Parsing /etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt 
using txt_parser

but it doesn't show up on the broken client. 

How can I make facter parse that file?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/xxyjhm_PtRwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] expiry attribut of users applied every time

2012-10-11 Thread Jeff McCune
On Oct 11, 2012, at 12:13 PM, Stefan Schulte
stefan.schu...@taunusstein.net wrote:

 On Thu, Oct 11, 2012 at 10:47:41AM -0700, Jeff McCune wrote:
 Nicholas,

 [...]
 We can't make this idempotent as a result.  This is definitely a bug,
 would you mind filing it?  If so, I'd be happy to do so on your behalf, but
 bugs from users are always better than bugs I report.

 Please feel free to add me as a watcher, I'll update it with the
 information I found.

 Hope this helps,
 -Jeff

 As Nicolas stated there already is a bug report:
 http://projects.puppetlabs.com/issues/11675#change-73099

Ah thanks. I missed that while on my phone.

 Puppet simply does not check the current state at (it is not even
 implemented anywhere in the code, at least I have not found it)

I'll try and get this fixed as soon as possible. That's really disappointing.

 -Stefan

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


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



[Puppet Users] PuppetDB Installation Issue

2012-10-11 Thread Worker Bee
I am attempting to install puppetdb using the downloaded module.
I have puppet 3.0 with passenger installed.

I am getting the following error:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid
resource type firewall at
/etc/puppet/modules/puppetdb/manifests/server/firewall.pp:23

Would appreciate any feedback anyone might have!

Thanks

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



Re: [Puppet Users] Re: puppet facts.d executable PROBLEM

2012-10-11 Thread R.I.Pienaar


- Original Message -
 From: Ellison Marks gty...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 7:04:41 PM
 Subject: [Puppet Users] Re: puppet facts.d executable PROBLEM
 
 The facter dot d plugin is probably in a little bit of flux right
 now. I know it was included in the puppet stdlib module for a while,
 but it apparently was recently removed from there(commit
 8fc00ea5b6b39b220ebc6391489915dbeeb364ab) . R.I.P's version is what
 the stdlib version was based on, and is a little on the old side
 now, I believe, which could be why part of it was commented. I'm not
 sure if there are plans to include that plugin in a more core role
 in the future, perhaps one of the puppet team could comment on that.
 

the released version of puppetlabs-stdlib on the puppet forge still has
the facts.d plugin included and its newer than mine - based on mine but
improved.

facter 2 will have it merged with it and the stdlib will then remove 
facts.d properly

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



[Puppet Users] Re: Looking for a way to balance the contents of services (like DNS, LDAP, NIS)

2012-10-11 Thread trevman

I'll check out the library and the fdqn_rotate function. 

Thanks. 


On Wednesday, October 10, 2012 12:55:21 PM UTC-7, jcbollinger wrote:



 On Wednesday, October 10, 2012 11:10:32 AM UTC-5, trevman wrote:

 I'm looking for a way to balance out services when insuring the content 
 of configuration files.

 Example is how to do this with /etc/yp.conf:
 ##
 domain example.com server 192.168.1.2
 domain example.com server 192.168.1.3
 domain example.com server 192.168.1.4
 ##

 I'd like to *change the order of the entries *in a random or rotating 
 fashion so that multiple machines would get a *different *order so that 
 we can scale the services without having to invest in a load balancer.

 Obviously, we wouldn't want the contents to continually change on every 
 machine, so the tests would need to be appropriate.

 Any ideas?


 There are lots of ways you could do this, but the the ready-built 
 fqdn_rotate() function in Puppetlabs's add-in stdlib module (
 https://github.com/puppetlabs/puppetlabs-stdlib) would probably serve as 
 a good foundation.  Put the NIS server IPs in an array, shuffle it with 
 fqdn_rand(), and read the results out into your yp.conf template.  Each 
 node will have a consistent order as long as its FQDN does not change.


 John



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/XieYuut56GoJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet Dashboard won't install MySQL schema

2012-10-11 Thread Tim Gendorf
I have been working on this issue for almost 5 days
 and can not get 
past this error.

Puppet Dashboard is installed via RPM from puppetlabs.  
I have tried versions
1.2.12, 1.2.9 and am currently on 1.2.1.

Regardless of the version, I get the same exact error
 every time I run rake RAILS_ENV=production db:migrate.

(in /usr/share/puppet-dashboard)
rake aborted!
no such file to load -- /usr/share/puppet-dashboard/lib/
lib/delayed/tasks
/usr/share/puppet-dashboard/Rakefile:11
(See full trace by running task with --trace)


Line 11 of the Rakefile says require 'tasks/rails'

Here is the trace:

(in /usr/share/puppet-dashboard)
rake aborted!
no such file to load -- /usr/share/puppet-dashboard/
lib/lib/delayed/tasks
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in`require'
/usr/share/puppet-dashboard/vendor/rails/activesupport/
lib/active_support/dependencies.rb:182:in
`require'
/usr/share/puppet-dashboard/vendor/rails/activesupport/
lib/active_support/dependencies.rb:547:in
`new_constants_in'
/usr/share/puppet-dashboard/vendor/rails/activesupport/
lib/active_support/dependencies.rb:182:in
`require'
/usr/share/puppet-dashboard/lib/tasks/jobs.rake:1
/usr/share/puppet-dashboard/vendor/rails/activesupport/
lib/active_support/dependencies.rb:171:in
`load_without_new_constant_marking'
/usr/share/puppet-dashboard/vendor/rails/activesupport/
lib/active_support/dependencies.rb:171:in
`load'
/usr/share/puppet-dashboard/vendor/rails/activesupport/
lib/active_support/dependencies.rb:547:in
`new_constants_in'
/usr/share/puppet-dashboard/vendor/rails/activesupport/
lib/active_support/dependencies.rb:171:in
`load'
/usr/share/puppet-dashboard/vendor/rails/railties/lib/
tasks/rails.rb:14
/usr/share/puppet-dashboard/vendor/rails/railties/lib/
tasks/rails.rb:14:in `each'
/usr/share/puppet-dashboard/vendor/rails/railties/lib/
tasks/rails.rb:14
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in`require'
/usr/share/puppet-dashboard/Rakefile:11
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2382:
in`load'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2382:
in`raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:
in`load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:
in`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2015:
in`load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1999:
in`run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:
in`standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:
in`run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19


I am running the following versions:

Centos 6.3 x86_64 (Fresh Install)
ruby 1.8.7
rubygems 1.3.7
rake 0.8.7
rack 1.1.0
mysql-server 5.1.61


I have read through several blogs and web pages
 on installation issues and can
not find an answer as to how to get past this error.

Any help or suggestions would be great.

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



[Puppet Users] Noob setting up, hitting SSL Errors

2012-10-11 Thread Zack Simpson
I'm a noob puppeteer.  I'm following the directions here:

http://shapeshed.com/setting-up-puppet-on-ubuntu-10-04/

I'm running two identical Ubuntu VMs.  I can apparently set up the master 
ok.  But, when I try to connect with an agent I get the following error 
from the agent:

Error: Failed to apply catalog: SSL_connect returned=1 errno=0 state=SSLv3 
read server session ticket A: tlsv1 alert decrypt error
Error: Could not send report: SSL_connect returned=1 errno=0 state=SSLv3 
read server session ticket A: tlsv1 alert decrypt error

And I get the following from the masterhttp.log on the master:

ERROR OpenSSL::SSL::SSLError: SSL_accept returned=1 errno=0 state=SSLv3 
read client certificate B: no certificate returned

At first I was running ruby 1.9.2 but then read this:

http://projects.puppetlabs.com/issues/9084

I tried to follow the instructions on that post and when that didn't work I 
rvm installed 1.8.7 and still no luck.

Any help greatly appreciated!

Zack



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/cEAp0Tc-efMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Noob setting up, hitting SSL Errors

2012-10-11 Thread Johan De Wit

On 10/11/2012 10:28 PM, Zack Simpson wrote:

I'm a noob puppeteer.  I'm following the directions here:

http://shapeshed.com/setting-up-puppet-on-ubuntu-10-04/

I'm running two identical Ubuntu VMs.  I can apparently set up the 
master ok.  But, when I try to connect with an agent I get the 
following error from the agent:


Error: Failed to apply catalog: SSL_connect returned=1 errno=0 
state=SSLv3 read server session ticket A: tlsv1 alert decrypt error
Error: Could not send report: SSL_connect returned=1 errno=0 
state=SSLv3 read server session ticket A: tlsv1 alert decrypt error


And I get the following from the masterhttp.log on the master:

ERROR OpenSSL::SSL::SSLError: SSL_accept returned=1 errno=0 
state=SSLv3 read client certificate B: no certificate returned


At first I was running ruby 1.9.2 but then read this:

http://projects.puppetlabs.com/issues/9084

I tried to follow the instructions on that post and when that didn't 
work I rvm installed 1.8.7 and still no luck.


Any help greatly appreciated!

Zack


Hi Zack,

Check the date on master and client.  They should be the same.

Grts

Jo



--
You received this message because you are subscribed to the Google 
Groups Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/cEAp0Tc-efMJ.

To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



--
Johan De Wit

Open Source Consultant (rhce : 805008667232363)
_

Open-Future   Phone   +32 (0)2/255 70 70
Zavelstraat 72Fax +32 (0)2/255 70 71
3071 KORTENBERG   Mobile  +32 (0)474/42 40 73
BELGIUM   http://www.open-future.be
_

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Hello John,

On Thu, Oct 11, 2012 at 11:53 PM, jcbollinger john.bollin...@stjude.org wrote:
 Yes.  When one class declares another, whether via the 'include' or
 'require' function or via a parametrized-style declaration, that
 (intentionally) does not establish any ordering relationship between the
 declaring and declared classes.  Without something else, such as anchors, to
 establish an order between them, the two classes are disconnected in the
 relationship graph; that has come to be described as the declared class
 floating off, especially when the declaring class is connected to multiple
 others in the relationship graph.

 Such disconnectedness is not necessarily a problem, because it may indeed be
 that no relative ordering of the classes involved is necessary or expected.
 If, however, the purpose of the one class declaring the other is to
 aggregate the latter into a larger unit, then it is a indeed an issue that
 needs to be addressed.  That's where you need to use the anchor pattern.


Thanks for the explanation, much appreciated. I suppose containing
resources is a fundamentally solved problem by virtue of the design
and goal, but containing classes seems to be a little different.
Nevertheless, I always do try to not having to enforce any order, but
at times, I suppose it becomes necessary. Thanks again for taking the
time to explain the behaviour.

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread R.I.Pienaar


- Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 10:04:41 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors
 
 Hello John,
 
 On Thu, Oct 11, 2012 at 11:53 PM, jcbollinger
 john.bollin...@stjude.org wrote:
  Yes.  When one class declares another, whether via the 'include' or
  'require' function or via a parametrized-style declaration, that
  (intentionally) does not establish any ordering relationship
  between the
  declaring and declared classes.  Without something else, such as
  anchors, to
  establish an order between them, the two classes are disconnected
  in the
  relationship graph; that has come to be described as the declared
  class
  floating off, especially when the declaring class is connected to
  multiple
  others in the relationship graph.
 
  Such disconnectedness is not necessarily a problem, because it may
  indeed be
  that no relative ordering of the classes involved is necessary or
  expected.
  If, however, the purpose of the one class declaring the other is to
  aggregate the latter into a larger unit, then it is a indeed an
  issue that
  needs to be addressed.  That's where you need to use the anchor
  pattern.
 
 
 Thanks for the explanation, much appreciated. I suppose containing
 resources is a fundamentally solved problem by virtue of the design
 and goal, but containing classes seems to be a little different.
 Nevertheless, I always do try to not having to enforce any order, but
 at times, I suppose it becomes necessary. Thanks again for taking the
 time to explain the behaviour.

i find the anchor pattern both a royal pain and too strict, i dont generally
care to bind classes between two resources but instead just before some 
resource or class

class wrapper {
   include one, two, three

   Class[one] - Class[two] - Class[three] - Class[wrapper]
}

at this point 'include wrapper' will have those 3 classes and their 
resources completed before anything that requires the wrapper class

this is often sufficient enough and satisfies 'just enough ordering hints'
to me.


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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Hello,

On Fri, Oct 12, 2012 at 2:44 AM, R.I.Pienaar r...@devco.net wrote:


 i find the anchor pattern both a royal pain and too strict, i dont generally
 care to bind classes between two resources but instead just before some
 resource or class

 class wrapper {
include one, two, three

Class[one] - Class[two] - Class[three] - Class[wrapper]
 }

 at this point 'include wrapper' will have those 3 classes and their
 resources completed before anything that requires the wrapper class

 this is often sufficient enough and satisfies 'just enough ordering hints'
 to me.

I suppose this is similar to what Luke suggested, that is:
class wrapper {
  include foo
  include bar
  Class[foo]-Class[wrapper]
  Class[bar]-Class[wrapper]
}

But that didn't work for me if I tried to make sure some class is
executed before the wrapper class. node x { class xyz;
class[xyz]-Class[wrapper] }

Except that I did not try Class[foo]-Class[bar]-Class[wrapper]
in the wrapper class ( because there isn't any relationship between
foo  bar ). So, maybe I am missing something in your approach ?

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread R.I.Pienaar


- Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 10:31:28 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors
 
 Hello,
 
 On Fri, Oct 12, 2012 at 2:44 AM, R.I.Pienaar r...@devco.net wrote:
 
 
  i find the anchor pattern both a royal pain and too strict, i dont
  generally
  care to bind classes between two resources but instead just before
  some
  resource or class
 
  class wrapper {
 include one, two, three
 
 Class[one] - Class[two] - Class[three] -
 Class[wrapper]
  }
 
  at this point 'include wrapper' will have those 3 classes and their
  resources completed before anything that requires the wrapper class
 
  this is often sufficient enough and satisfies 'just enough ordering
  hints'
  to me.
 
 I suppose this is similar to what Luke suggested, that is:
 class wrapper {
   include foo
   include bar
   Class[foo]-Class[wrapper]
   Class[bar]-Class[wrapper]
 }
 
 But that didn't work for me if I tried to make sure some class is
 executed before the wrapper class. node x { class xyz;
 class[xyz]-Class[wrapper] }
 
 Except that I did not try
 Class[foo]-Class[bar]-Class[wrapper]
 in the wrapper class ( because there isn't any relationship between
 foo  bar ). So, maybe I am missing something in your approach ?

his example should work fine

here's a more detailed example with some notifies, i can freely shuffle
my classes around in the chaining and it seems to do the right thing

http://p.devco.net/213/

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



Re: [Puppet Users] Puppet Dashboard won't install MySQL schema

2012-10-11 Thread Jo Rhett
I suspect you have an incorrect environment variable somewhere: you have lib 
being a subdirectory of lib, and there's no directory delayed.  That's the 
problem. The path to that library is actually 
~puppet-dashboard/vendor/rails/railties/lib/tasks/rails.rb

I am using the exact same environment you listed, exact same versions from RPMs 
as you listed. No problems.

Are you certain you don't have local gems installed as well which are confusing 
the issue?

On Oct 11, 2012, at 1:13 PM, Tim Gendorf wrote:
 I have been working on this issue for almost 5 days
 and can not get 
 past this error.
 
 Puppet Dashboard is installed via RPM from puppetlabs.  
 I have tried versions
 1.2.12, 1.2.9 and am currently on 1.2.1.
 
 Regardless of the version, I get the same exact error
 every time I run rake RAILS_ENV=production db:migrate.
 
 (in /usr/share/puppet-dashboard)
 rake aborted!
 no such file to load -- /usr/share/puppet-dashboard/lib/
 lib/delayed/tasks
 /usr/share/puppet-dashboard/Rakefile:11
 (See full trace by running task with --trace)
 
 
 Line 11 of the Rakefile says require 'tasks/rails'
 
 Here is the trace:
 
 (in /usr/share/puppet-dashboard)
 rake aborted!
 no such file to load -- /usr/share/puppet-dashboard/
 lib/lib/delayed/tasks
 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
 31:in `gem_original_require'
 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
 31:in`require'
 /usr/share/puppet-dashboard/vendor/rails/activesupport/
 lib/active_support/dependencies.rb:182:in
 `require'
 /usr/share/puppet-dashboard/vendor/rails/activesupport/
 lib/active_support/dependencies.rb:547:in
 `new_constants_in'
 /usr/share/puppet-dashboard/vendor/rails/activesupport/
 lib/active_support/dependencies.rb:182:in
 `require'
 /usr/share/puppet-dashboard/lib/tasks/jobs.rake:1
 /usr/share/puppet-dashboard/vendor/rails/activesupport/
 lib/active_support/dependencies.rb:171:in
 `load_without_new_constant_marking'
 /usr/share/puppet-dashboard/vendor/rails/activesupport/
 lib/active_support/dependencies.rb:171:in
 `load'
 /usr/share/puppet-dashboard/vendor/rails/activesupport/
 lib/active_support/dependencies.rb:547:in
 `new_constants_in'
 /usr/share/puppet-dashboard/vendor/rails/activesupport/
 lib/active_support/dependencies.rb:171:in
 `load'
 /usr/share/puppet-dashboard/vendor/rails/railties/lib/
 tasks/rails.rb:14
 /usr/share/puppet-dashboard/vendor/rails/railties/lib/
 tasks/rails.rb:14:in `each'
 /usr/share/puppet-dashboard/vendor/rails/railties/lib/
 tasks/rails.rb:14
 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
 31:in `gem_original_require'
 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
 31:in`require'
 /usr/share/puppet-dashboard/Rakefile:11
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2382:
 in`load'
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2382:
 in`raw_load_rakefile'
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:
 in`load_rakefile'
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:
 in`standard_exception_handling'
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2015:
 in`load_rakefile'
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1999:
 in`run'
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2067:
 in`standard_exception_handling'
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1997:
 in`run'
 /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
 /usr/bin/rake:19:in `load'
 /usr/bin/rake:19
 
 
 I am running the following versions:
 
 Centos 6.3 x86_64 (Fresh Install)
 ruby 1.8.7
 rubygems 1.3.7
 rake 0.8.7
 rack 1.1.0
 mysql-server 5.1.61
 
 
 I have read through several blogs and web pages
 on installation issues and can
 not find an answer as to how to get past this error.
 
 Any help or suggestions would be great.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.
 

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Weird, the only difference is I didn't define any relationship between
one, two, three, but made them all depend on wrapper individually, and
then in the node def, made the wrapper depend on some other class -
and it didn't work. Probably a bug (2.7.19 client and 2.7.11 server) ?

On Fri, Oct 12, 2012 at 3:10 AM, R.I.Pienaar r...@devco.net wrote:


 - Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 10:31:28 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors

 Hello,

 On Fri, Oct 12, 2012 at 2:44 AM, R.I.Pienaar r...@devco.net wrote:
 
 
  i find the anchor pattern both a royal pain and too strict, i dont
  generally
  care to bind classes between two resources but instead just before
  some
  resource or class
 
  class wrapper {
 include one, two, three
 
 Class[one] - Class[two] - Class[three] -
 Class[wrapper]
  }
 
  at this point 'include wrapper' will have those 3 classes and their
  resources completed before anything that requires the wrapper class
 
  this is often sufficient enough and satisfies 'just enough ordering
  hints'
  to me.

 I suppose this is similar to what Luke suggested, that is:
 class wrapper {
   include foo
   include bar
   Class[foo]-Class[wrapper]
   Class[bar]-Class[wrapper]
 }

 But that didn't work for me if I tried to make sure some class is
 executed before the wrapper class. node x { class xyz;
 class[xyz]-Class[wrapper] }

 Except that I did not try
 Class[foo]-Class[bar]-Class[wrapper]
 in the wrapper class ( because there isn't any relationship between
 foo  bar ). So, maybe I am missing something in your approach ?

 his example should work fine

 here's a more detailed example with some notifies, i can freely shuffle
 my classes around in the chaining and it seems to do the right thing

 http://p.devco.net/213/

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


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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread R.I.Pienaar


- Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 10:49:50 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors
 
 Weird, the only difference is I didn't define any relationship
 between one, two, three, but made them all depend on wrapper individually,
 and then in the node def, made the wrapper depend on some other class -
 and it didn't work. Probably a bug (2.7.19 client and 2.7.11 server)
 ?

if i change mine to one-wrapper, two-wrapper, three-wrapper it works
fine.

puppet 2.7.17

 
 On Fri, Oct 12, 2012 at 3:10 AM, R.I.Pienaar r...@devco.net wrote:
 
 
  - Original Message -
  From: Mohit Chawla mohit.chawla.bin...@gmail.com
  To: puppet-users@googlegroups.com
  Sent: Thursday, October 11, 2012 10:31:28 PM
  Subject: Re: [Puppet Users] Re: Wrapper classes, ordering 
  anchors
 
  Hello,
 
  On Fri, Oct 12, 2012 at 2:44 AM, R.I.Pienaar r...@devco.net
  wrote:
  
  
   i find the anchor pattern both a royal pain and too strict, i
   dont
   generally
   care to bind classes between two resources but instead just
   before
   some
   resource or class
  
   class wrapper {
  include one, two, three
  
  Class[one] - Class[two] - Class[three] -
  Class[wrapper]
   }
  
   at this point 'include wrapper' will have those 3 classes and
   their
   resources completed before anything that requires the wrapper
   class
  
   this is often sufficient enough and satisfies 'just enough
   ordering
   hints'
   to me.
 
  I suppose this is similar to what Luke suggested, that is:
  class wrapper {
include foo
include bar
Class[foo]-Class[wrapper]
Class[bar]-Class[wrapper]
  }
 
  But that didn't work for me if I tried to make sure some class is
  executed before the wrapper class. node x { class xyz;
  class[xyz]-Class[wrapper] }
 
  Except that I did not try
  Class[foo]-Class[bar]-Class[wrapper]
  in the wrapper class ( because there isn't any relationship
  between
  foo  bar ). So, maybe I am missing something in your approach ?
 
  his example should work fine
 
  here's a more detailed example with some notifies, i can freely
  shuffle
  my classes around in the chaining and it seems to do the right
  thing
 
  http://p.devco.net/213/
 
  --
  You received this message because you are subscribed to the Google
  Groups Puppet Users group.
  To post to this group, send email to puppet-users@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 
 
 --
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.
 
 

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Hmm, thanks, I'll try upgrading the master to the same minor version
and see if it works differently, would perhaps be surprising if it
does.

On Fri, Oct 12, 2012 at 3:25 AM, R.I.Pienaar r...@devco.net wrote:


 - Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 10:49:50 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors

 Weird, the only difference is I didn't define any relationship
 between one, two, three, but made them all depend on wrapper individually,
 and then in the node def, made the wrapper depend on some other class -
 and it didn't work. Probably a bug (2.7.19 client and 2.7.11 server)
 ?

 if i change mine to one-wrapper, two-wrapper, three-wrapper it works
 fine.

 puppet 2.7.17


 On Fri, Oct 12, 2012 at 3:10 AM, R.I.Pienaar r...@devco.net wrote:
 
 
  - Original Message -
  From: Mohit Chawla mohit.chawla.bin...@gmail.com
  To: puppet-users@googlegroups.com
  Sent: Thursday, October 11, 2012 10:31:28 PM
  Subject: Re: [Puppet Users] Re: Wrapper classes, ordering 
  anchors
 
  Hello,
 
  On Fri, Oct 12, 2012 at 2:44 AM, R.I.Pienaar r...@devco.net
  wrote:
  
  
   i find the anchor pattern both a royal pain and too strict, i
   dont
   generally
   care to bind classes between two resources but instead just
   before
   some
   resource or class
  
   class wrapper {
  include one, two, three
  
  Class[one] - Class[two] - Class[three] -
  Class[wrapper]
   }
  
   at this point 'include wrapper' will have those 3 classes and
   their
   resources completed before anything that requires the wrapper
   class
  
   this is often sufficient enough and satisfies 'just enough
   ordering
   hints'
   to me.
 
  I suppose this is similar to what Luke suggested, that is:
  class wrapper {
include foo
include bar
Class[foo]-Class[wrapper]
Class[bar]-Class[wrapper]
  }
 
  But that didn't work for me if I tried to make sure some class is
  executed before the wrapper class. node x { class xyz;
  class[xyz]-Class[wrapper] }
 
  Except that I did not try
  Class[foo]-Class[bar]-Class[wrapper]
  in the wrapper class ( because there isn't any relationship
  between
  foo  bar ). So, maybe I am missing something in your approach ?
 
  his example should work fine
 
  here's a more detailed example with some notifies, i can freely
  shuffle
  my classes around in the chaining and it seems to do the right
  thing
 
  http://p.devco.net/213/
 
  --
  You received this message because you are subscribed to the Google
  Groups Puppet Users group.
  To post to this group, send email to puppet-users@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/puppet-users?hl=en.
 

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



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


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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread R.I.Pienaar


- Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 10:59:33 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors
 
 Hmm, thanks, I'll try upgrading the master to the same minor version
 and see if it works differently, would perhaps be surprising if it
 does.

try my code with puppet apply like i showed? does it work?

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



[Puppet Users] Still fighting with tidy

2012-10-11 Thread Dan White
Either puppet-resource-type tidy is busted or I do not properly understand 
its use.

Red Had Enterprise Linux 5.8 server (x86_64)
I am seeing this behavior on both Puppet 2.6.17 and 2.7.19

I want to tidy up a path -- let's say /volume/foo/bar/  (bar is a directory)

The resource definition is:

tidy { '/volume/foo/bar/':
age = '0', 
recurse = true,
rmdirs  = true,
}

To test it, I do the following

cd /volume/foo/bar/
mkdir 1 2 3 4 5 6
touch 1/a 2/b 3/c 4/d 5/e 6/f 6/g

then I run puppet.
It deletes all the touched files (a, b, c, d, e, f, g)

Now for The Problem:
When I run puppet again, I am expecting the empty directories ( 1/ 2/ 3/ 4/ 5/ 
6/ ) to get deleted.
They are not removed.  Even though the rmdirs parameter is set to true.

Is this the way tidy is supposed to work ?

“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 post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Hi, it works with code like in your paste. But check this out :
http://pastie.org/5037832, the original situation I found myself in,
and you can see the floating off behaviour again.



On Fri, Oct 12, 2012 at 3:30 AM, R.I.Pienaar r...@devco.net wrote:


 - Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 10:59:33 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors

 Hmm, thanks, I'll try upgrading the master to the same minor version
 and see if it works differently, would perhaps be surprising if it
 does.

 try my code with puppet apply like i showed? does it work?

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


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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread R.I.Pienaar


- Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 11:19:48 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors
 
 Hi, it works with code like in your paste. But check this out :
 http://pastie.org/5037832, the original situation I found myself in,
 and you can see the floating off behaviour again.
 

yes, our method does not constrain the left of the relationship
only the right - ie. classes before the wrapper class but at any
time before the wrapper class

if you then insert another class before the wrapper you dont have
a guarantee where in the graph it gets inserted.

In this specific case you could just swap the chain around putting
the classes after the wrapper

Class[wrapper] - Class[three] - Class[two] - Class[one] 

or whatever.

The difference between the two is:

for the anchor pattern as per Jeff:

before anchor classes after anchor

the simpler one:

classes wrapper as anchor

or

wrapper as anchor classes

its less strict and I prefer this because if you're overdoing
the require hints you're just really turning puppet into a bash
script

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Thanks for illustrating the difference in the approaches which govern
the placement of a class in the catalog graph. And indeed, it was only
my unassuming intuition about chaining (and unawareness of #8040) that
led me to think of simplifying some of the the code to use class
chaining. Nevertheless will keep all the mentioned points  opinions
in mind, they've been helpful to understand this behaviour better.

On Fri, Oct 12, 2012 at 3:56 AM, R.I.Pienaar r...@devco.net wrote:


 - Original Message -
 From: Mohit Chawla mohit.chawla.bin...@gmail.com
 To: puppet-users@googlegroups.com
 Sent: Thursday, October 11, 2012 11:19:48 PM
 Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors

 Hi, it works with code like in your paste. But check this out :
 http://pastie.org/5037832, the original situation I found myself in,
 and you can see the floating off behaviour again.


 yes, our method does not constrain the left of the relationship
 only the right - ie. classes before the wrapper class but at any
 time before the wrapper class

 if you then insert another class before the wrapper you dont have
 a guarantee where in the graph it gets inserted.

 In this specific case you could just swap the chain around putting
 the classes after the wrapper

 Class[wrapper] - Class[three] - Class[two] - Class[one]

 or whatever.

 The difference between the two is:

 for the anchor pattern as per Jeff:

 before anchor classes after anchor

 the simpler one:

 classes wrapper as anchor

 or

 wrapper as anchor classes

 its less strict and I prefer this because if you're overdoing
 the require hints you're just really turning puppet into a bash
 script

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


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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Stefan Schulte
On Fri, Oct 12, 2012 at 03:49:48AM +0530, Mohit Chawla wrote:
 Hi, it works with code like in your paste. But check this out :
 http://pastie.org/5037832, the original situation I found myself in,
 and you can see the floating off behaviour again.
 

Because you are saying that Class[abc] should be done *before*
Class[wrapper] and Class[three,two,one] should also be done *before*
Class[wrapper]. That does not imply any relationship between Class[abc]
and Class[three,two,one].

The example that was mentioned earlier does only work when you specify
that Class[abc] depends on Class[wrapper] because then you define that
Class[one,two,three] should run *before* Class[wrapper] and Class[abc]
should run *after* Class[wrapper]. That does indeed imply a relationship
between Class[one,two,three] and Class[abc].

So to let your example work

class 'wrapper' {
  include one,two,three
  
  Class['wrapper']-Class['one']
  Class['wrapper']-Class['two']
  Class['wrapper']-Class['three']
}

class 'abc' {
}

class 'xyz' {
  include abc
  include wrapper
  Class['abc']-Class['wrapper']
}

-Stefan

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



[Puppet Users] Massive increase in compilation time?

2012-10-11 Thread Brian Rak
Today I upgraded Foreman on my Puppet master.  Doing so also upgraded some 
ruby libs, which seems to have killed the performance of my puppet master.

Before the upgrade, I was seeing compilation times of around 15s.  After 
the upgrade, it's 80-90s. 

What ruby modules or other configuration items would cause massive changes 
like this? I should note that none of my manifests changed during the 
upgrade.

I'm running 2.7.18 on the clients and master.

I'm not even sure where to start debugging this, any suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/MUGQEpvJUhMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Mohit Chawla
Ah ! Having come across this before in my resource dependencies with
normal types (just correlating with some of the modules), this makes
it even clearer, thanks.

On Fri, Oct 12, 2012 at 4:19 AM, Stefan Schulte
stefan.schu...@taunusstein.net wrote:
 On Fri, Oct 12, 2012 at 03:49:48AM +0530, Mohit Chawla wrote:
 Hi, it works with code like in your paste. But check this out :
 http://pastie.org/5037832, the original situation I found myself in,
 and you can see the floating off behaviour again.


 Because you are saying that Class[abc] should be done *before*
 Class[wrapper] and Class[three,two,one] should also be done *before*
 Class[wrapper]. That does not imply any relationship between Class[abc]
 and Class[three,two,one].

 The example that was mentioned earlier does only work when you specify
 that Class[abc] depends on Class[wrapper] because then you define that
 Class[one,two,three] should run *before* Class[wrapper] and Class[abc]
 should run *after* Class[wrapper]. That does indeed imply a relationship
 between Class[one,two,three] and Class[abc].

 So to let your example work

 class 'wrapper' {
   include one,two,three

   Class['wrapper']-Class['one']
   Class['wrapper']-Class['two']
   Class['wrapper']-Class['three']
 }

 class 'abc' {
 }

 class 'xyz' {
   include abc
   include wrapper
   Class['abc']-Class['wrapper']
 }

 -Stefan

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


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



Re: [Puppet Users] Automate adding new host to nagios server?

2012-10-11 Thread Peter Brown
On 12 October 2012 01:48, Bernd Adamowicz bernd.adamow...@esailors.de wrote:
 See:

 * http://docs.puppetlabs.com/guides/exported_resources.html  or
 * http://www.bernd-adamowicz.de/12/puppet-stored-configurations-and-icinga/

That's how I do it as well.
It's extremely amazing once you get it setup right.

On a side note I am intending to put my nagios modules on github
soonish so if you are willing to wait that may be an option for you.


 Cheers,
 Bernd

 -Original Message-
 From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On 
 Behalf Of Brent Clark
 Sent: Donnerstag, 11. Oktober 2012 17:03
 To: puppet-users@googlegroups.com
 Subject: [Puppet Users] Automate adding new host to nagios server?

 Good day

 I was wondering if someone could help me.

 Say I have three servers. One puppet master, one webserver, and one nagios 
 server.

 Is there a way to automate the process of adding the web server to the nagios 
 server for monitoring via a puppet.

 If someone could assists, or suggest a better means, it would be appreciated.

 Kind Regards
 Brent Clark

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

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


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



Re: [Puppet Users] Nagios

2012-10-11 Thread Peter Brown
How are you setting up the nagios resources?

On 12 October 2012 04:59, TFML mailingl...@theflux.net wrote:
 I've got a Nagios setup with puppet to add nodes/contacts/command running at
 one datacenter, I'm trying to setup a second Nagios server using the same
 manifests, but I'm getting this error:

 info: Retrieving plugin
 info: Loading facts in snmpd
 info: Loading facts in snmpd
 err: Could not retrieve catalog from remote server: Error 400 on SERVER:
 Exported resource Nagios_timeperiod[24x7] cannot override local resource on
 node nagios2.theflux.net
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run
 Time:
  Last run: 1349977873

 Can someone give me some direction on why this is happening?  Thanks!

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

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



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Jeff McCune
On Thu, Oct 11, 2012 at 3:26 PM, R.I.Pienaar r...@devco.net wrote:



 - Original Message -
  From: Mohit Chawla mohit.chawla.bin...@gmail.com
  To: puppet-users@googlegroups.com
  Sent: Thursday, October 11, 2012 11:19:48 PM
  Subject: Re: [Puppet Users] Re: Wrapper classes, ordering  anchors
 
  Hi, it works with code like in your paste. But check this out :
  http://pastie.org/5037832, the original situation I found myself in,
  and you can see the floating off behaviour again.
 

 yes, our method does not constrain the left of the relationship
 only the right - ie. classes before the wrapper class but at any
 time before the wrapper class

 if you then insert another class before the wrapper you dont have
 a guarantee where in the graph it gets inserted.

 In this specific case you could just swap the chain around putting
 the classes after the wrapper

 Class[wrapper] - Class[three] - Class[two] - Class[one]

 or whatever.

 The difference between the two is:

 for the anchor pattern as per Jeff:

 before anchor classes after anchor

 the simpler one:

 classes wrapper as anchor

 or

 wrapper as anchor classes

 its less strict and I prefer this because if you're overdoing
 the require hints you're just really turning puppet into a bash
 script


Yeah, but sometimes the need to manage both sides of the wrapper class is
un-avoidable.  I often find this to be the case when I'm dealing with
interpreter packages like java, ruby, perl, python, etc...  The classes
that setup the packaging repositories need to happen before the class
managing the ruby / java / python / go / whatever interpreter... and the
classes that actually manage your application need to come after the class
that manages the interpreter.

So the interpreters are what is modeled in the wrapper class in this
discussion.

This pattern is necessary in other situations too; web servers that host
applications for example.  Basically, I think to myself, I may need to
anchor down this class... if the thing the class is modeling sits between
the infrastructure layer and the application layer.

So, not quite as common as a bash script, but not so uncommon that you
never need to use it.

Again, the fact that it's necessary at all is definitely a bug in Puppet.
 We just haven't fixed it yet, but not for lack of people trying.  =(

-Jeff

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



[Puppet Users] Selectively sharing stored configuration among puppet masters?

2012-10-11 Thread Amos Shapira
Hello,

We've just split off using another groups' puppet master and started using 
our own master.

One thing this limits us with is that we want them to start backing up a 
couple of our servers using their Bacula server.
Their Bacula server is configured using Stored Configuration from their 
puppet master, but now that our systems configure from our puppet master, 
their configuration isn't known to their bacula server.

The only way I can think of to achieve that without requiring a change in 
Puppet is to configure our puppet master to use the other teams' stored 
config db:
Pros: no extra work
Cons: depends on them agreeing to that (they don't). Means that we share 
all our stored config with them and vice verse.

Otherwise, how about one of the following new features:
   
   1. Allow a puppet master to define multiple stored config db's and let 
   resources specify which of the db's they need to be pushed to.
   2. Allow a puppet virtual resource to specify to be read multiple stored 
   config db's.

Is there another option?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/wv1253gDk8wJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: performance of source vs template vs file

2012-10-11 Thread Eric Sorenson
I think all that is right John--one subtlety that led me to use 
content=template everywhere instead of mixing it with content=file for 
things which didn't need erb interpolation is that the argument to 
template() uses module-like syntax and file() needs a full filesystem path, 
so it doesn't work very well with environments that have different root 
paths.

(this is https://projects.puppetlabs.com/issues/5158)

-=Eric

On Thursday, October 11, 2012 6:39:30 AM UTC-7, jcbollinger wrote:



 On Tuesday, October 9, 2012 9:45:42 AM UTC-5, Mihai Stan wrote:

 Hello everyone,

 I'm currently looking into using puppet to manage my homedir .dot files, 
 including .vim/ folder with a bunch of plugins totaling a few tens of files 
 (almost 100), in order to have a pleasant and productive working experience 
 on our organization's 500+ machines.

 While this looks like a cool thing to do, I can't help but wonder how 
 will this affect puppet's performance both on the masters' and agents' 
 sides and how good puppet is at distributing lots of infrequently updated 
 files.

 My common sense tells me that from a performance point of view, I could 
 use the following methods, first in the list being the most recommended:

 file {
 content = file('file'),
 }

 file {
   source = puppet:///modules/...,
 }

 file {
   content = template('template.erb'),
 }


 Personally, I'd go with using file() function for distributing static 
 files and source = puppet:/// to manage directories recursively, which 
 would simplify the setup part a lot.


 Does anyone have a more in-depth insight into the performance of all 
 these methods ? Or, for that matter, why I shouldn't be doing the above as 
 it blows puppet performance in ways I can't comprehend ?


 I would expect a bigger difference between using 'content' and using 
 'source' than between specifying the content via file() and specifying it 
 via template().  When you use 'content', the body of the target file is 
 included in the catalog, whereas when you use 'source', the agent will 
 request file content from the Puppet file server if it needs it.

 For ~100 small files (= 1 KB on average, say), my gut tells me that 
 'content' will win at least when there are more than a couple of changes, 
 and that it will not lose too badly when there are few or none.

 Certainly you should not use template() for completely static files, but 
 when you do need it, you need it.

 Managing directories recursively is a potential problem, but it really 
 comes down more to the total number and combined size of the files you are 
 managing.  Each file and directory adds memory and processing cost on both 
 ends, and, separately, Puppet expends computing effort proportional to the 
 total content size to compute hashes of file contents.

 My expectation would be that for dotfiles, you will see acceptable 
 performance any way around.  Nevertheless, as with any performance 
 question, the only way to get a reliable answer is to test it.


 John



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/cL9ngDH2YEgJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] One client out of 150 doesn't apply config changes

2012-10-11 Thread thinkwell
Hello everyone,

I have one puppet client that suddenly stopped applying configuration 
changes during the. I'm running with -v to see errors - no errors are shown 
and the puppet run completes with:

info: Caching catalog for system name
info: Applying configuration version '1349982313'
notice: Finished catalog run in 49.28 seconds

However, the changes required aren't made. This only happens on one client 
out of 150+ so it seems to be a client error. Is there some puppet cache 
that I need to clear?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/tIPYTLDRp68J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Wrapper classes, ordering anchors

2012-10-11 Thread Nick Fagerlund
Also, for sake of concision, I should point out that chaining arrows can 
accept both resource declarations and multi-resource references 
(https://docs.puppetlabs.com/puppet/3/reference/lang_relationships.html#operands),
 
which gives you the option of a one-liner workaround:

class wrapper { 
  include foo 
  include bar 
  include baz 
  anchor {'wrapper_start':} - Class['foo', 'bar', 'baz'] - anchor 
{'wrapper_end':}
} 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/EPMZsg4Uh2YJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Getting the catalog even if the puppet fails

2012-10-11 Thread Abhijeet R

Hi,

I have a situation where loading of facts  caching for catalog is done.
After that, the puppet fails with an error.

1.
   info: Caching catalog for my.domain.com
2.
   No title provided and Nagios3::Host[] is not a valid resource
   reference

Now, the thing is, in my /var/lib/puppet/client_yaml/catalog, the yaml 
file is old. May be, puppet updates it only after there is a successful 
run. If I could have a look at the catalog, may be I could debug this.


Is there a place where this catalog is created temporarily or is it 
in-memory? Is there any to way to get the catalog?


The puppet version being used is: 2.6.13.

--
Regards,
Abhijeet
http://blog.abhijeetr.com

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