[Puppet Users] Is there a way to return/skip module code based on a validation

2013-10-10 Thread Jay
Hi, I have a puppet module with more than 15 blocks of resources.. based on a validation I want puppet to decide to continue next blocks or skip with a warning(with out failing). currently I am doing this with a big if block. class mymodule { if $::flag_enabled { package {...}

Re: [Puppet Users] Is there a way to return/skip module code based on a validation

2013-10-10 Thread Ryan Coleman
Hi Jay, You could simplify things a little using 'unless' which acts like the reverse of 'if'. You'd place your resources within the unless block so that they'd only be included in your catalog if your Fact or variable evaluated to false.

Re: [Puppet Users] Sync data between various PuppetDB instances

2013-10-10 Thread Pablo Fernandez
Hi, I have found a PuppetDB Hiera backend (https://github.com/dalen/puppet-puppetdbquery) that could (potentially) be used to query other PuppetDBs... but that would return hiera data, and not exported resources like a normal PuppetDB does. Did anybody try to push data to a PuppetDB by hand? The

Re: [Puppet Users] Sync data between various PuppetDB instances

2013-10-10 Thread Ken Barber
Is there a mechanism to pull and push some exported resources from one PuppetDB to another? I guess this could be done with the API, but has anybody tried it, or will it work at all? Not provided by us, yet. We've had a lot of discussions internally about this kind of thing. How about you

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

2013-10-10 Thread Vincent Nawrocki
Hi all ! I'm working on mcollective for a few days and I have a problem using agents. I'm on CentOS 6.4, using activeMQ 5.8.0 and mcollective 2.2.4. I Installed the service agent using yum on the client : yum install mcollective-service-common I can see it in the doc list using mco plugin doc.

[Puppet Users] Puppet fails to install package, whilst it's okay to do manually

2013-10-10 Thread Sans
Dear all, I'm seeing this strange thing: When I run *puppet agent -td* on the node (Nagios, in this example case), puppet fails to install Nagios3 (on Debian) with this: Debug: Executing '/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n nagios3' Debug: Executing

[Puppet Users] Two (hopefuly minor) Questions (ip-array, line for several hosts)

2013-10-10 Thread christian . reiss . sg
Hey Folks, I have two question, which I hope are minor. First off I would like an array with all IPs for a system. This would come in handy for sshkeys, hosts and the likes. Second, and more important, I need to add a line into a file for every host. To clarify here is an example: - I have 3

[Puppet Users] Re: Installing ActiveRecord fails

2013-10-10 Thread alessandro mazzoli
Try this, it helped me: http://help.rubygems.org/discussions/problems/637-rails-installation-fails Il giorno mercoledì 9 ottobre 2013 04:56:06 UTC+2, ytmp123 ha scritto: Hello guys, When I try to execute this: gem install activerecord Then I get the error message: Error installing

Re: [Puppet Users] Could not retrieve catalog from remote server: Error 400 on SERVER: cannot generate tempfile `/var/lib/puppet/yaml/facts/vagrant1.localdomain.yaml20131009-16545-8oie5i-9'

2013-10-10 Thread alessandro mazzoli
Thanks Jason and Jared, I think, like Jared said, that the user trying to create the tempfile cannot write to it (this user may well be puppet, not root. So i checked on puppetmaster: -permissions:/etc/init.d ls -la -rwsr-xr-x 1 root root 3727 Sep 12 22:57 puppetmaster

Re: [Puppet Users] Sync data between various PuppetDB instances

2013-10-10 Thread Pablo Fernandez
Thanks Ken, I took a look at the Command API and seems to be quite interesting, but it triggers a few more questions. As a reminder (also for others), what I wanted to do was to add exported resources from Node_A (managed by PuppetMaster_A that has its own PuppetDB_A) into a different

[Puppet Users] File integrity monitoring and expected Puppet changes

2013-10-10 Thread banjer
Hi all, How can I retrieve a file's most recent checksum as reported by puppet? I'm running Puppet 3.1, PuppetDB 1.4, and Foreman 1.2, and have looked through the various APIs as well as /var/lib/puppet/ on each node, but can't find a specific field for the checksum. I think it used to be in

[Puppet Users] Checking for refresh events through rspec

2013-10-10 Thread Per Bergland
How do I write rspec to verify that a service or some other resources has been notified properly to refresh itself? /Per -- 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

[Puppet Users] Re: Two (hopefuly minor) Questions (ip-array, line for several hosts)

2013-10-10 Thread jcbollinger
On Thursday, October 10, 2013 4:54:31 AM UTC-5, christian...@googlemail.com wrote: Hey Folks, I have two question, which I hope are minor. First off I would like an array with all IPs for a system. This would come in handy for sshkeys, hosts and the likes. That kind of information

[Puppet Users] Re: Puppet fails to install package, whilst it's okay to do manually

2013-10-10 Thread jcbollinger
On Thursday, October 10, 2013 4:34:59 AM UTC-5, Sans wrote: Dear all, I'm seeing this strange thing: When I run *puppet agent -td* on the node (Nagios, in this example case), puppet fails to install Nagios3 (on Debian) with this: [...] But if I run the same command (well, without '-y')

Re: [Puppet Users] Could not retrieve catalog from remote server: Error 400 on SERVER: cannot generate tempfile `/var/lib/puppet/yaml/facts/vagrant1.localdomain.yaml20131009-16545-8oie5i-9'

2013-10-10 Thread jcbollinger
On Thursday, October 10, 2013 6:58:10 AM UTC-5, alessandro mazzoli wrote: Thanks Jason and Jared, I think, like Jared said, that the user trying to create the tempfile cannot write to it (this user may well be puppet, not root. So i checked on puppetmaster: -permissions:/etc/init.d ls

Re: [Puppet Users] Sync data between various PuppetDB instances

2013-10-10 Thread Wolf Noble
I'd be interested in accomplishing a similar thing. I want to have a central reporting puppetdb which I can (outside of puppet) query for multisite information without tying isolated environments together via a single postgres db, or using multi-master replication. my needs do not involve making

[Puppet Users] Re: user management define once an add if required on server

2013-10-10 Thread Andreas Dvorak
Great, thank you the good example. Now I am happy Andreas -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to

Re: [Puppet Users] puppet module

2013-10-10 Thread gh
On 10/8/13 2:27 PM, John wrote: I need to write a puppet SSHD module that does the following: First I have 5 different operating systems to install to: Red Hat, Free BSD, AIX, Ubuntu, and SuSE. The second requirements: If the host file contains an entry of host-A.domain.com (for

[Puppet Users] Re: starting hiera + ntp module

2013-10-10 Thread jcbollinger
On Wednesday, October 9, 2013 10:11:46 AM UTC-5, TimV wrote: Hello, I am trying to extend my puppet installation by utilising hiera for dynamic data for particular hosts. To that end, I'm testing hiera with the puppetlabs ntp module. However, I am getting this error: Error: Could not

Re: [Puppet Users] Sync data between various PuppetDB instances

2013-10-10 Thread Throwe, Jesse
It sounds like a shade of #19321 - https://projects.puppetlabs.com/issues/19321 On Thu, Oct 10, 2013 at 10:31 AM, Wolf Noble w...@wolfspyre.com wrote: I'd be interested in accomplishing a similar thing. I want to have a central reporting puppetdb which I can (outside of puppet) query for

Re: [Puppet Users] Sync data between various PuppetDB instances

2013-10-10 Thread Throwe, Jesse
That would really depend on the approach ultimately taken for the multi-master. If the puppet master (or agent in masterless mode) forwards the same fact/report/node/etc data to multiple puppetdb instances then yes the scale breaks horribly and does not meet part of this request. If there is some

[Puppet Users] Re: Could not retrieve catalog from remote server: Error 400 on SERVER: cannot generate tempfile `/var/lib/puppet/yaml/facts/vagrant1.localdomain.yaml20131009-16545-8oie5i-9'

2013-10-10 Thread alessandro mazzoli
Thx so much John as you explained was a permission problem: as you explained i fixed like this: On pupputmaster : service puppetmaster stop chown puppet:puppet /etc/init.d/puppetmaster rm -r /var/lib/puppet/yaml/facts chown puppet:puppet /var/lib/puppet/yaml/node/hostname and puppetmaster

Re: [Puppet Users] Is there a way to return/skip module code based on a validation

2013-10-10 Thread Jay
Thanks Ryan! I'm looking for something like a break statement, which should not proceed execution of following resources. Anyway thanks for the information about future parser. Appreciate your time in answering my question. Thanks, jay On Oct 10, 2013 11:57 AM, Ryan Coleman

Re: [Puppet Users] Is there a way to return/skip module code based on a validation

2013-10-10 Thread Ryan Coleman
On Thu, Oct 10, 2013 at 11:13 AM, Jay jayachandran...@gmail.com wrote: I'm looking for something like a break statement, which should not proceed execution of following resources. Oh! The built-in fail() function will stop catalog compilation full-stop and fail with a parse error. If what

[Puppet Users] Need help wrapping my brain around custom environments

2013-10-10 Thread pezhore
I'm trying to get a small Puppet Enterprise environment setup for testing - just three servers: a Gitlab box for manifest/module version control, the puppet enterprise server, and a test ubuntu box. I believe I have a pretty decent handle on how to automatically pull down updates from the git

[Puppet Users] Virt-what on OEL 5

2013-10-10 Thread Spencer Krum
Hello, I'm trying to install facter latest on OEL 5.5 but can't because virt-what doesn't appear to be in the oracle repositories or EPEL. Can anyone confirm/deny this? Thanks, Spencer Krum -- You received this message because you are subscribed to the Google Groups Puppet Users group. To

Re: [Puppet Users] Is there a way to return/skip module code based on a validation

2013-10-10 Thread Chad Huneycutt
Remember that a puppet manifest is not a script. You are simply making an unordered list of resources to apply to a host. With that in mind, a break statement just doesn't make sense. I do feel your pain, though, and have struggled with the same issue myself. It feels wrong to have most of the

[Puppet Users] Rootless Puppet

2013-10-10 Thread Spencer Krum
Hello, I was recently reached out to by someone who was interested in using Puppet without root. I gave a presentation on this at Puppet Conf 2013. There aren't a lot of resources about how to do this available to the general public. I believe that there is a block of people doing this but

[Puppet Users] Re: Rootless Puppet

2013-10-10 Thread James Henderson
Hello, I am the guy who Spencer is talking about. Since I am brand new to puppet, and puppet non-root is not well supported at this time, we have decided to go with a more script based option. However I am very interested in the future of puppet and I am willing to provide input, testing and

Re: [Puppet Users] Virt-what on OEL 5

2013-10-10 Thread Matthaus Owens
Spencer, Mentioned on IRC but will mention here as well for completeness. virt-what is in OEL 5 and 6 latest, so you should be able to pull it in from that repository. Either enabling latest on just that package or pulling it into a local repository would do the trick. HTH On Thu, Oct 10, 2013

Re: [Puppet Users] Virt-what on OEL 5

2013-10-10 Thread Spencer Krum
Thanks! On Thu, Oct 10, 2013 at 3:00 PM, Matthaus Owens matth...@puppetlabs.comwrote: Spencer, Mentioned on IRC but will mention here as well for completeness. virt-what is in OEL 5 and 6 latest, so you should be able to pull it in from that repository. Either enabling latest on just that

[Puppet Users] Ways to set a global variable

2013-10-10 Thread Gonzalo Servat
Hi All, In hiera, I have something like: interfaces: nic1: 10G: true ip: x.x.x.x netmask: x.x.x.x nic2: ip: x.x.x.x netmask: x.x.x.x This hiera config is used to build the interface configuration files. Now, if a server has at least ONE NIC with

[Puppet Users] Re: External Facts on Windows with Powershell

2013-10-10 Thread Jay Benner
Did you figure this out? I am having the same trouble. On Tuesday, April 9, 2013 10:44:38 AM UTC-5, Grant Trevor wrote: I'm trying to follow the steps on http://docs.puppetlabs.com/guides/custom_facts.html in regards to declaring External Facts using powershell. I've created a simple

[Puppet Users] Augeas XML trouble

2013-10-10 Thread Thilo-Alexander Ginkel
Hello everyone, I am currently trying to add elements to an XML file (a libvirt network definition) using Puppet (2.7.23)/Augeas (0.10). The XML looks like this: network namevirbr0/name uuid57fdc6e3-cba1-4110-88ef-850f1b71ee39/uuid forward dev='eth0' mode='nat'/ bridge

[Puppet Users] Re: Ways to set a global variable

2013-10-10 Thread Gonzalo Servat
For anyone interested in how I got around this, I ended up creating a custom function and placed it inside modules/module/lib/puppet/parser/functions. The function essentially uses hiera to lookup my 'interfaces' key in the YAML and loops through it to find if 10G has been set for any interfaces.