Re: [Puppet Users] How puppet install another version of the same package.

2014-04-22 Thread shlo . afgin
Hi, I did not understand what you mean, I can tell what I did: I run on one computer the command: puppet resource package I took the output and put it in puppet. Run puppet on another computer and I got this error. Thanks. On Wednesday, April 16, 2014 3:46:30 PM UTC+3, Felix.Frank wrote: >

Re: [Puppet Users] Re: Augeas lens to change an arbitrary line in a file?

2014-04-22 Thread Gabriel Filion
On 22/04/14 08:20 PM, Joachim Schrod wrote: > # Ghostscript default paper size > file_line { 'Ghostscript A4' : > path => '/usr/share/ghostscript/9.05/Resource/Init/gs_init.ps', > match => '^% /DEFAULTPAPERSIZE \(a4\)', > line => '/DEFAULTPAPERSIZE (a4) def' > }

[Puppet Users] Directory Environments Patch

2014-04-22 Thread Joshua Partlow
Hi, We have a pull request on the Puppet master branch which provides caching support for directory environments, and which we think addresses the slowdowns people are seeing using directory environments with their production instances. https://github.com/puppetlabs/puppet/pull/2566 This PR reli

[Puppet Users] Re: Unable to use Cloud Provisioner

2014-04-22 Thread Jason Oakley
I have the same issue. There's a bug report on the Puppet site that installing the Cloud Provisioner module breaks the node command. I wrote a blog post explaining everything: http://jasonoakley.com/puppet/beginning-adventures-with-puppet-from-puppetlabs/ On Friday, 19 July 2013 04:33:43 UTC+10

Re: [Puppet Users] Re: Augeas lens to change an arbitrary line in a file?

2014-04-22 Thread Joachim Schrod
On 04/22/14 18:14, Kenton Brede wrote: > I'm no expert with augeas but after looking at the gs_init.ps > file, I don't know of any current lens that > could be easily modified to work with it. I agree with Mike, I'd > either use file_line or an exec. > > File_line is part of s

Re: [Puppet Users] Re: using custom array based fact with defined type

2014-04-22 Thread Ritesh Nanda
Thanks Jose On Tue, Apr 22, 2014 at 1:47 PM, José Luis Ledesma < joseluis.lede...@gmail.com> wrote: > Facter doesn't support arrays, only strings until v2.0, so the only way I > know if what you did, although I usually use this form: > > Anyfact => value1,value2,value3 > > And then just split wi

[Puppet Users] Quantal leaving apt.puppetlabs.com

2014-04-22 Thread Matthaus Owens
Ubuntu quantal will reach end of life in April 2014 [1], and we will no longer be building packages for quantal once Ubuntu announces its retirement. We will remove it from our apt repository on Monday, June 23. [1] - https://lists.ubuntu.com/archives/ubuntu-announce/2012-October/000164.html --

[Puppet Users] Raring leaving apt.puppetlabs.com

2014-04-22 Thread Matthaus Owens
Ubuntu raring reached end of life on 2014-01-27 [1], so we are no longer building new packages for it and will remove it from our apt repository on Monday, May 19. [1] - http://fridge.ubuntu.com/2014/01/28/ubuntu-13-04-raring-ringtail-end-of-life-reached-on-january-27-2014/ -- Matthaus Owens Pu

Re: [Puppet Users] Re: PuppetDB 1.6.3 final now available

2014-04-22 Thread David Mesler
Sorry, you can disregard. It turns out the database was screwed up before the upgrade. This was just on my failover server so a purge and reinitialization took care of it. On Tuesday, April 22, 2014 6:40:45 PM UTC-4, Ken Barber wrote: > > We didn't actually provide any database schema migration

Re: [Puppet Users] Re: PuppetDB 1.6.3 final now available

2014-04-22 Thread Ken Barber
We didn't actually provide any database schema migration for 1.6.2->1.6.3. This in fact looks like its trying to migrate from scratch as if you have no tables loaded, this is done by looking at the schema_migrations table to work out what needs to be updated. So I guess the question is, what does

[Puppet Users] Re: PuppetDB 1.6.3 final now available

2014-04-22 Thread David Mesler
I'm having an issue updating from 1.6.2. 2014-04-22 17:00:33,043 INFO [main] [cli.services] PuppetDB version 1.6.3 2014-04-22 17:00:33,124 ERROR [main] [scf.migrate] Caught SQLException during migration java.sql.BatchUpdateException: Batch entry 0 CREATE TABLE certnames (name TEXT PRIMARY KEY)

[Puppet Users] Issue setting class parameter based on another class parameter (same class)

2014-04-22 Thread Matthew Kennedy
I have a class parameterized class that looks similar to... class blahapp::app ( $sor_host_ip = hiera('blahapp::app::sor_host_ip'), $rep_host_ip = hiera('blahapp::app::rep_host_ip', $sor_host_ip) ) { if !($rep_host_ip) { fail("Unable to set rep_host_ip. sor_host_

Re: [Puppet Users] Installing multiple packages (via apt) on one command line...

2014-04-22 Thread Christopher Wood
Do you have a link for this #2128? All I can find are these: http://projects.puppetlabs.com/issues/2128 https://tickets.puppetlabs.com/browse/PUP-2128 I'm nosy about the why. If you need to map the package to the provider this seems like the perfect opportunity for create_resources(), but there'

Re: [Puppet Users] Package fails to install while the remainder of the manifest is processed and applied.

2014-04-22 Thread José Luis Ledesma
I would try setting a notify to check if $required really got the value, or setting the array directly in the package resource. Regards, El 22/04/2014 18:35, "Adam Breaux" escribió: > Here's the relevant code (init.pp): > > class varnish { > $required = $::operatingsystem ? { > /(?i-mx:cen

Re: [Puppet Users] Re: using custom array based fact with defined type

2014-04-22 Thread José Luis Ledesma
Facter doesn't support arrays, only strings until v2.0, so the only way I know if what you did, although I usually use this form: Anyfact => value1,value2,value3 And then just split with the , Regards, El 22/04/2014 20:10, "Ritesh Nanda" escribió: > Hello Toni , John > > Thanks for your help.

[Puppet Users] Saving graphs from puppet-catalog-test runs?

2014-04-22 Thread Matt W
When we run our puppet-catalog-test runs (https://github.com/invadersmustdie/puppet-catalog-test), we'd like to generate and save the .dot graph files so that we can turn them into images. I don;t know enough about the internal workings of Ruby/Puppet to do this -- but does anyone have any idea

[Puppet Users] Package With 'yum' Provider Uses 'rpm' to Remove a Package (bug?)

2014-04-22 Thread Jon Forrest
(I found a discussion from 6/22/09 on this topic, but that was a long time ago.) Using Puppet 3.5.1 on CentOS 6.5 I recently created the following: package { [ "PackageKit"]: ensure => absent, } However, when I ran Puppet, I got Error: Execution of '/bin/rpm -e PackageKit-0.5.8-2

[Puppet Users] Re: Error while passing multidimensional array to defined type

2014-04-22 Thread jcbollinger
On Tuesday, April 22, 2014 8:27:59 AM UTC-5, Konstantin Boyanov wrote: > > Hello, > > I am running into the following problem - I have a Puppet Module for > managing SSH keys. The information about the keys is stored in Hiera in the > following form: > > sshkeys_keys: > - >

[Puppet Users] Best way to manage auth.conf

2014-04-22 Thread Benjamin72
Hi, I would like to manage *auth.conf* file of puppet clients to be able to use puppet kick. I tried this module : https://github.com/puppetlabs/puppetlabs-auth_confbut encountered problems with checksum of the file. I also see this possibility : https://forge.puppetlabs.com/domcleal/augeasp

Re: [Puppet Users] Installing multiple packages (via apt) on one command line...

2014-04-22 Thread Jakov Sosic
On 04/21/2014 11:25 PM, Matt W wrote: Hey we have a problem that I think we need to solve with a custom Puppet provider, but I could use a bit of help getting started. Overall the issue of being able to install multiple packages at-once has been discussed a ton of times (issue #2128 for example).

Re: [Puppet Users] Using a fact in "onlyif"

2014-04-22 Thread Mike Reed
Hey Peter, Thank you for the info. I'll read the attached link and get a better understanding of this one. As a note, the below if statement worked like a charm. Thanks again for the help. Cheers, Mike On Tuesday, April 22, 2014 11:23:44 AM UTC-7, Peter Bukowinski wrote: > > 'onlyif' is n

[Puppet Users] Re: How to pass a hash to a variable with Puppet Enterprise?

2014-04-22 Thread jcbollinger
On Tuesday, April 22, 2014 11:40:08 AM UTC-5, Chris Neal wrote: > > Hi all, > > This is most likely a noob question, so I apologize. I've googled as well > and was not able to find an answer to this seemingly basic question. > I'm using Puppet Enterprise 3.1.2 along with this module to install/

Re: [Puppet Users] Using a fact in "onlyif"

2014-04-22 Thread Mike Reed
Hey Eric, Thanks very much for the reply and info. I added that in and it now looks like: file { "/var/lib/nfs/rpc_pipefs" : ensure => "link" , onlyif => "['${::operatingsystemrelease}' = '12.04']" , target => "/run/rpc

[Puppet Users] Re: Serious performance issues with Puppet 3.5.x when using Directory Environments

2014-04-22 Thread Eric Sorenson
On Tuesday, April 22, 2014 5:25:55 AM UTC-7, Antoine Cotten wrote: > > Hi Eric, > thank you for pointing me to this feature, and sorry for the answer time. > > I managed to outline the problematic parts in the Puppet run: the final > POST method takes forever when Directory Environments is enab

Re: [Puppet Users] Using a fact in "onlyif"

2014-04-22 Thread estonfer
Hah, I wasn't paying attention at all, I thought the resource was an exec. On Apr 22, 2014, at 2:23 PM, Peter Bukowinski wrote: > 'onlyif' is not a valid parameter for puppet 'file' type. Conditional logic > is handled by one of puppet's conditional statements > (http://docs.puppetlabs.com/pu

Re: [Puppet Users] Using a fact in "onlyif"

2014-04-22 Thread Peter Bukowinski
'onlyif' is not a valid parameter for puppet 'file' type. Conditional logic is handled by one of puppet's conditional statements (http://docs.puppetlabs.com/puppet/latest/reference/lang_conditional.html). In this case, wrapping your file resource in an 'if' statement will suffice, but I encour

[Puppet Users] Re: using custom array based fact with defined type

2014-04-22 Thread Ritesh Nanda
Hello Toni , John Thanks for your help. Doing validate array gives a Error 400 on SERVER: "" is not an Array. It looks to be a String I made it working using $arrayvar = split($::arraydev, '[,]') then calling test::exeecho{$arrayvar:} , in this way it works and its process the array .

Re: [Puppet Users] Using a fact in "onlyif"

2014-04-22 Thread estonfer
Since this shells out you could do something like this onlyif => "[ '${::operatingsystemrelease}' = '10.04' ]", Thanks Eric On Apr 22, 2014, at 2:00 PM, Mike Reed wrote: > Hello all, > > I've been stumped by this one and I was hoping for a little help. I'd like > the below snippet to ru

[Puppet Users] Using a fact in "onlyif"

2014-04-22 Thread Mike Reed
Hello all, I've been stumped by this one and I was hoping for a little help. I'd like the below snippet to run only if the operating system is a specific version. Because facter already has the "operatingsystemrelease" variable, I figured I'd use that but haven't had any luck getting it actua

[Puppet Users] Using Puppet to automate management of KVM/libvirt VMs?

2014-04-22 Thread Alex Scoble
Hi All, Is anyone here using Puppet to automate management (creation, spinup and provisioning) of VMs on KVM/libvirt hosts? If so, how are you doing it? Are you using a particular module on GitHub? Seems like there was a bunch of development done in this space in 2011 and then it just stopped.

Re: [Puppet Users] Error while passing multidimensional array to defined type

2014-04-22 Thread José Luis Ledesma
With this hiera data I think I would be a lot easier to use the create_resources function. Regards, El 22/04/2014 18:13, "Martin Alfke" escribió: > Hi Konstantin, > On 22.04.2014, at 15:27, Konstantin Boyanov wrote: > > > Hello, > > > > I am running into the following problem - I have a Puppet M

Re: [Puppet Users] Package fails to install while the remainder of the manifest is processed and applied.

2014-04-22 Thread Adam Breaux
I use the same idiom on numerous other modules and they work without error. It's peculiar to this module. Tried it with "osfamily" and same result, the packages are not installed. Here's the relevant "facts" osfamily => RedHat operatingsystem => CentOS On Tuesday, April 22, 2014 12:42:42 PM UT

Re: [Puppet Users] Package fails to install while the remainder of the manifest is processed and applied.

2014-04-22 Thread José Luis Ledesma
Could be that the selector is not returning what you expect? Btw i think that its easier to use $::osfamily Regards, El 22/04/2014 18:35, "Adam Breaux" escribió: > Here's the relevant code (init.pp): > > class varnish { > $required = $::operatingsystem ? { > /(?i-mx:centos|fedora|redhat|s

[Puppet Users] How to pass a hash to a variable with Puppet Enterprise?

2014-04-22 Thread Chris Neal
Hi all, This is most likely a noob question, so I apologize. I've googled as well and was not able to find an answer to this seemingly basic question. I'm using Puppet Enterprise 3.1.2 along with this module to install/manage Elasticsearch: https://forge.puppetlabs.com/elasticsearch/elasticse

[Puppet Users] Package fails to install while the remainder of the manifest is processed and applied.

2014-04-22 Thread Adam Breaux
Here's the relevant code (init.pp): class varnish { $required = $::operatingsystem ? { /(?i-mx:centos|fedora|redhat|scientific)/ => [ 'varnish', 'varnish-libs' ], } package { $required: ensure => 'latest' } file { '/etc/varnish': ensure => directory, owner => 'root', grou

[Puppet Users] augeas with puppet : cannot update line

2014-04-22 Thread cheniour ghassen
Hi everyone, I am new in puppet. In fact i am trying to update bind-address in the mysql file '/etc/mysql/my.cnf i wrote the this code in manifests/nodes.pp augeas { 'update-bind-address': >> context => '/files/etc/mysql/my.cnf', >> changes => ['setbind-adress 192.168.80.135'], >> } >

Re: [Puppet Users] Re: Augeas lens to change an arbitrary line in a file?

2014-04-22 Thread Kenton Brede
I'm no expert with augeas but after looking at the gs_init.ps file, I don't know of any current lens that could be easily modified to work with it. I agree with Mike, I'd either use file_line or an exec. File_line is part of stdlib. Click on the "types" tab on this page for an example. https://

Re: [Puppet Users] Error while passing multidimensional array to defined type

2014-04-22 Thread Martin Alfke
Hi Konstantin, On 22.04.2014, at 15:27, Konstantin Boyanov wrote: > Hello, > > I am running into the following problem - I have a Puppet Module for managing > SSH keys. The information about the keys is stored in Hiera in the following > form: > > sshkeys_keys: > - > keyna

Re: [Puppet Users] puppet repos on ubuntu 14.04

2014-04-22 Thread edwinstar...@yahoo.com
> > Puppet hasn't been released for Ubuntu 14.04 yet. There were some > dependency updates for the puppet package that are needed for Trusty > that haven't been released yet. The commit with the fix > ( > https://github.com/puppetlabs/puppet/commit/b6514b8dfe92a1e66c086fe1f45e5e7261bd45fb) >

Re: [Puppet Users] Received certificate does not match private key.

2014-04-22 Thread Chris Johnson
On 4/22/14, 10:54 AM, Felix Frank wrote: *sigh* The excessive clearing of certs master side is painful to watch, to be certain. The error basically tells you that the master does hand a certificate to the agent, but it is not one the agent has a key for. This is what someone will see if they try

[Puppet Users] Re: Facts in ERB Template not working

2014-04-22 Thread zjherner
I can run $ lsb-release -a on the servers in question and it returns the information I expect. When I use the @lsbdistdescription the local puppet daemon does not acknowledge the field. That line simply gets the architecture. With the @ there is nothing to report when I look in foreman, when

Re: [Puppet Users] Received certificate does not match private key.

2014-04-22 Thread Felix Frank
On 04/19/2014 06:50 PM, Chris Johnson wrote: > I know this has been asked about before, I've searched it. There seem > to be two main responses. Synchronize clocks or start over with > generating certificates. I've done both. And puppet used to work. > > I have an mini virtual cluster set up u

[Puppet Users] Re: bucketing all changed files

2014-04-22 Thread Robert Reilly
Thanks for the reply, That is the conclusion i came to but did not want to reinvent if it already existed. I like the fs snapshot idea, i will look into that further. Thanks ! Robert On Tuesday, April 22, 2014 9:05:05 AM UTC-4, jcbollinger wrote: > > > > On Monday, April 21, 2014 4:37:46 PM UTC-

Re: [Puppet Users] Re: Facts in ERB Template not working

2014-04-22 Thread Felix Frank
On 04/22/2014 04:36 PM, Sans wrote: > You sure it's just a "recommendation"? IIRC, it doesn't work with Ruby > v1.9.x. > But that's definitely not the actual problem here though. That's right. The @ is just to safeguard against an issue where variable names clash with method names from the ruby k

[Puppet Users] Re: Facts in ERB Template not working

2014-04-22 Thread Sans
On Tuesday, April 22, 2014 2:35:05 PM UTC+1, jcbollinger wrote: > > > > That is the current recommendation, but it is not a requirement. Bare > variable names work, too. > You sure it's just a "recommendation"? IIRC, it doesn't work with Ruby v1.9.x. But that's definitely not the actual pro

[Puppet Users] configure more than one registration plugin for mcollective client.

2014-04-22 Thread Sambhavi Pandya
We are using mcollective 2.2 version and wanted to know if we can configure more than one registration plugin ? If yes then how ? Curently this is the config setting we have for one registeration agent on server.cfg -

Re: [Puppet Users] Configure puppetdb to allow cross domain requests?

2014-04-22 Thread Ken Barber
PuppetDB does not support CORS or JSONP today, to work-around this you can probably proxy the PuppetDB API from the same virtualhost/domain where your application resides. I see you already raised a FR request on this: https://tickets.puppetlabs.com/browse/PDB-587 ... we also had a another ticket

[Puppet Users] Re: Facts in ERB Template not working

2014-04-22 Thread jcbollinger
On Monday, April 21, 2014 4:45:09 PM UTC-5, zjhe...@gmail.com wrote: > > Having an odd issue with the facts inside an ERB template. I'm using the > facts to build a somewhat dynamic MOTD. I made some changes to init.pp for > the module and deployed to my Dev environment and it started breakin

[Puppet Users] Error while passing multidimensional array to defined type

2014-04-22 Thread Konstantin Boyanov
Hello, I am running into the following problem - I have a Puppet Module for managing SSH keys. The information about the keys is stored in Hiera in the following form: sshkeys_keys: - keyname: 'puppet_rootkey' key: 'adsfadsfadfadfadfasdfadfadf123123123123asdfasf

[Puppet Users] Re: using custom array based fact with defined type

2014-04-22 Thread jcbollinger
On Monday, April 21, 2014 6:27:21 PM UTC-5, Ritesh Nanda wrote: > > Hello , > > I have a custom facts which returns the block devices based on some > condition in an array. > > facter | grep arraydev > arraydev => ["sdb", "sdc"] > > Now i want to use this array in defined type so that a exec r

[Puppet Users] Re: using custom array based fact with defined type

2014-04-22 Thread Antoine Cotten
Could you please post the result of: validate_array($::arraydev) ? You need to have the "puppetlabs/stdlib" module installed Toni On Tuesday, April 22, 2014 1:27:21 AM UTC+2, Ritesh Nanda wrote: > > Hello , > > I have a custom facts which returns the block devices based on some > condition in

[Puppet Users] Re: bucketing all changed files

2014-04-22 Thread jcbollinger
On Monday, April 21, 2014 4:37:46 PM UTC-5, Robert Reilly wrote: > > Hey all, Is there a existing way to bucket all changes ? This works great > for the file type, but would be great when modifying the passwd or shadow > file with the user type. I have searched on this topic but not found > an

[Puppet Users] Re: Augeas lens to change an arbitrary line in a file?

2014-04-22 Thread Mike Langhorst
There's also the file_line resource that's available with the std lib module, that might work for you as well. On Monday, April 21, 2014 3:25:13 PM UTC-7, Joachim Schrod wrote: > > Hi, > > I'm new to Puppet, and also new to Augeas. > > I want to change a line in a file. In particular, the file

[Puppet Users] Re: Serious performance issues with Puppet 3.5.x when using Directory Environments

2014-04-22 Thread Niels Abspoel
I can confirm this, and reproduce: running centos 6.5 master with apache passenger. if I disable: [production] manifest = /etc/puppet/environments/production/manifests/site.pp modulepath = /etc/puppet/environments/production/modules and add [main] environmentpath = $confdir/environments I get

Re: [Puppet Users] Re: fail on first error. don't continue doing stuff

2014-04-22 Thread Gregory Orange
On 19/04/14 03:05, Alexander Gray II wrote: I wanted puppet to stop immediately on error so that I could manually go through Augeas and sniff around, but since puppet does a million-and-one things after the error, and it's unreproducible after puppet runs. I sometimes want that behaviour, but h

Re: [Puppet Users] Puppet FreeBSD could not autoload provider

2014-04-22 Thread Felix Frank
Hi, please node that case and capitalization are important in puppet manifests! On 04/18/2014 10:40 AM, aminos wrote: > Node default { should be 'node'. > Package { nano: should be 'package' (capital P only for resource defaults, http://docs.puppetlabs.com/puppet/latest/referen

Re: [Puppet Users] Re: rspec-puppet: how to pass undef as parameter value?

2014-04-22 Thread Nan Liu
On Tue, Apr 22, 2014 at 4:34 AM, Remi Ferrand < remi.mathieu.ferr...@gmail.com> wrote: > Hi Nan, > > thanks for your answer. > With this modification: > > diff --git a/spec/classes/puppetrspec_spec.rb > b/spec/classes/puppetrspec_spec.rb > index 9d06d79..80fae58 100644 > --- a/spec/classes/puppetr

Re: [Puppet Users] Re: rspec-puppet: how to pass undef as parameter value?

2014-04-22 Thread Remi Ferrand
Hi Nan, thanks for your answer. With this modification: diff --git a/spec/classes/puppetrspec_spec.rb b/spec/classes/puppetrspec_spec.rb index 9d06d79..80fae58 100644 --- a/spec/classes/puppetrspec_spec.rb +++ b/spec/classes/puppetrspec_spec.rb @@ -22,7 +22,7 @@ describe 'puppetrspec', :type => :

Re: [Puppet Users] Re: rspec-puppet: how to pass undef as parameter value?

2014-04-22 Thread Nan Liu
On Tue, Apr 22, 2014 at 3:08 AM, Remi Ferrand < remi.mathieu.ferr...@gmail.com> wrote: > Thank you for your answer, but with my tests it seems that passing Ruby > *nil* value to puppet doesn't result in puppet *undef* value... > This is strange considering that puppet *undef* value results in ruby

Re: [Puppet Users] How to check a text file for a certain line?

2014-04-22 Thread Joachim Schrod
On 04/22/14 01:41, Kenton Brede wrote: > On Mon, Apr 21, 2014 at 5:53 PM, Andreas Ntaflos > mailto:d...@pseudoterminal.org>> wrote: > > On 2014-04-22 00:10, Joachim Schrod wrote: > > On 04/21/14 19:42, Kenton Brede wrote: > >> Look into using "file_line," it's part of stdlib. > >>

Re: [Puppet Users] Re: rspec-puppet: how to pass undef as parameter value?

2014-04-22 Thread Remi Ferrand
Hi Felix, Thank you for your answer, but with my tests it seems that passing Ruby *nil* value to puppet doesn't result in puppet *undef* value... This is strange considering that puppet *undef* value results in ruby *nil* value in templates... BTW, I've fixed the sample puppet module code ( https

Re: [Puppet Users] Re: rspec-puppet: how to pass undef as parameter value?

2014-04-22 Thread Felix Frank
I *would* indeed try let :params do { :ensure => nil } end I would also inline the braces {} as shown because they form a hash in this instance, not a block. Aside from that, this spec is very well structured. Consider my hat tipped. Cheers, Felix On 04/18/2014 03:5