Re: [Puppet Users] Re-inventing the Wheel (again?)

2013-06-20 Thread David Schmitt
On 2013-06-20 22:20, Eric Aiken wrote: Has anyone created a "repo" of puppet modules for a given linux distro. In my case CentOS. Seems there should be (at this point) /etc/puppet/modules/CentOSx, that includes all the necessary modules/manifest etc. that only need to be tweaked for local setting

[Puppet Users] Re: File directive

2013-06-20 Thread Roman Alekseev
Is the module below correct? class nginx { if defined(Package['nginx']) { file { "/tmp/puppet-nginx.sh": ensure => "present", owner => "root", group => "root", mode

Re: [Puppet Users] Puppet and VMWare - A potentially stooopid question

2013-06-20 Thread Michael Dodwell
VMWare put out SDK's for a number of languages if you don't want to use perl. Python being another *nix based one. The SDK's come with a number of example scripts that you can cut and paste without much effort to form a script that should do everything you might want. Or you can wrap them up with s

Re: [Puppet Users] Puppet and VMWare - A potentially stooopid question

2013-06-20 Thread Dan White
That might work for me if I did not hate Perl. No offense to folks that like it, but I had a very nasty experience with it early in my computer-career that pushed me away from it. I will still check it out. Thanks for the pointer. I am currently using Cobbler with Puppet. I know this combo ca

Re: [Puppet Users] Puppet and VMWare - A potentially stooopid question

2013-06-20 Thread Dan White
I know I can manage Linux VM’s with Puppet, I guess I am looking to get Puppet provision them as well. I believe I will explore the possibilities in The Forge and also whip up a demo PE-Master to compare. The demo PE-Master might impress the customer sufficiently to sell the idea of going that

[Puppet Users] Re: Control directory mode only on creation?

2013-06-20 Thread Michael Dodwell
exec { command => "mkdir /somedir; chown newuser /somedir", unless => "test -d /somedir" } On Friday, June 21, 2013 8:24:59 AM UTC+10, Robin Powell wrote: > > > Is there a way to make a directory and set its owner and mode and so > on only if it didn't exist? > > That is: I don't want to *r

[Puppet Users] Re: Puppet and VMWare - A potentially stooopid question

2013-06-20 Thread Michael Dodwell
Take a look at the Viper toolkit from VMWare. You can then create a script with the examples given and then use puppet to run the scripts to do stuff that you want. http://www.vmware.com/support/developer/viperltoolkit/ Personally I use a VMA server to create instances, Razor to kickstart and

Re: [Puppet Users] Set environment variable that is visible to package installation

2013-06-20 Thread Michael Dodwell
Another method is to use exec {} instead of package {} to install the rpm. This will enable you to set environment => 'BATCH=myval', path => ['/bin', '/usr/bin'] etc use unless to check if the package is installed so it doesn't try to install it multiple times. On Friday, June 21, 2013 12:53:3

Re: [Puppet Users] Puppet and VMWare - A potentially stooopid question

2013-06-20 Thread Justin Stoller
On Thu, Jun 20, 2013 at 2:39 PM, Dan White wrote: > But I'd rather be certain of the answer than guess or try it and go down > in flames: > > The question: Can one integrate VMWare with Open Source Puppet ? Or is > this a Puppet-Enterprise-only thing ? > You can integrate anything you'd like w

[Puppet Users] Re: How to make a package dependant on a class for the repository.

2013-06-20 Thread joe
Does your repos class have a bunch of classes included? If so, those are not caught by the require and you need to use the anchor pattern: http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern The ordering (no matter how you do it) only orders the *resources* in that class. Not the

[Puppet Users] puppet node deactivate

2013-06-20 Thread David Kerr
Hello, I'm in the process of upgrading my puppet from 2x to 3.2.1. During my testing i found that it appears that puppet node deactivate isn't removing nodes from storeconfigs. Specifically: On my puppet server: > puppet node deactivate hub15.mydomain.com Submitted 'deactivate node' for hub15.

Re: [Puppet Users] Apply a specific manifest on agent

2013-06-20 Thread Denmat
Hi, depending on your code you can look at a few options. When an agent connects to the puppet master you can supply a --tag var that you can then inspect and make changes in your code paths. The other thing you can do is add --environment and use the environment features that puppet has to loa

[Puppet Users] Control directory mode only on creation?

2013-06-20 Thread Robin Lee Powell
Is there a way to make a directory and set its owner and mode and so on only if it didn't exist? That is: I don't want to *reset* the owner and mode if it's already there. -Robin -- http://intelligence.org/ : Our last, best hope for a fantastic future. .i ko na cpedu lo nu stidi vau loi jbopr

Re: [Puppet Users] Can't find source of "Removing mount" errors

2013-06-20 Thread Brandon
I've searched, but haven't found anything. I will continue looking. On Thursday, June 13, 2013 6:25:35 AM UTC-7, jcbollinger wrote: > > > > On Thursday, June 13, 2013 1:34:32 AM UTC-5, denmat wrote: >> >> Hi, >> >> You sure that a grep for 'mount' through your manifest finds nothing? >> >> > Ye

[Puppet Users] Puppet and VMWare - A potentially stooopid question

2013-06-20 Thread Dan White
But I'd rather be certain of the answer than guess or try it and go down in flames: The question: Can one integrate VMWare with Open Source Puppet ? Or is this a Puppet-Enterprise-only thing ? “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that

[Puppet Users] Apply a specific manifest on agent

2013-06-20 Thread Dhananjayan Ramesh
Hi All, I am new to Puppet and I am wondering if there is a way to just apply a manifest one-time (present on the master, not included in site.pp) on an agent node without having to edit site.pp? It's like I want to run a command on the agent that will do this for me. Something analogous to "p

[Puppet Users] Upgrade from 2.7.20 to 2.7.22 breaks puppet-dashboard

2013-06-20 Thread Joe Benson
I upgraded our puppetmaster from 2.7.20 to 2.7.22 and puppet dashboard quit importing reports. I'm getting a failed task with this error message. undefined method `>=' for nil:NilClass Backtrace /usr/share/puppet-dashboard/lib/r

Re: [Puppet Users] Re-inventing the Wheel (again?)

2013-06-20 Thread Ashley Penney
On Thu, Jun 20, 2013 at 4:20 PM, Eric Aiken wrote: > I'm new to puppet and working my way through the documentation. I'm > struggling with the puppet labs module repo. > > I've toyed with numerous automation and configuration methodologies over > the decades. Perhaps I'm seeing puppet wrong, C

Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes

2013-06-20 Thread Phil Gardner
I fail for confusing underscores and hyphens. Thanks for helping point that out. The issue was that I was pointing to the wrong module. As for the notify/exec portion, it actually runs fine with just having it notify the exec when the file changes. It seems to work with the way it is, without havi

[Puppet Users] Re-inventing the Wheel (again?)

2013-06-20 Thread Eric Aiken
I'm new to puppet and working my way through the documentation. I'm struggling with the puppet labs module repo. I've toyed with numerous automation and configuration methodologies over the decades. Perhaps I'm seeing puppet wrong, Compared with CFEngine there is a a lot I like, but I'm not

[Puppet Users] Re: How to apply puppet manifests toa remote host?

2013-06-20 Thread Charlie Brune
I'm wondering if I have the same question. I have a laptop that works well with my Puppet Master while I'm at home. However, when I leave home, puppet no longer is able to apply the manifests (configs) assigned to it. I was hoping that it would simply continue to apply whatever manifests it k

Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes

2013-06-20 Thread Dan White
Trying again, less typos: http://docs.puppetlabs.com/references/latest/type.html#exec scroll down to the "refreshonly" parameter and compare it to your code. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bil

Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes

2013-06-20 Thread Dan White
The obvious first. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) - Original Message - From: "Phil Gardner" To: puppet-users@googlegroups.com Sent: Thursday, June 20,

[Puppet Users] Re: 2.7 Dynamic scoping warnings - which way should I jump?

2013-06-20 Thread Nick Fagerlund
Hey Dirk, Yeah, we need to re-write that page, sorry. Class parameters are absolutely the way to go -- they're easier to deal with in Puppet 3, and they DO work with include, as long as you back them up with Hiera. The key feature to learn about is automatic class parameter lookup: http://do

Re: [Puppet Users] The handy Grail of Modules Standards

2013-06-20 Thread David Schmitt
On 2013-06-20 16:12, jcbollinger wrote: I just have low regard for software that doesn't yet exist. I do not find the potential for nebulous future software a persuasive argument for adopting anything. You might want to check out the significant amount of modules available at http://github.com

Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes

2013-06-20 Thread Phil Gardner
whoops, ignore 'include yum_new', the class is actually called that, I was just trying to clean up the manifest a bit and forgot to do the same in the nodes section. On 06/20/2013 01:22 PM, Phil Gardner wrote: > nodes.pp: > > node /^testserver-.*/ { > $centos_version = '6.4' > $updates_enable

Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes

2013-06-20 Thread Phil Gardner
nodes.pp: node /^testserver-.*/ { $centos_version = '6.4' $updates_enabled = '1' include yum_new } -- modules/yum/manifests/init.pp: class yum { file { 'CentOS-Base.repo': mode=> '0644', owner => 'root', group => 'root', path=> '/etc/yum.repos.d/CentOS-Base.r

Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes

2013-06-20 Thread Dan White
What's the manifest for the file resource, please ? Could be any number of things “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) - Original Message - From: "Phil G

[Puppet Users] Templates modified on puppetmaster but clients not seeing changes

2013-06-20 Thread Phil Gardner
Has anyone experienced this before? The template works fine and creates the file no problem if the file doesn't exist, but it will not change the file if I modify the template. My google-fu has come up short. Using 2.7.17. -- _ Phil Gardner PGP Key ID 0xFECC890C OTR Fingerp

Re: [Puppet Users] The handy Grail of Modules Standards

2013-06-20 Thread Alessandro Franceschi
On Thursday, June 20, 2013 4:12:46 PM UTC+2, jcbollinger wrote: > > > > On Wednesday, June 19, 2013 5:34:58 PM UTC-5, Alessandro Franceschi wrote: >> >> >> >> On Wednesday, June 19, 2013 5:03:41 PM UTC+2, jcbollinger wrote: >>> >>> >>> Call me "experienced", "jaded", or even "cynical", but I know

Re: [Puppet Users] Re: Executing puppet crash the machine

2013-06-20 Thread Montse Seisdedos
Hello group: We eventually performed the test John suggested and we caught the "thief" -> virtual.rb We didn't even try to analyze why it is hanging the machine. Due to the fact that this facter is not being used in ours recipes we just dropped it out. Thanks for you help. On Wednesday, Nov

Re: [Puppet Users] Set environment variable that is visible to package installation

2013-06-20 Thread Nikola Petrov
You can get the environment variable from puppet.conf or if it is another variable, you can use facter. As long as you are controlling your packages you can check those after that. -- Nikola On Wed, Jun 19, 2013 at 10:08:46AM -0700, Kevin Lange wrote: > We have RPMs which requires an environment

Re: [Puppet Users] The handy Grail of Modules Standards

2013-06-20 Thread jcbollinger
On Wednesday, June 19, 2013 5:34:58 PM UTC-5, Alessandro Franceschi wrote: > > > > On Wednesday, June 19, 2013 5:03:41 PM UTC+2, jcbollinger wrote: >> >> >> Call me "experienced", "jaded", or even "cynical", but I know of too many >> instances of vaporware to be swayed by promises of software th

Re: [Puppet Users] File directive

2013-06-20 Thread Matthew Burgess
On 20 June 2013 14:49, Roman Alekseev wrote: > > What about a facter something like this: > > # nginx.rb > > Facter.add("nginx") do > setcode do > Facter::Util::Resolution.exec(**'/usr/bin/dpkg -l | /bin/grep -c > nginx') > end > end > > A fact for something like that seems a bit over th

Re: [Puppet Users] File directive

2013-06-20 Thread Roman Alekseev
On 20.06.2013 17:46, Martin Alfke wrote: this case the file resource will only be managed if the package resource has been defined. This does not mean, that the package has been installed successfully! For this option you have to add require => Package['nginx'], to your file resource. Thank

Re: [Puppet Users] File directive

2013-06-20 Thread Martin Alfke
Hi Roman, you can check for a defined package resource if defined(Package['nginx']) { file { …… } } In this case the file resource will only be managed if the package resource has been defined. This does not mean, that the package has been installed successfully! For this option you have to a

[Puppet Users] 2.7 Dynamic scoping warnings - which way should I jump?

2013-06-20 Thread Dick Davies
We just bumped up our master from 2.6 to 2.7 to get yesterdays security fix, and I'm trying to clean up the Dynamic warnings ready to push on to 3.x. I've read http://docs.puppetlabs.com/guides/scope_and_puppet.html but can't see a good alternative for a pattern we use to allow tuneable settings

[Puppet Users] File directive

2013-06-20 Thread Roman Alekseev
Hi Everyone, Is it possible to use File directive only if some software is installed, otherwise do nothing? For example: file { "/tmp/puppet-nginx-init.sh": ensure => "present", owner => "root", group

Re: [Puppet Users] Re: PuppetDB queries using custom facts

2013-06-20 Thread David Schmitt
Perhaps you have still an agent running who has loaded an older facter version? The default expiration of nodes in puppetdb should be in the order of days, if it is even enabled by default. Regards, D. On 20.06.2013 10:19, Alexander Grushin wrote: Interesting... This fact returned using P

[Puppet Users] Re: PuppetDB queries using custom facts

2013-06-20 Thread Alexander Grushin
Interesting... This fact returned using PuppetDB API query only after I run puppet agent -t manually. I believe this fact should appear after usual puppet agent daemon run (every 10 minutes), but it doesn't. And what is more interesting - those entries disappear after a while. Looks like some

Re: [Puppet Users] PuppetDB queries using custom facts

2013-06-20 Thread Alexander Grushin
Yep, this was a cause. Great! Thanks, David! On Thursday, June 20, 2013 10:56:50 AM UTC+4, David Schmitt wrote: > > Hi, Alexander, > > "environment" is a special variable. It denotes the puppet environment > that is used by the puppetmaster to multiplex into different module > directories. Whi