Re: [Puppet Users] Custom Facts

2012-08-09 Thread Denmat
As I think has been mentioned, use :confine to limit on which node this fact is listed. All facts are distributed to all nodes. Cheers On 09/08/2012, at 15:21, Yaniv Fine yanivf...@gmail.com wrote: In general . I am trying to parse a variable i have in a file in few of my servers and add it

AW: [Puppet Users] Switching agent to another environment does not work

2012-08-09 Thread Bernd Adamowicz
Well, I simply left the agent idling tonight and by some voodoo this morning it's connected to the new environment. But to answer your questions: Yes, I had a puppet.conf in place which also pointed to the correct server and the new environment. Strange. Thanks for helping! Bernd

Re: [Puppet Users] exec executes remote command but the actual script not run

2012-08-09 Thread duckegg01
Hi Peter I managed to get this working by have the cwd in place, but im interested in your point with regards to setting up the dependency any chance you can provide an example of this based on what I have at present. On Wednesday, August 8, 2012 5:29:06 PM UTC+1, pmbuko wrote: On Aug 8,

[Puppet Users] Using regex in Puppet node definition

2012-08-09 Thread James Fraser
I have a nodes-operational.pp with various nodes defined. I would like to define a node using a regular expression like so: /^dev-[^\s]*(?!geoserver)$/ That is, I would like to use the above expression to resolve nodes which are prefixed with 'dev', but do not end with 'geoserver'. This

AW: [Puppet Users] Using regex in Puppet node definition

2012-08-09 Thread Bernd Adamowicz
I'm not an expert in regular expression. But if I run into problems like this one, I always turn to this page: http://www.regexplanet.com/advanced/java/index.html Has always helped me. Bernd -Ursprüngliche Nachricht- Von: puppet-users@googlegroups.com [mailto:puppet-

Re: [Puppet Users] Custom Facts

2012-08-09 Thread Dan White
On Aug 9, 2012, at 4:46 AM, Denmat wrote: As I think has been mentioned, use :confine to limit on which node this fact is listed. All facts are distributed to all nodes. Cheers Would this include local facts created with puppetlabs-stdlib:/etc/facter/facts.d ? Or are you referring to

Re: [Puppet Users] Using regex in Puppet node definition

2012-08-09 Thread Dan White
On Aug 9, 2012, at 5:23 AM, Bernd Adamowicz wrote: I'm not an expert in regular expression. But if I run into problems like this one, I always turn to this page: http://www.regexplanet.com/advanced/java/index.html Has always helped me. Bernd Very nice tool page. Thanks for that link.

Re: [Puppet Users] Using regex in Puppet node definition

2012-08-09 Thread Martin Willemsma
Hi! In addition to Bernds link. That page is applicable to Java, there is also a page to test your Ruby regex: I like this one: http://rubular.com/ Martin 2012/8/9 Dan White y...@comcast.net On Aug 9, 2012, at 5:23 AM, Bernd Adamowicz wrote: I'm not an expert in regular expression. But

Re: [Puppet Users] exec executes remote command but the actual script not run

2012-08-09 Thread Peter Bukowinski
Adding this parameter to your file resource, notify = Exec['Deploy Code'], and these parameters to your exec resource, require= File['/var/tmp/deploy.tar'], refreshonly = true, will create the appropriate dependency. Basically, it makes sure the file resource must run before

Re: [Puppet Users] Using regex in Puppet node definition

2012-08-09 Thread jcbollinger
On Thursday, August 9, 2012 7:07:34 AM UTC-5, mawi wrote: Hi! In addition to Bernds link. That page is applicable to Java, there is also a page to test your Ruby regex: I like this one: http://rubular.com/ Yes, I think that's more apropos in this context. To my knowledge, Puppet

[Puppet Users] Re: Symbolic Link directory of files

2012-08-09 Thread jcbollinger
On Wednesday, August 8, 2012 5:56:42 PM UTC-5, Allen wrote: Is there a way to symbolically link files from one directory into another inside of Puppet? I did this: /opt/openerp/server/openerp/addons/: owner = openerp, group = admin, links = manage,

[Puppet Users] Foreman 1.0.1 Released

2012-08-09 Thread Ohad Levy
Hi All, I'm happy to release another version of foreman, this time, a bit less exciting. This is a maintenance release for 1.0 version, that contain only the following bugs fixes: Bug #1543: Imported host, could not edit host as domain was not set. Bug #1750: Editor adds a spare at line 1

Re: [Puppet Users] Using ENC with existing node definitions

2012-08-09 Thread RILINDO FOSTER
Fair enough. I looked at the docs again after I sent the email and yes, looks like I can, with some caveats. Thanks! On Aug 8, 2012, at 11:45 PM, Ryan Coleman r...@puppetlabs.com wrote: On Wed, Aug 8, 2012 at 6:18 PM, Foster Rilindo rili...@mac.com wrote: I currently have puppet configured

Re: [Puppet Users] puppet on Xen Server

2012-08-09 Thread vioilly
Hi, I am also looking at getting puppet on xenserver I used this repo http://centos.karan.org/el5/ruby187/i386/ and ran wget on each of the 5 rpms and then used rpm -i not a pretty way of doing things but I do have ruby installed now, then same as martin. However hitting brick walls with yum

Re: [Puppet Users] Re: Tag Negation

2012-08-09 Thread Douglas Garstang
Well that sucks, On Wed, Aug 8, 2012 at 4:53 PM, Peter Brown rendhal...@gmail.com wrote: I don't think the tag system was designed to be used like that. Have you checked all the docs? On 9 August 2012 01:19, Douglas Garstang doug.garst...@gmail.com wrote: Anyone? Anyone? Sent from my

Re: [Puppet Users] puppet on Xen Server

2012-08-09 Thread Martin Willemsma
I install and upgrade puppet from gems gem install puppet --no-rdoc --no-ri 2012/8/9 vioilly oliverle...@gmail.com Hi, I am also looking at getting puppet on xenserver I used this repo http://centos.karan.org/el5/ruby187/i386/ and ran wget on each of the 5 rpms and then used rpm -i not

[Puppet Users] Running apt-get update on package install

2012-08-09 Thread Douglas Garstang
I'm on Ubuntu, and I wanted to always have 'apt-get update' run before attempting to install packages, so I put this in my top level site.pp file: exec { 'refresh-repos': command = '/usr/bin/apt-get update'; } Package { require = Exec['refresh-repos'] } However, that causes a

Re: [Puppet Users] Running apt-get update on package install

2012-08-09 Thread Nigel Kersten
On Thu, Aug 9, 2012 at 10:10 AM, Douglas Garstang doug.garst...@gmail.com wrote: I'm on Ubuntu, and I wanted to always have 'apt-get update' run before attempting to install packages, so I put this in my top level site.pp file: exec { 'refresh-repos': command = '/usr/bin/apt-get

[Puppet Users] Hiera relationships

2012-08-09 Thread Wolf Noble
I was asleep, and woke up thinking about a way to define a relationship between the hiera parameters of multiple modules such that conflicts could be avoided... The thought process was that if I set one value, say, the service enablement parameter for snmp to 'stopped' in my tripwire module,

[Puppet Users] Re: Puppet Master Forbidding Access to Cert Revocation List

2012-08-09 Thread kp-v
I don't think there is an issue with my configuration. I believe I am running into issues with indirector.rb not finding the correct terminus for my certificate revocation list. On Wednesday, August 8, 2012 10:21:05 AM UTC-7, kp-v wrote: Hey folks; I am having issues retrieving the catalog

[Puppet Users] Class using if/else w/ multiple if conditions

2012-08-09 Thread BeastMode
I created a custom fact that determines what class of server it is based off the first 3 letters of the hostname: tst, qa, stg, prd, dev The fact tested fine and shows in the list when running facter -p. I wanted to use the fact in a class to determine if zabbix-agent should be removed or

[Puppet Users] Puppet apply err: Could not prefetch keystone_user provider 'keystone'

2012-08-09 Thread Shannon McFarland
On a new puppet master node I get this error on a puppet apply for an OpenStack multi-node setup. This is a new one I have never seen before. Tips? debug: Prefetching keystone resources for keystone_user err: Could not prefetch keystone_user provider 'keystone': File:

[Puppet Users] Error 400 on Server: Another local or imported resource exists with the type and title Sshkey

2012-08-09 Thread banjer
I am attempting to remove an old ssh host key from /etc/ssh/ssh_known_hosts. In my manifest, I have the following: # add keys @@sshkey { $hostname: ensure = present, type = rsa, key = $sshrsakey, } # remove key @@sshkey { foohost: ensure = absent, type = rsa, } Sshkey | |

Re: [Puppet Users] Puppet apply err: Could not prefetch keystone_user provider 'keystone'

2012-08-09 Thread Dan Bode
On Thu, Aug 9, 2012 at 12:13 PM, Shannon McFarland shmcf...@gmail.comwrote: On a new puppet master node I get this error on a puppet apply for an OpenStack multi-node setup. This is a new one I have never seen before. Tips? This is pretty specific to the puppet/openstack integration. There

[Puppet Users] how to resolve hostnames to IP addresses in templates

2012-08-09 Thread Tim Mooney
Environment: puppet 2.7.14 on both master and all clients. We're also using puppetlabs-stdlib and hiera, if that matters. I know this is really more of a ruby/erb question, but I've been searching for a couple hours and haven't turned up anything relatively close to what I'm trying to do, and

[Puppet Users] Re: Accessing a fileserver file from a custom function

2012-08-09 Thread j4m3s
I only just noticed this, but I was actually modifying your gist KW to add the puppet:/// parsing. I've forked it but can't see how to create a pull-request for it (I'm fairly new to gihub I'm afraid). Anyway, for anyone else wanting the function I've posted it here:

Re: [Puppet Users] Re: Accessing a fileserver file from a custom function

2012-08-09 Thread Nan Liu
On Thu, Aug 9, 2012 at 1:45 PM, j4m3s mrfell...@gmail.com wrote: I only just noticed this, but I was actually modifying your gist KW to add the puppet:/// parsing. I've forked it but can't see how to create a pull-request for it (I'm fairly new to gihub I'm afraid). Anyway, for anyone else

[Puppet Users] Re: Puppet apply err: Could not prefetch keystone_user provider 'keystone'

2012-08-09 Thread Shannon McFarland
I am running 2.7.11 and the error shows up on the puppet master during the puppet apply and also any agent on the polling update (except the openstack controller). I will email the other alias so we track this appropriately. Thanks, Shannon On Thursday, August 9, 2012 1:13:51 PM UTC-6,

[Puppet Users] Re: Error 400 on Server: Another local or imported resource exists with the type and title Sshkey

2012-08-09 Thread kp-v
Does $hostname ever get set to $hostname in the add key section ? Also, can you show the results of: puppet resource sshkey foohost On Thursday, August 9, 2012 1:32:40 PM UTC-7, banjer wrote: I am attempting to remove an old ssh host key from /etc/ssh/ssh_known_hosts. In my manifest, I

Re: [Puppet Users] Running apt-get update on package install

2012-08-09 Thread Denmat
On 10/08/2012, at 3:20, Nigel Kersten ni...@puppetlabs.com wrote: On Thu, Aug 9, 2012 at 10:10 AM, Douglas Garstang doug.garst...@gmail.com wrote: I'm on Ubuntu, and I wanted to always have 'apt-get update' run before attempting to install packages, so I put this in my top level site.pp

Re: [Puppet Users] Re: Accessing a fileserver file from a custom function

2012-08-09 Thread j4m3s
This seems to use the same Puppet::Module.find function that yours did - the only difference I can see is that he gets the environment using compiler.environment.to_s instead of Puppet[:environment] - is that the improved generic part you're referring to? On Thursday, August 9, 2012

Re: [Puppet Users] how to resolve hostnames to IP addresses in templates

2012-08-09 Thread Wolf Noble
if you're using hiera, why not something like: foo_data_webfarm_http_servers: foo1.example.com: { ip: '1.2.3.4', port: '80', } foo2.example.com: { ip: '2.3.4.5', port: '80', } foo_data_webfarm_https_servers: foo1.example.com: { ip: '1.2.3.4', port: '443', }

Re: [Puppet Users] puppet on Xen Server

2012-08-09 Thread vioilly
ok.. so (roughly) here's what I did to get the puppet client to install on xenserver Installed ruby from this repo http://centos.karan.org/el5/ruby187/i386/ you need these rpms installed for ruby rpm -qa | grep ruby ruby-libs-1.8.7.299-4.el5.kb ruby-irb-1.8.7.299-4.el5.kb

[Puppet Users] Re: Error 400 on Server: Another local or imported resource exists with the type and title Sshkey

2012-08-09 Thread jcbollinger
On Thursday, August 9, 2012 3:32:40 PM UTC-5, banjer wrote: I am attempting to remove an old ssh host key from /etc/ssh/ssh_known_hosts. In my manifest, I have the following: # add keys @@sshkey { $hostname: ensure = present, type = rsa, key = $sshrsakey, } # remove key

[Puppet Users] Reporting to Dashboard on XP node

2012-08-09 Thread Josh Shabtai
Hi, We set up Dashboard a month or two ago, running on our Puppet master (a Debian server). All of our machines are running puppet just fine, but one of them, an XP machine (the software we're running doesn't work on server 2003 for some reason), doesn't seem to be sending reports to

Re: [Puppet Users] how to resolve hostnames to IP addresses in templates

2012-08-09 Thread jcbollinger
On Thursday, August 9, 2012 4:18:17 PM UTC-5, Wolf Noble wrote: if you're using hiera, why not something like: foo_data_webfarm_http_servers: foo1.example.com: { ip: '1.2.3.4', port: '80', } [...] Because that duplicates the data, which you then need to keep

[Puppet Users] Announce: PuppetDB 0.10.0 Available

2012-08-09 Thread Matthaus Litteken
PuppetDB 0.10.0 is the fourth beta release on the road to 1.0. Changes include new features and bug fixes. For details on changes in this release, please see the release notes below. # Downloads Available in native package format at http://yum.puppetlabs.com http://apt.puppetlabs.com Source

[Puppet Users] Re: Class using if/else w/ multiple if conditions

2012-08-09 Thread jcbollinger
On Thursday, August 9, 2012 2:10:46 PM UTC-5, BeastMode wrote: I created a custom fact that determines what class of server it is based off the first 3 letters of the hostname: tst, qa, stg, prd, dev The fact tested fine and shows in the list when running facter -p. I wanted to use

[Puppet Users] Re: how to resolve hostnames to IP addresses in templates

2012-08-09 Thread Jenner La Fave
There's no way to do DNS lookups in a template with stock Puppet, but you can pretty easily write a custom function to do that for you. By default, Resolv will use the settings in /etc/resolv.conf, so as long as your nameservers are set up correctly on the puppetmaster, you shouldn't run into

Re: [Puppet Users] Hiera relationships

2012-08-09 Thread Dan White
Wow. My next reaction is, Are you sure you woke up ? But then I am a known and convicted joker and a registered paronomasiac [1]. In an effort to make a serious response: I feel you may be using the wrong tool for the job. If, as in your example, snmp and tripwire are interrelated, that

Re: [Puppet Users] how to resolve hostnames to IP addresses in templates

2012-08-09 Thread Tim Mooney
In regard to: Re: [Puppet Users] how to resolve hostnames to IP addresses...: if you're using hiera, why not something like: foo_data_webfarm_http_servers: foo1.example.com: { ip: '1.2.3.4', port: '80', } foo2.example.com: { ip: '2.3.4.5', port: '80', }

Re: [Puppet Users] Re: how to resolve hostnames to IP addresses in templates

2012-08-09 Thread Tim Mooney
In regard to: [Puppet Users] Re: how to resolve hostnames to IP addresses...: There's no way to do DNS lookups in a template with stock Puppet, Thanks for confirming what my futile research seemed to be implying. :-) but you can pretty easily write a custom function to do that for you. By

Re: [Puppet Users] how to resolve hostnames to IP addresses in templates

2012-08-09 Thread Wolf Noble
On Aug 9, 2012, at 5:42 PM, Tim Mooney tim.moo...@ndsu.edu wrote: In regard to: Re: [Puppet Users] how to resolve hostnames to IP addresses...: if you're using hiera, why not something like: […] heh yeah, okay, so, well, uh... I didn't say it was a GOOD idea ;) Thanks for the

Re: [Puppet Users] Hiera relationships

2012-08-09 Thread Wolf Noble
On Aug 9, 2012, at 5:15 PM, Dan White y...@comcast.net wrote: Wow. My next reaction is, Are you sure you woke up ? But then I am a known and convicted joker and a registered paronomasiac [1]. Nope ;) In an effort to make a serious response: I feel you may be using the wrong tool for

[Puppet Users] hiera peers

2012-08-09 Thread Wolf Noble
I wonder… Would there be a benefit in the notion of 'peer values' in hiera? Currently hiera_array will collect all the possible values for $thing defined all the way up the hierarchy… This js awesome. But there's no way to find out the values of $thing for other nodes at the same level in the

[Puppet Users] hiera scope and hiera-foreman

2012-08-09 Thread Christian McHugh
Hey all, I've been messing around with the hiera-foreman backend to see if it would let me migrate to hiera and use foreman and an ENC. https://github.com/torrancew/hiera-foreman It works by querying each node's yaml file from foreman. Currently this code works when called from the hiera

Re: [Puppet Users] how to resolve hostnames to IP addresses in templates

2012-08-09 Thread Tim Mooney
In regard to: Re: [Puppet Users] how to resolve hostnames to IP addresses...: Did you choose foo_data_webfarm_http_servers as the top level hiera name for any particular reason, such as how hiera is going to work in puppet 3 with parameterized classes? I have no real knowledge of how that's

[Puppet Users] dashboard under passenger reporting over https not working

2012-08-09 Thread Peter Brown
Hi everyone, I have my puppet master running happily under passenger. To save some ram I recently switched my dashboard over to run under passenger. After a few hickups (basically had to turn off RackBaseURI and turn on RailsAutoDetect) i got it running under https. I noticed today that reports