[Puppet Users] r10k and git sparse checkouts

2014-10-21 Thread Diego Morales
Hello, 

Does r10k supports git sparse checkouts somehow?

Some context: I have different repos for different customers, like 
puppet-site-customer1, puppet-site-customer2, etc. Each of these master 
sites  has a R10K Puppetfile that grabs a set of shared modules (my own 
and external) for that customer. Right now each shared module is a 
different git repo. 

I would much prefer to have all the shared modules of my own in the same 
repo, but I want to pick the versions of those modules independently of 
each other when updating one of those master sites. Git sparse checkouts 
could be the way to go, I figure.

(Say I'm doing a fix in a customer repo and I need to update to the latest 
version of my shared puppet-ldap module. I don't want to update the 
versions of my other shared modules right now, just the ldap one.)

Thanks in advance,


Diego Morales

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/daf0ea4a-072c-4a9a-9c79-7e31c55c40ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] file_line - Remove a piece of string

2014-10-21 Thread Lobo Junior
I want remove a piece of string of a file on using file_line?

Example

file_line { 'try-replace':
  path = '/tmp/eureka.txt',
  line = 'com.PersistenceSchemeRedis(not_used,localhost:1982:false)',
  match   = com.hp.clasp.internal.PersistenceSchemeRedis.*$,
  ensure  = absent,
}

But this code doesn't works.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6c978195-fa2b-48b1-9606-4faaf194248b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet-common 2.7.26 depends facter ( 2.0)

2014-10-21 Thread Brian Witt
I noticed today that the puppet-common 2.7.26 deb package for Ubuntu 
precise at

https://apt.puppetlabs.com/pool/precise/main/p/puppet/puppet-common_2.7.26-1puppetlabs1_all.deb

depends facter ( 2.0) even though the facter page
https://docs.puppetlabs.com/facter/
says

The currently supported Facter versions are 2.x and 1.7. Both versions 
work with Puppet 3.x and 2.7.

I've manually installed facter 2.2.0 (via dpkg) and it seems to work fine 
with puppet 2.7.26, so I'm confused by the dependency. Why is that there?

Thanks,
Brian





-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b22de0a2-26f8-44a4-ab36-a1d1486fa44f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Packages via puppet

2014-10-21 Thread AAB !!
Hi,
Many packages have many questions during installation, how can I answer 
those when installing them via puppet ?
apt-get install xyz has many question about the package I am installing, 
how would I do it via puppet ?


Regards

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f045886e-74f9-4ca5-bb18-e68a8e0b3913%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Packages via puppet

2014-10-21 Thread Martin Alfke
The package provider has a response file attribute.

puppet describe package:

- **responsefile**
A file containing any necessary answers to questions asked by
the package.  This is currently used on Solaris and Debian.  The
value will be validated according to system rules, but it should
generally be a fully qualified path.

hth,

Martin


On 21 Oct 2014, at 12:39, AAB !! adeelarifbha...@gmail.com wrote:

 Hi,
 Many packages have many questions during installation, how can I answer those 
 when installing them via puppet ?
 apt-get install xyz has many question about the package I am installing, how 
 would I do it via puppet ?
 
 
 Regards
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/f045886e-74f9-4ca5-bb18-e68a8e0b3913%40googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/DDBB4E78-3C1E-4C4C-8272-74D50190BC9C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: resource file with option source or content depending if source does exist

2014-10-21 Thread Andreas Dvorak
Hi,

thank you, the line 
content = $a ? { '' = template($template), default = $a }
solves my problem.

Best regards,
Andreas

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c7bf05f6-f0e9-4d3e-8e5c-83254a7ceccb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Packages via puppet

2014-10-21 Thread AAB !!
Thanks for you answer, could you give me example ? What will be its syntax ?


On Tuesday, October 21, 2014 12:47:45 PM UTC+2, Martin Alfke wrote:

 The package provider has a response file attribute. 

 puppet describe package: 

 - **responsefile** 
 A file containing any necessary answers to questions asked by 
 the package.  This is currently used on Solaris and Debian.  The 
 value will be validated according to system rules, but it should 
 generally be a fully qualified path. 

 hth, 

 Martin 


 On 21 Oct 2014, at 12:39, AAB !! adeelar...@gmail.com javascript: 
 wrote: 

  Hi, 
  Many packages have many questions during installation, how can I answer 
 those when installing them via puppet ? 
  apt-get install xyz has many question about the package I am installing, 
 how would I do it via puppet ? 
  
  
  Regards 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups Puppet Users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an email to puppet-users...@googlegroups.com javascript:. 
  To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/f045886e-74f9-4ca5-bb18-e68a8e0b3913%40googlegroups.com.
  

  For more options, visit https://groups.google.com/d/optout. 



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/a77721e7-e21c-439f-8ad2-c21cf18e97a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Packages via puppet

2014-10-21 Thread Werner Flamme
AAB !! [21.10.2014 13:07]:
 Thanks for you answer, could you give me example ? What will be its syntax ?

I do not use Debian, but using a search engine with puppet debian
responsefile lead me straight to
http://projects.puppetlabs.com/projects/1/wiki/Debian_Preseed_Patterns.

HTH, Werner

-- 



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [Puppet Users] Re: Hash of hashes to file template

2014-10-21 Thread Felix Frank
On 10/07/2014 03:21 PM, jcbollinger wrote:
 Can it be a Ruby version thing?
 
 
 
 Yes.  Hash.each_pair() is new in Ruby 1.9.

Uhm, no :-) That would have been bad news for my master.

http://www.ruby-doc.org/core-1.8.7/Hash.html#method-i-each_pair

Also, Hash.each should be functionally equivalent.

http://www.ruby-doc.org/core-1.8.7/Hash.html#method-i-each

Something weird is indeed going on there.

Cheers,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/54464964.7040608%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Can I close Puppet SSL function?

2014-10-21 Thread jcbollinger


On Monday, October 20, 2014 8:12:30 PM UTC-5, Richard wrote:

 thanks, i want to use the ip address as the hostname in kick command,like 
 kick -p 10 --host 192.168.1.101, but this ssl verify failed. the ip of 
 every computer probable be changed at any time , so i can't use the ip as 
 the cert name.



This objective has nothing to do with what you asked, then.  Kick requests 
are separate from catalog requests already.

Have you configured your nodes as described in the documentation 
https://docs.puppetlabs.com/references/3.6.1/man/kick.html#USAGE-NOTES?  
In particular, have you configured the node's auth.conf as described?

Perhaps you have, because it sounds like its the master that is complaining 
about authentication.  If that's the case -- though I don't know why it 
should be if the node permits unauthenticated kicks -- then you are 
probably out of luck.

Generically speaking, the SSL verification is trying to check that the 
certificate received belongs to the machine to which you thought you were 
connecting, by matching a known machine identifier to one of the names 
recorded in its certificate.  If the only machine identifier you have is a 
transient one, then such verification cannot work.

Perhaps you do have a persistent ID you could use, though.  For example, 
you could use MAC address for your certnames.  Supposing that you have a 
mapping between MAC addresses and IP numbers (e.g. from your DHCP server), 
then I suspect you could patch something together.  Not so easily though -- 
the kinds of things I have in mind probably would require writing a custom 
name service plugin for use on the master.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0ea92371-4758-4922-b75b-4a2fe4e3fa45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: One puppet run divided to two puppet runs

2014-10-21 Thread jcbollinger


On Monday, October 20, 2014 8:46:42 AM UTC-5, artur.da...@ammeon.com wrote:

 The issue that i don't fully understand is why the puppet run seems to 
 finish:

 Oct  8 19:58:07 node2 puppet-agent[18912]: 
 (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper4/Package[EXTR-lsbwrapper4]/ensure)
  
 ensure changed '1.0.0-1' to '2.0.0-1'
 Oct  8 19:58:12 node2 puppet-agent[18912]: 
 (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper8/Package[EXTR-lsbwrapper8]/ensure)
  
 ensure changed '1.0.0-1' to '0:3.0.0-1'
 Oct  8 19:58:15 node2 puppet-agent[18912]: 
 (/File[/etc/mcollective/facts.yaml]/content) content changed 
 '{md5}cf91bdba62cbaa5149af42b81febbbf4' to 
 '{md5}994da216388be7020bade56907c701ed'
 Oct  8 19:58:19 node2 puppet-agent[18912]: (/File[maincf]/seltype) seltype 
 changed 'etc_runtime_t' to 'etc_t'
 Oct  8 19:58:22 node2 puppet-agent[18912]: Finished catalog run in 47.16 
 seconds

 Yet after that the puppet seems to continue where it left off:

 Oct  8 19:58:57 node2 puppet-agent[20580]: 
 (/Stage[main]/Task_node2__package___45_58_54_52_2dlsbwrapper28/Package[EXTR-lsbwrapper28]/ensure)
  
 ensure changed '1.0.0-1' to '0:2.0.0-1'



[...]

Note that the PID of the puppet-agent process changes, and that there is a 
35-second gap in the log.  I conclude that the agent was restarted in the 
gap, but the relevant log output was edited out, up to and including that 
describing a new catalog request being issued.  This is what I was 
referring to earlier when I complained about preferring log output that 
has not had relevant information edited out.  Likely the restart was 
mediated by Puppet itself, as I described above.

 

 Oct  8 19:58:58 node2 puppet-agent[20580]: 
 (/File[/etc/mcollective/facts.yaml]/content) content changed 
 '{md5}994da216388be7020bade56907c701ed' to 
 '{md5}d8c1cb23e367c830bc34a564d49e8353'
 Oct  8 19:59:03 node2 puppet-agent[20580]: (/File[maincf]/seltype) seltype 
 changed 'etc_runtime_t' to 'etc_t'
 Oct  8 19:59:05 node2 puppet-agent[20580]: Finished catalog run in 16.30 
 seconds

 Not sure about this but my understanding is that a catalog run should be 
 sequential if there is a global lock in place?



What about that makes you think there were concurrent catalog runs?  I see 
a bunch of log entries from one process, followed by a bunch of log entries 
from a different process.  How is that anything but sequential?


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/568634e4-5086-4c4d-8659-a8fbe46409b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: very basic beginner problem

2014-10-21 Thread jcbollinger


On Monday, October 20, 2014 7:02:36 PM UTC-5, 
gau...@indoaustinvestments.com wrote:


 So are you saying that running puppet apply site.pp shouldn't propagate 
 changes to the agents?


Yes, that is exactly what I am saying.  The puppet apply command causes a 
catalog to be compiled *by* the machine on which it runs, *for* the machine 
on which it runs, and applies it *to* (only) the machine on which it runs.

To configure a different machine based on the manifests and data on your 
master, you run puppet agent on the machine you want to configure.  The 
master can manage itself that way, too.  The agent runs in daemon mode by 
default, periodically requesting a fresh catalog from the master and 
applying it.  The agent can also run in one-time mode, which some people 
leverage to launch it via an external scheduler such as cron.

If it runs as a daemon, the agent can be configured to listen for messages 
(kicks) from the master, and to respond to them by initiating a catalog 
run.  It seems more in vogue, however, to use an external remote-control 
framework if you want to do that.  In particular, mcollective is typically 
suggested for that purpose.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c865e7c6-4257-4e8b-8dfc-855f16dff82c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How can Puppet query from Sybase - Facter or Hiera?

2014-10-21 Thread Stella
Hi Johan,

Thank you very much for the  information. 

I am not using the machine information from Sybase to do node 
classification in puppet.  My node classification is done by Puppet 
Dashboard. 

My Sybase database doesn't contain any puppet class information. It 
contains the hostname and the workgroup the host belongs to.  What I want 
to return from my database query is: given a hostname, please tell me which 
workgroup it belongs to, then based on the workgroup value, my puppet class 
will decide which template to apply to this host. 

That's why I think a custom fact might do this job: I will define a custom 
fact, which will get hostname and then connect to Sybase to determine this 
host's workgroup. I actually already have the perl script to do this job, 
but need to convert it to Ruby scirpt (puppet fact is defined in Ruby). 

I am still doing research to find out what is the best approach. Will let 
you know. 

Thanks,
Stella

On Monday, October 20, 2014 5:36:50 PM UTC-4, Johan De Wit wrote:

  Hi Stella, 

 my first thought goes to implement a ENC script. Since you are already 
 keeping inventory data in a database, you could keep everything in one 
 place.  If it is possible to add puppet support, in practice, make it 
 possible to assign puppet classes to your nodes in your sybase setup.

 If that is not possible, I would look at a hiera backend getting the info 
 from your sybase database.

 Keep in mind that it is the puppet master that needs the info from your 
 sybase database, so facts is not really an option.  

 (technically you can, but then every node needs access to your database, 
 but your master can get the needed info also, only keep in mind your master 
 identifies the nodes with the 'clientcert' or 'certname'. 

 Personally, I would go for the ENC first place, hiera in second, but facts 
 is a no-go. 

 hth a bit

 jo   



 On 20/10/14 19:27, Stella wrote:
  
 Hi,

 I am using Puppet 3.62. Trying to figure out what is the best way to 
 connect to my sybase database to query machine information.

 Which is better: 

 1. Define facts that will connect to my sybase and do the query.

 2. Use Hiera to connect to my sybase and do the query.

 Anyone has any example to share? 

 Thanks!

 Stella
  -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to puppet-users...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/69fa9702-708a-442c-803c-1b3bead7ab2f%40googlegroups.com
  
 https://groups.google.com/d/msgid/puppet-users/69fa9702-708a-442c-803c-1b3bead7ab2f%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.



 -- 
 Johan De Wit

 Open Source Consultant

 Red Hat Certified Engineer  (805008667232363)
 Puppet Certified Professional 2013/2014 (PCP006)
 _
  
 Open-Future Phone +32 (0)2/255 70 70
 Zavelstraat 72  Fax   +32 (0)2/255 70 71
 3071 KORTENBERG Mobile+32 (0)474/42 40 73
 BELGIUM http://www.open-future.be
 _
  


 Upcoming Events:

 Puppet Introduction Course | 
 http://www.open-future.be/puppet-introduction-course-13th-october

 Puppet Practitioner Training | 
 http://www.open-future.be/puppet-practitioner-former-puppet-advanced-training-14-till-16th-october

 Linux Training | 
 http://www.open-future.be/linux-training-20-till-24th-october

 Puppet Introduction Course | 
 http://www.open-future.be/puppet-introduction-course-10th-november

 Puppet Fundamentals Training | 
 http://www.open-future.be/puppet-fundamentals-training-12-till-14th-november

 Subscribe to our newsletter: http://eepurl.com/BUG8H
  
  

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/90b2a777-424d-49ec-a236-ab8dcd85d41e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facter via cron hanging on RHEL5

2014-10-21 Thread Paul Seymour


On Monday, 20 October 2014 17:20:23 UTC+1, Wil Cooley wrote:


 On Oct 20, 2014 1:41 AM, Paul Seymour paul.s...@ig.com javascript: 
 wrote:
 
  This didn’t happen with 1.6.x which was our previous version.And I 
 cannot find a RHEL6 host with this issue. So I suspect Ruby here. Any ideas 
 anyone ?

 Run `strace` on the hung process to try to see what it's doing?

 Wil


Thanks. It's a little tricky to do as it always comes back with a wait4 
call if attaching to the hung process. Will try and capture it.

But looking at the open files it's always trying to read the size of block 
devices from /sys

Cheers
Paul

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d5e177ad-4872-445e-8976-cacfffc370d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How can Puppet query from Sybase - Facter or Hiera?

2014-10-21 Thread Christopher Webber
Assuming the libraries to connect to sybase from ruby exist… you could just 
write a custom function. 
https://docs.puppetlabs.com/guides/custom_functions.html 
https://docs.puppetlabs.com/guides/custom_functions.html

so basically you want to do something like:


$workgroup = sybase_workgroup($::hostname)

case $workgroup {

‘A’: {
$template = template(‘modulename/A/template.erb’)
}
‘B’: {
$template = template(‘modulename/B/template.erb’)
}
default: {
$template = template(‘modulename/default/template.erb’)
}
}

And then the custom function would do something like
 
require ‘an_sybase_library’

module Puppet::Parser::Functions

newfunction(:sybase_workstation) do |args|
db = sybase_db_connection
result = db.query(“SELECT workgroup FROM workgroups WHERE 
hostname = ‘#{args[0]}’”)
result[‘workgroup’]
end
end


Totally full of pseudo code, but that hopefully makes sense.

— cwebber

 On Oct 21, 2014, at 7:20 AM, Stella stellatian1...@gmail.com wrote:
 
 Hi Johan,
 
 Thank you very much for the  information. 
 
 I am not using the machine information from Sybase to do node classification 
 in puppet.  My node classification is done by Puppet Dashboard. 
 
 My Sybase database doesn't contain any puppet class information. It contains 
 the hostname and the workgroup the host belongs to.  What I want to return 
 from my database query is: given a hostname, please tell me which workgroup 
 it belongs to, then based on the workgroup value, my puppet class will decide 
 which template to apply to this host. 
 
 That's why I think a custom fact might do this job: I will define a custom 
 fact, which will get hostname and then connect to Sybase to determine this 
 host's workgroup. I actually already have the perl script to do this job, but 
 need to convert it to Ruby scirpt (puppet fact is defined in Ruby). 
 
 I am still doing research to find out what is the best approach. Will let you 
 know. 
 
 Thanks,
 Stella
 
 On Monday, October 20, 2014 5:36:50 PM UTC-4, Johan De Wit wrote:
 Hi Stella, 
 
 my first thought goes to implement a ENC script. Since you are already 
 keeping inventory data in a database, you could keep everything in one place. 
  If it is possible to add puppet support, in practice, make it possible to 
 assign puppet classes to your nodes in your sybase setup.
 
 If that is not possible, I would look at a hiera backend getting the info 
 from your sybase database.
 
 Keep in mind that it is the puppet master that needs the info from your 
 sybase database, so facts is not really an option.  
 
 (technically you can, but then every node needs access to your database, but 
 your master can get the needed info also, only keep in mind your master 
 identifies the nodes with the 'clientcert' or 'certname'. 
 
 Personally, I would go for the ENC first place, hiera in second, but facts is 
 a no-go. 
 
 hth a bit
 
 jo   
 
 
 
 On 20/10/14 19:27, Stella wrote:
 Hi,
 
 I am using Puppet 3.62. Trying to figure out what is the best way to connect 
 to my sybase database to query machine information.
 
 Which is better: 
 
 1. Define facts that will connect to my sybase and do the query.
 
 2. Use Hiera to connect to my sybase and do the query.
 
 Anyone has any example to share? 
 
 Thanks!
 
 Stella
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to puppet-users...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/69fa9702-708a-442c-803c-1b3bead7ab2f%40googlegroups.com
  
 https://groups.google.com/d/msgid/puppet-users/69fa9702-708a-442c-803c-1b3bead7ab2f%40googlegroups.com?utm_medium=emailutm_source=footer.
 For more options, visit https://groups.google.com/d/optout 
 https://groups.google.com/d/optout.
 
 
 -- 
 Johan De Wit
 
 Open Source Consultant
 
 Red Hat Certified Engineer  (805008667232363)
 Puppet Certified Professional 2013/2014 (PCP006)
 _
  
 Open-Future Phone +32 (0)2/255 70 70
 Zavelstraat 72  Fax   +32 (0)2/255 70 71
 3071 KORTENBERG Mobile+32 (0)474/42 40 73
 BELGIUM http://www.open-future.be 
 http://www.open-future.be/
 _
  
 
 Upcoming Events:
 
 Puppet Introduction Course | 
 http://www.open-future.be/puppet-introduction-course-13th-october 
 http://www.open-future.be/puppet-introduction-course-13th-october
 Puppet Practitioner Training | 
 http://www.open-future.be/puppet-practitioner-former-puppet-advanced-training-14-till-16th-october
  
 

[Puppet Users] It's possible create fact search messages error

2014-10-21 Thread New
Hello
I need create fact that check the messages log and find any error with 
every execution of puppet. 
The objective is check if any error appear in any execution of puppet and 
return the name of the class fail.
Thanks!!!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d6a14d46-ea5c-4586-ba46-62ee734cb521%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How can Puppet query from Sybase - Facter or Hiera?

2014-10-21 Thread Stella
Hi cwebber,

Thank you for the detail example!

I finally figured out how to do this. Very simple.

https://docs.puppetlabs.com/facter/2.0/custom_facts.html#external-facts 
With recent versions of facter, you can create external facts using any 
executable format, or even simple yaml or text files, placed in: 
MODULEPATH/MODULE/facts.d/. or in */etc/facter/facts.d/* 
External facts provide a way to use arbitrary executables or scripts as 
facts, or set facts statically with structured data. If you’ve ever wanted 
to write a custom fact in Perl, C, or a one-line text file, this is how.

So what I did is just to place my existing perl script which will connect 
to my sybase and query into the facts.d folder. Modify it a little bit to 
return key/value pairs: 

key1=value1
key2=value2
key3=value3

Then I can use key1, key2 and key3 as global facts (variables).

Thanks! 





On Tuesday, October 21, 2014 12:11:21 PM UTC-4, cwebber wrote:

 Assuming the libraries to connect to sybase from ruby exist… you could 
 just write a custom function. 
 https://docs.puppetlabs.com/guides/custom_functions.html

 so basically you want to do something like:

 
 $workgroup = sybase_workgroup($::hostname)

 case $workgroup {

 ‘A’: {
 $template = template(‘modulename/A/template.erb’)
 }
 ‘B’: {
 $template = template(‘modulename/B/template.erb’)
 }
 default: {
 $template = template(‘modulename/default/template.erb’)
 }
 }

 And then the custom function would do something like
  
 require ‘an_sybase_library’

 module Puppet::Parser::Functions

   newfunction(:sybase_workstation) do |args|
 db = sybase_db_connection
 result = db.query(“SELECT workgroup FROM workgroups WHERE hostname = 
 ‘#{args[0]}’”)
 result[‘workgroup’]
 end
 end
 
 Totally full of pseudo code, but that hopefully makes sense.

 — cwebber

 On Oct 21, 2014, at 7:20 AM, Stella stellat...@gmail.com javascript: 
 wrote:

 Hi Johan,

 Thank you very much for the  information. 

 I am not using the machine information from Sybase to do node 
 classification in puppet.  My node classification is done by Puppet 
 Dashboard. 

 My Sybase database doesn't contain any puppet class information. It 
 contains the hostname and the workgroup the host belongs to.  What I want 
 to return from my database query is: given a hostname, please tell me which 
 workgroup it belongs to, then based on the workgroup value, my puppet class 
 will decide which template to apply to this host. 

 That's why I think a custom fact might do this job: I will define a custom 
 fact, which will get hostname and then connect to Sybase to determine this 
 host's workgroup. I actually already have the perl script to do this job, 
 but need to convert it to Ruby scirpt (puppet fact is defined in Ruby). 

 I am still doing research to find out what is the best approach. Will let 
 you know. 

 Thanks,
 Stella

 On Monday, October 20, 2014 5:36:50 PM UTC-4, Johan De Wit wrote:

  Hi Stella, 

 my first thought goes to implement a ENC script. Since you are already 
 keeping inventory data in a database, you could keep everything in one 
 place.  If it is possible to add puppet support, in practice, make it 
 possible to assign puppet classes to your nodes in your sybase setup.

 If that is not possible, I would look at a hiera backend getting the info 
 from your sybase database.

 Keep in mind that it is the puppet master that needs the info from your 
 sybase database, so facts is not really an option.  

 (technically you can, but then every node needs access to your database, 
 but your master can get the needed info also, only keep in mind your master 
 identifies the nodes with the 'clientcert' or 'certname'. 

 Personally, I would go for the ENC first place, hiera in second, but 
 facts is a no-go. 

 hth a bit

 jo   



 On 20/10/14 19:27, Stella wrote:
  
 Hi,

 I am using Puppet 3.62. Trying to figure out what is the best way to 
 connect to my sybase database to query machine information.

 Which is better: 

 1. Define facts that will connect to my sybase and do the query.

 2. Use Hiera to connect to my sybase and do the query.

 Anyone has any example to share? 

 Thanks!

 Stella
  -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to puppet-users...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/69fa9702-708a-442c-803c-1b3bead7ab2f%40googlegroups.com
  
 https://groups.google.com/d/msgid/puppet-users/69fa9702-708a-442c-803c-1b3bead7ab2f%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.



 -- 
 Johan De Wit

 Open Source Consultant

 Red Hat Certified Engineer  (805008667232363)
 Puppet Certified Professional 2013/2014 (PCP006)
 _
  
 

[Puppet Users] Parallel deploy apps on the same node

2014-10-21 Thread sych
Hello!

I want to parallel deploy apps on the same node from the puppet. How to do 
it?

Thanks in advance,
Gena

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0df1b1a1-b5a6-4e20-9a9a-d57b7275163e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: Puppet Server 0.3.0 available!

2014-10-21 Thread Eric Sorenson

This is the first feature update since the initial Puppet Server release.
Notable user-facing improvements are:
 
 * (SERVER-18, SERVER-39) Puppet Server now supports externally-terminated SSL
   in the same way as external termination on Apache+Passenger does.
 * (SERVER-4) Improve error messages and user feedback when starting on systems
   with low memory. (We recommend at least 2GB RAM)
 * (SERVER-43) Add support for HTTP basic authentication; this was preventing
   the 'http' report processor used by Dashboard from working.
 
For a full list of bugs fixed in the release, check out this JIRA page:
https://tickets.puppetlabs.com/browse/SERVER/fixforversion/11955
 
Community shout-out for this release goes to Sean Millichamp for his
detailed feedback on SERVER-18; this really helped get the use-cases nailed
down.
 
To install the Puppet Server, first configure your system to use the Puppetlabs
Repositories using this guide:
https://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html
Then use your package manager to install the 'puppetserver' package.

Eric Sorenson - eric.soren...@puppetlabs.com - freenode #puppet: eric0
puppet platform // coffee // techno // bicycles

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/916E02D6-1BAA-4A2A-9881-B0BF562A2BFC%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Fwd: Announce: Puppet Strings 0.1.1 Released

2014-10-21 Thread Hailee Kenney
We’re happy to announce the latest release of the strings module. Strings
0.1.1 is a backward-compatible bugfix release. It mainly includes changes
to documentation, but fixes one pretty major bug those of you using the
future parser would have encountered (PDOC-14).

 *The module can be found on the Forge here:
https://forge.puppetlabs.com/puppetlabs/strings

 *Installation and usage instructions can be found here:
https://github.com/puppetlabs/puppetlabs-strings/blob/master/README.md

To track issues related to this release or file new issues, head over to
the PDOC JIRA Project:

 * JIRA Project: https://tickets.puppetlabs.com/browse/PDOC

 * 0.1.1 Tickets:
https://tickets.puppetlabs.com/browse/PDOC/fixforversion/12010

In addition to asking people to try out the latest release, we’d also like
to solicit some feedback from those of you who have been experimenting with
the strings module. We’re now at a place where we need to decide where to
take the module next, but before we decide that we’d like to hear what the
community thinks.

The first big question we want to ask is if YARD is the right approach.
There was some discussion on the original thread about using Rocco or Docco
instead. How do you feel about the format YARD outputs the documentation
in? Is it what you’re looking for? Or would something more like Docco be
preferable?

Beyond that, where would you like to see us take strings next? Obviously
there are a lot of things not covered by the module as is, such as types
and providers, settings, etc. What’s the most important thing to cover next?

Answers to those questions and any other feedback would be awesome.

Thanks!
-- 
Hailee Kenney
hai...@puppetlabs.com
Associate Software Developer, Puppet Labs

*Join us at **PuppetConf 2015, October 5-9 in Portland, OR - *
http://2015.puppetconf.com.
*Register early to save 40%!*

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CALdYGa-CkpaY4vZzFU0Sm20FuzEF_nUkSWnHpxqN%3Dp2nSoKpfw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] PuppetDB 2.2.2 is now available

2014-10-21 Thread Ryan Senior
PuppetDB 2.2.2 - October 21, 2014

PuppetDB 2.2.2 Downloads


Available in native package format in the release repositories at:
http://yum.puppetlabs.com and http://apt.puppetlabs.com

For information on how to enable the Puppet Labs repos, see:
http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html#open-source-repositories

Binary tarball: http://downloads.puppetlabs.com/puppetdb/

Source: http://github.com/puppetlabs/puppetdb

Please report feedback via the Puppet Labs tickets site, using an affected
PuppetDB version of 2.2.2:
https://tickets.puppetlabs.com/browse/PDB

Documentation: http://docs.puppetlabs.com/puppetdb/2.2/

Puppet module:
http://forge.puppetlabs.com/puppetlabs/puppetdb

Release notes: https://docs.puppetlabs.com/puppetdb/2.2/release_notes.html

PuppetDB 2.2.2 Release Notes


This is a backwards-compatible bugfix release that changes the default SSL
protocols so that it is not vulnerable to the POODLE SSL exploit. For more
information on POODLE and Puppet Labs software, see
http://puppetlabs.com/blog/impact-assessment-sslv3-vulnerability-poodle-attack.
For more information and upgrade advice on the 2.2.2 release, consult the
detailed release notes here:

https://docs.puppetlabs.com/puppetdb/2.2/release_notes.html

Contributors


Ken Barber, Ryan Senior and Wyatt Alt

Changelog
-

Ken Barber (4):
  2f9d47c Add Centos 7 acceptance tests
  2c7019f (PDB-952) Include packaging detection for centos 7
  469730e Upgrade distros to ensure all packages are the latest
  336748e (PDB-964) Switch to using curl --tlsv1 everywhere

Ryan Senior (3):
  83ff4b0 Our code currently requires Puppet 3.5.1 or higher by using
Puppet.lookup(), the Rakefile is correct but Gemfile needs to reflect this
  51856db (PDB-962) Remove SSLv3 as a default from Jetty config
  3d61fbd Updated docs to include --tlsv1 in all https curl examples

wkalt (1):
  c879fcf update release notes for 2.2.2

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGDMwd0Y-yFhJ5%2BhssfZS_DORO4N1tafTibULZ92W7SW1C7GKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facter via cron hanging on RHEL5

2014-10-21 Thread Wil Cooley
On Oct 21, 2014 8:41 AM, Paul Seymour paul.seym...@ig.com wrote:

 Thanks. It's a little tricky to do as it always comes back with a wait4
call if attaching to the hung process. Will try and capture it.

`wait4` would indicate it's waiting for a child process; I would try to
figure out what the child is doing by having strace run with -f to follow
forks.

You could run facter from cron with strace prepended so it can strace from
the beginning. Use the -o to have strace send output to a file.

Wil

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMmm3r7DA9a-BW25B%2BsaTRaJe5K4izyrsUtdqgG%3DsJkhKy4fbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.