[Puppet Users] Managing SSH host private keys

2012-01-26 Thread Jonathan Gazeley
Hi all, I already use Puppet to collect and distribute SSH host public keys between machines I manage. I now want to collect private host keys from each node and store them on the puppetmaster, so when I rebuild a node it receives the same key. Is there an easy way of doing this? Thanks, Jo

Re: [Puppet Users] Anyone seeing odd agent behaviour with 2.7.10?

2012-01-26 Thread Jonathan Gazeley
I am seeing the same message printed on each run, on CentOS 6.2. Puppet still works, so it's not critical. Just waiting for a fix :) Jonathan On 26/01/12 12:00, Steph Gosling wrote: Hi all, Upgraded a master and a couple of clients to 2.7.10 and now see the following when running an agent if

Re: [Puppet Users] Managing SSH host private keys

2012-01-26 Thread Jonathan Gazeley
On 26/01/12 15:22, Matt Zagrabelny wrote: I don't know about "easy", but here is what I am doing: Thanks Matt, that's helpful. This addresses how to distribute keys to node from the fileserver, but I wonder if there is a mechanism where if the key doesn't exist on the fileserver, the key tha

Re: [Puppet Users] Managing SSH host private keys

2012-01-26 Thread Jonathan Gazeley
On 26/01/12 16:02, Matt Zagrabelny wrote: On Thu, Jan 26, 2012 at 9:35 AM, Jonathan Gazeley wrote: On 26/01/12 15:22, Matt Zagrabelny wrote: I don't know about "easy", but here is what I am doing: Thanks Matt, that's helpful. This addresses how to distribute k

[Puppet Users] extdata from MySQL

2012-04-26 Thread Jonathan Gazeley
There doesn't seem to be much information about this on the web, but is it possible to use MySQL as a backend for handling extdata? It would be enormously easier for me to use a database that could be easily updated rather than csv files that live on the puppet master. Cheers, Jonathan -- Yo

[Puppet Users] The best way to access this node data

2012-05-09 Thread Jonathan Gazeley
I have a MySQL database table that effectively holds key-value pairs which link each node to its parent (ESXi hypervisor). I want to use this information to set the Nagios parent, which is easy to do, client-side. I'm not sure what the best approach is. I considered writing a custom fact that

Re: [Puppet Users] Exported resources for DNS and DHCP

2011-06-24 Thread Jonathan Gazeley
On 06/09/2011 06:46 PM, Daniel Pittman wrote: On Thu, Jun 9, 2011 at 07:40, Jonathan Gazeley wrote: I haven't used exported resources before, and I'm finding it a little confusing. Basically I want Puppet to know which of the servers have the DNS servers class applied to them, so

[Puppet Users] IP address evenness as an identifier

2011-06-24 Thread Jonathan Gazeley
For my puppet-managed servers, I want roughly half to use nameserver1 followed by nameserver2, and the other half to use nameserver2 in preference to nameserver1. The most reliable and simplest way I can think of doing this is to look at the last octet of the IP address, test whether it is eve

[Puppet Users] Importing RPM private signing keys

2011-07-06 Thread Jonathan Gazeley
.rpmmacros file in their home dir, and the file needs to be different for each person. The content should be like this: %_topdir %(echo $HOME)/rpmbuild %_smp_mflags -j3 %__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot %_signature gpg %_gpg_name ResNet %pa

[Puppet Users] Dynamic including in templates

2011-07-06 Thread Jonathan Gazeley
I have a puppet class called dhcp which sets up the daemon and installs a base dhcpd.conf. I have also have subclasses like dhcp::pool1, dhcp::pool2 which install other files with DHCP code snippets to provide DHCP to different subnets with different address pools. The manifest for these looks

Re: [Puppet Users] Dynamic including in templates

2011-07-06 Thread Jonathan Gazeley
06/07/11 14:56, Ken Barber wrote: Try: <% if includernw == 1 %> include "/etc/dhcp/dhcpd.rnw";<% end %> Note the '==' :-). ken. On Wed, Jul 6, 2011 at 2:45 PM, Jonathan Gazeley wrote: I have a puppet class called dhcp which sets up the daemon and installs a base

Re: [Puppet Users] Dynamic including in templates

2011-07-07 Thread Jonathan Gazeley
Hi James, Thanks very much - this worked. As a side effect, I learned a little about how ruby works, too. I'd just like to add that the puppet-users list is one of the more friendly and helpful lists I subscribe to :) Cheers, Jonathan On 07/06/2011 04:47 PM, James Fryman wrote: Hi Jonathan

[Puppet Users] Notify/Require in config tests

2011-08-15 Thread Jonathan Gazeley
Hi all, I'm trying to set up a routine in puppet where if a service is scheduled for a restart, eg because of new configs, then a config test is executed first. If the config test fails, the service is not restart (and so keeps running with the old config, rather than stopping and causing an

[Puppet Users] Nagios hostgroups

2011-08-15 Thread Jonathan Gazeley
Hi all, I'm using various exported resources for Nagios, including @@nagios_host, @@nagios_service and others. Elsewhere in my manifest I am using all of these commands to realise the resources on my Nagios server. All of these commands work fine except for Nagios_hostgroup which does not pr

Re: [Puppet Users] Notify/Require in config tests

2011-08-16 Thread Jonathan Gazeley
rces, see http://docs.puppetlabs.com/guides/language_guide.html#chaining-resources See this for a complete overview: http://docs.puppetlabs.com/learning/ordering.html Cheers, Den On 15/08/2011, at 23:29, Jonathan Gazeley wrote: Hi all, I'm trying to set up a routine in puppet whe

Re: [Puppet Users] Nagios hostgroups

2011-08-16 Thread Jonathan Gazeley
uppetlabs.com/guides/exported_resources.html You will need to include more detail for further help, like version of puppet and a snippet of how you are realizing them. Do any other exported resources work in your manifest? Cheers, Den On 16/08/2011, at 2:08, key...@gmail.com wrote: Sent from my

Re: [Puppet Users] Circular RPM dependencies...

2011-08-19 Thread Jonathan Gazeley
Is it possible to force use of the yum backend for package removals like this? package { ['aspell', 'aspell-en']: ensure => absent, provider => 'yum', } I'm not near a puppet machine to test this, but it's probably worth a shot. Cheers, Jonathan On 18/08/11 23:56, Jakov Sosic wrote: Hi

[Puppet Users] Requiring types in other classes

2011-08-24 Thread Jonathan Gazeley
Hi, Sorry if this is a basic question, but I can't find the answer in the docs. I know about fully-qualified variables, but how can I reference a type that is defined in a different class, so I can require/subscribe it? In this simple example, what's the right syntax for making goodbye.txt r

Re: [Puppet Users] Requiring types in other classes

2011-08-24 Thread Jonathan Gazeley
On 24/08/11 11:13, Martin Alfke wrote: On 08/24/2011 11:54 AM, Jonathan Gazeley wrote: Hi, Sorry if this is a basic question, but I can't find the answer in the docs. I know about fully-qualified variables, but how can I reference a type that is defined in a different class, so I can re

Re: [Puppet Users] Re: Requiring types in other classes

2011-08-24 Thread Jonathan Gazeley
On 24/08/11 14:09, jcbollinger wrote: On Aug 24, 4:54 am, Jonathan Gazeley wrote: Hi, Sorry if this is a basic question, but I can't find the answer in the docs. I know about fully-qualified variables, but how can I reference a type that is defined in a different class, so I can re

Re: [Puppet Users] migrating to new puppet servers

2011-08-31 Thread Jonathan Gazeley
On 26/08/11 03:12, Nan Liu wrote: On Thu, Aug 25, 2011 at 1:31 PM, Roy Nielsen wrote: Hello, We need to migrate ~3000 machines to a new puppet server. What is the recommended method of doing this, considering the cert issues? Not much, just make sure you generate a cert for the new puppet m

[Puppet Users] Foreach loop?

2011-09-29 Thread Jonathan Gazeley
Hi all, One of my facter variables returns an array of disks presently connected to the system. I want to have something in my manifest that loops around the array and adds a Nagios check for each disk. In perlish pseudocode, I imagine something like this: @disks = sda,sdb,sdc foreach $disk

[Puppet Users] Custom facts not working

2011-10-03 Thread Jonathan Gazeley
Hi all, I'm experiencing some difficulty getting custom facts to run. I've installed them on the puppetmaster in: ${modulepath}/${module}/lib/facter/*.rb and from there they appear to be copied properly onto the clients, where they end up in: /var/lib/puppet/lib/facter/*.rb On all clients

Re: [Puppet Users] Custom facts not working

2011-10-03 Thread Jonathan Gazeley
On 03/10/11 11:14, Stefan Schulte wrote: On Mon, Oct 03, 2011 at 11:00:18AM +0100, Jonathan Gazeley wrote: Hi all, I'm experiencing some difficulty getting custom facts to run. I've installed them on the puppetmaster in: ${modulepath}/${module}/lib/facter/*.rb and from there they

Re: [Puppet Users] Custom facts not working

2011-10-03 Thread Jonathan Gazeley
On 03/10/11 14:24, Todd Zullinger wrote: Stefan Schulte wrote: I guess facter as a standalone executable doesn't look into /var/lib/puppet. Try running FACTERLIB=/var/lib/puppet/lib/facter facter as described in the custom facts guide [1] [1] http://docs.puppetlabs.com/guides/custom_fact

Re: [Puppet Users] Re: Official puppetlabs position on cron vs puppet as a service?

2011-10-10 Thread Jonathan Gazeley
On 08/10/11 21:22, Chris Phillips wrote: What better way to monitor the puppet runs than by executing that run as part of the check? I assume your Nagios plugin execution timeout must be insanely long? :) In the past I have considered using Nagios for things other than monitoring, and likewis

[Puppet Users] Best practice for SELinux overrides

2012-01-06 Thread Jonathan Gazeley
I manage quite a few CentOS 6 servers with puppet, and I want to start using puppet-selinux[1] to enable/disable it. My "common" node class, inherited by all servers, should say that all servers run SELinux in enforcing mode. But on one or two servers I want to run in permissive mode for vario

Re: [Puppet Users] Best practice for SELinux overrides

2012-01-06 Thread Jonathan Gazeley
nux in enforcing by default, unless explicitly specified otherwise. Is this possible? Thanks, Jonathan On 06/01/12 09:38, Jonathan Gazeley wrote: I manage quite a few CentOS 6 servers with puppet, and I want to start using puppet-selinux[1] to enable/disable it. My "common" node class

[Puppet Users] puppet-selinux

2012-01-09 Thread Jonathan Gazeley
Hi all, I'm having some problems working with puppet-selinux[1] I've successfully deployed the module in nodes.pp and got it to set various SELinux modes, by using class { selinux: mode => 'permissive' } or class { selinux: mode => 'enforcing' } Now I want to load a custom SELinux policy f

Re: [Puppet Users] puppet-selinux

2012-01-09 Thread Jonathan Gazeley
Just to provide the list archives with some closure, this was tracked down to be a bug in the puppet-selinux module, which the developer has now fixed. This is no longer an issue :) Cheers, Jonathan On 09/01/12 11:37, Jonathan Gazeley wrote: Hi all, I'm having some problems working

[Puppet Users] Problem loading custom modules

2011-01-07 Thread Jonathan Gazeley
t on the client, no errors are thrown but it is not able to import the ntp module. Have I missed something? Can anyone point out an obvious mistake? Many thanks, Jonathan Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services Un

Re: [Puppet Users] Re: Problem loading custom modules

2011-01-10 Thread Jonathan Gazeley
nodes.pp. So it looks like my puppetmaster isn't correctly picking up my modulepath. Any ideas? Also, is there a way to get more verbose logging on the puppetmaster? Currently I only have masterhttp.log, but I would like to enable debug logging to see everything the puppetmaster is doin

Re: [Puppet Users] Re: Problem loading custom modules

2011-01-10 Thread Jonathan Gazeley
--pidfile=/var/run/puppet/master.debug.pid That way, you get a second puppetmaster on another port, and can query it from your clients using $ puppetd --test --noop --masterport 8141 Thank you, that's an excellent idea. HTH, Felix Cheers, Jonathan --

Re: [Puppet Users] Re: Problem loading custom modules

2011-01-10 Thread Jonathan Gazeley
e nodes.pp is in the same dir as site.pp. Thanks, Jonathan -- Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services University of Bristol -- You received this message because you are subscribed to the Google Groups "

Re: [Puppet Users] Re: Problem loading custom modules

2011-01-10 Thread Jonathan Gazeley
r node to see if your module and resources are there. Like Felix, an import of "nodes" seems is strange to me - maybe Puppet will implicitly add a .pp extension for files in the CWD? You should not need to explicitly import your module manifests, using include and Puppet with a corre

Re: [Puppet Users] Re: Problem loading custom modules

2011-01-10 Thread Jonathan Gazeley
rfectly. Cheers, Jonathan -- -------- Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services University of Bristol -- You received this message because you are subscribed to the Google Groups "Puppet Users

Re: [Puppet Users] Re: Problem loading custom modules

2011-01-10 Thread Jonathan Gazeley
On 10/01/11 16:33, Felix Frank wrote: On 01/10/2011 05:30 PM, Jonathan Gazeley wrote: On 10/01/11 16:20, Felix Frank wrote: Hauling out the big guns boils down to (for me): strace -e trace=file -f puppet master --no-daemonize ... 2>&1 | grep ntp That should eventually spit a few stat

Re: [Puppet Users] Do we need a new name for "--test"?

2011-01-24 Thread Jonathan Gazeley
Cheers, Adam. How about simply --once ? Nice and quick to type. Jonathan -- ---- Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services University of Bristol -- You received this message because you are su

[Puppet Users] Check version of installed RPM

2011-01-24 Thread Jonathan Gazeley
installed. I do not necessarily wish to ensure it is upgraded, etc. I know it's possible to do this with an exec call to rpm or yum, but I want to do it "properly" :) [1] http://docs.puppetlabs.com/guides/types/package.html Cheers, Jonathan ----

Re: [Puppet Users] Check version of installed RPM

2011-01-24 Thread Jonathan Gazeley
On 24/01/11 13:31, Felix Frank wrote: On 01/24/2011 02:07 PM, Jonathan Gazeley wrote: Hi all, Is there a way to use the Package type to find the version number of an installed RPM? I've consulted this page [1] and I can't see any documentation there that says this might be possibl

Re: [Puppet Users] Check version of installed RPM

2011-01-24 Thread Jonathan Gazeley
puppet type" to similarly obtain information? like get the size of a file, using File type? Thanks, Mohamed. On Mon, Jan 24, 2011 at 9:15 AM, Jonathan Gazeley wrote: On 24/01/11 13:31, Felix Frank wrote: On 01/24/2011 02:07 PM, Jonathan Gazeley wrote: Hi all, Is there a way to use the Pa

[Puppet Users] Stored configs in MySQL

2011-02-10 Thread Jonathan Gazeley
d_Configuration -- ---- Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services University of Bristol -- You received this message because you are subscribed to the Google Groups "Puppet Users" group

Re: [Puppet Users] CPAN provider

2011-02-18 Thread Jonathan Gazeley
etting Perl modules onto systems. Jonathan Beckman From one Jonathan to another... Cheers, Jonathan Jonathan Gazeley Systems Specialist ResNet | Wireless & VPN Team IT Services University of Bristol -- You received this message

Re: [Puppet Users] provisioning bare metal (best practices)

2011-02-22 Thread Jonathan Gazeley
. Cheers, Jonathan -------- Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services University of Bristol On 22/02/11 15:47, David Kavanagh wrote: I'm about to start playing with Kickstart. I never really had to provision ba

Re: [Puppet Users] provisioning bare metal (best practices)

2011-02-23 Thread Jonathan Gazeley
to the PXE server, our CentOS mirror and the puppet server, so it doesn't really matter if someone else did get one of the IPs. -- ---- Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services University of Bristol -

[Puppet Users] Disable masterhttp.log

2011-03-30 Thread Jonathan Gazeley
I've got sufficient logging for my needs being written to /var/log/puppet/puppet.log On top of this, there's also /var/log/puppet/masterhttp.log which contains loads of stuff, and is getting large. Is there an easy way to disable this log file? I've had a quick search around but I can't see a

[Puppet Users] Puppet nagios integration problem

2011-04-04 Thread Jonathan Gazeley
Hi all, I'm working on setting up Puppet to write out my Nagios configs. A few weeks back I inserted a few dummy Nagios checks into my Puppet config, and the Nagios configs were written out properly. I've now added loads of Nagios host and service checks like this: @@nagios_service { "check_

Re: [Puppet Users] Puppet nagios integration problem

2011-04-04 Thread Jonathan Gazeley
On 04/04/2011 12:09 PM, FRLinux wrote: On Mon, Apr 4, 2011 at 11:37 AM, Jonathan Gazeley wrote: Can anyone offer any pointers? Go to the one of the clients, then run: puppetd -vt and take a look at the output? Usually a good pointer :) Cheers, Steph Thanks for your reply. Running with -vt

Re: [Puppet Users] Puppet nagios integration problem

2011-04-05 Thread Jonathan Gazeley
On 04/05/2011 08:15 AM, Felix Frank wrote: On 04/04/2011 01:38 PM, Jonathan Gazeley wrote: On 04/04/2011 12:09 PM, FRLinux wrote: On Mon, Apr 4, 2011 at 11:37 AM, Jonathan Gazeley wrote: Can anyone offer any pointers? Go to the one of the clients, then run: puppetd -vt and take a look at

[Puppet Users] Stopping two services at once

2011-05-16 Thread Jonathan Gazeley
lse, } Is it possible to format that like this?: service { "disabledemail": name => ['sendmail', 'exim'], ensure => stopped, enable => false, } Thanks, Jonathan -- Jonathan Gazeley Systems Support Sp

Re: [Puppet Users] Should puppet manage its own client configs?

2011-05-16 Thread Jonathan Gazeley
f the puppetmaster is hard-coded, in our case. Can anyone think of a better way of identifying the puppetmaster, so our manifests will run anywhere, if we decide to make a different machine the puppetmaster? Cheers, Jonathan Jonathan Gazeley Systems Support Specialist R

Re: [Puppet Users] Should puppet manage its own client configs?

2011-05-24 Thread Jonathan Gazeley
On 24/05/11 11:24, Felix Frank wrote: On 05/16/2011 09:14 PM, Jonathan Gazeley wrote: We have configured puppet to manage its own puppet.conf on clients, and to ensure that puppetd is running on all hosts. Hi, maybe I'm being dense, but this doesn't address the original issue, do

[Puppet Users] Exported resources for DNS and DHCP

2011-06-09 Thread Jonathan Gazeley
Hi all, I haven't used exported resources before, and I'm finding it a little confusing. Basically I want Puppet to know which of the servers have the DNS servers class applied to them, so it can use these servers' IP addresses when it generates the DHCP config. This way, if we add or remo

[Puppet Users] Array mapping

2012-07-10 Thread Jonathan Gazeley
Hi all, I'm aware that using a "define" can be used to create multiple resources from a list of items, like this: define print { notify{"the message is: ${name}": } } print{["one", "two", "three"]: } This would be the same as making these resources by hand: notify{"the message is: one":

Re: [Puppet Users] Re: Package install from a URL

2012-09-03 Thread Jonathan Gazeley
Yes, this is correct. But note that rpm can't do dependencies like yum - you will need to install the dependencies by hand using other package{} declarations and use requires=> On 03/09/12 14:36, Mark Roggenkamp wrote: I believe it will work if you change the provider to rpm in this case (pr

[Puppet Users] activerecord and puppet-3.0.0

2012-10-03 Thread Jonathan Gazeley
Yesterday my puppetmaster and nodes got upgraded to puppet-3.0.0. Since then, all puppet runs have been failing with this error: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/indirector/node/active_record: uninitialized constant ActiveReco

Re: [Puppet Users] Re: activerecord and puppet-3.0.0

2012-10-04 Thread Jonathan Gazeley
om passenger, and update the ticket with the output? Thanks!! eric0 On Wednesday, October 3, 2012 2:26:42 AM UTC-7, Jonathan Gazeley wrote: Yesterday my puppetmaster and nodes got upgraded to puppet-3.0.0. Since then, all puppet runs have been failing with this error: Error: Could

Re: [Puppet Users] Re: activerecord and puppet-3.0.0

2012-10-04 Thread Jonathan Gazeley
erested in them by then. Cheers, Jonathan On 04/10/12 12:34, Jonathan Gazeley wrote: Hi Eric, Thanks for your attention on this. Right now I'm not able to run any tests on my puppet master because we were forced to roll it back to 2.7 to restore service. I work at a university, this we

Re: [Puppet Users] Re: activerecord and puppet-3.0.0

2012-10-05 Thread Jonathan Gazeley
On 04/10/12 17:30, Andy Parker wrote: I encountered this issue yesterday when trying to reproduce another issue. I discovered that you need to be using activerecord 3.0.11. Later versions don't seem to work (error with a "stack too deep") and earlier versions don't seem to work (error with "unini

Re: [Puppet Users] Re: activerecord and puppet-3.0.0

2012-10-09 Thread Jonathan Gazeley
.8/puppet/util.rb:500:in `exit_on_fail' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in `execute' /usr/bin/puppet:10 and gem list *** LOCAL GEMS *** json (1.5.1) rake (0.8.7) stomp (1.2.2) Il giorno mercole

[Puppet Users] puppet ca generate --dns-alt-names

2012-10-23 Thread Jonathan Gazeley
I'm trying to generate a CA certificate that will be used on multiple puppet masters, accessed by round robin DNS. The individual nodes have their own hostnames and the round robin name is puppet.resnet.bris.ac.uk or puppet.resnet.bristol.ac.uk (the twin domain name for Bristol university is h

[Puppet Users] Struggling with "define"

2012-11-14 Thread Jonathan Gazeley
I've written a defined type for firewall rules, to abstract it out from the OS, like so: define firewall ($source, $port, $proto) { case $operatingsystem { /Centos|Fedora|Scientific|Debian/: { iptables { $title: proto => $proto, dport => $p

Re: [Puppet Users] Struggling with "define"

2012-11-15 Thread Jonathan Gazeley
On 14/11/12 20:44, Peter Brown wrote: From what the error is telling me it is trying to fine a define called firewallrule but your define is actually called firewall... Sorry, my mistake. The file that contains the define is called firewall.pp, the define is called firewall and the way I am

Re: [Puppet Users] Struggling with "define"

2012-11-15 Thread Jonathan Gazeley
On 15/11/12 11:11, David Schmitt wrote: On 15.11.2012 10:44, Jonathan Gazeley wrote: On 14/11/12 20:44, Peter Brown wrote: From what the error is telling me it is trying to fine a define called firewallrule but your define is actually called firewall... Sorry, my mistake. The file that

Re: [Puppet Users] 'before' and 'require' not working as I expect

2013-01-24 Thread Jonathan Gazeley
On 24/01/13 15:18, Matthew Burgess wrote: On Thu, Jan 24, 2013 at 2:49 PM, wrote: This occurs even with the before => Yumrepo['atomic'] and require = > Package['atomic-release'] lines in place, which is not what I expect. Am I missing a subtlety? I'd be tempted to remove the 'before' paramet

Re: [Puppet Users] Re: 'before' and 'require' not working as I expect

2013-01-25 Thread Jonathan Gazeley
On 25/01/13 00:13, Ellison Marks wrote: Ah, excuse me, I misremembered. The problem was specific to the interaction between package and yumrepo, not package and file. See http://projects.puppetlabs.com/issues/1238. Thanks Ellison for the link. This is exactly what I'm experiencing. I'm now wa

[Puppet Users] Environment design decisions

2013-02-21 Thread Jonathan Gazeley
I've been running puppet for a couple of years without using environments. Now, I manage more servers and I think it's time to implement puppet environments. I have a couple of questions about design best practice. Probably 80% of the modules in use across the various environments would be co

Re: [Puppet Users] Environment design decisions

2013-02-21 Thread Jonathan Gazeley
On 21/02/13 14:16, Craig Dunn wrote: My question is, can I put a module named "httpd" in my common module directory, and then in specific environments have subclasses like "httpd::vhost1", "httpd::vhost2", etc? How will the module fileserving work? The autoloader will not support having one

[Puppet Users] Struggling to get Hiera to work

2013-03-04 Thread Jonathan Gazeley
I'm setting up Hiera in my multi-environment puppetmaster for the first time. I've written /etc/puppet/hiera.yaml, defined the hierarchies and created a couple of data files with sample data in them. When queried from the commandline, it works: [jg4461@puppet ~]$ hiera -d -c /etc/puppet/hier

Re: [Puppet Users] Struggling to get Hiera to work

2013-03-05 Thread Jonathan Gazeley
DR: I turned it off and on again ;) Cheers, Jonathan On 05/03/13 07:34, Denmat wrote: Hi, You can run the master in debug mode and it will show you where puppet is looking for the hiera files. Give it a whirl, Den On 04/03/2013, at 22:49, Jonathan Gazeley wrote: I'm setting up Hiera i

[Puppet Users] Puppet and ClusterSSH

2013-03-08 Thread Jonathan Gazeley
I use ClusterSSH for prodding my Puppet-managed servers occasionally. I'd like a way of generating my .csshrc automatically so it always includes new servers. I would also like this .csshrc to include environment information, formatted like this: environment1 = node1.test.com node2.test.com no

Re: [Puppet Users] Re: Moving to Chef..

2013-03-12 Thread Jonathan Gazeley
No solution is ever 100% perfect. However, it seems a bit extreme to discard all the investment in time and switch to a different system, which will probably come with its own entertaining selection of bugs and limitations. (Disclaimer: I have no experience with Chef, but I stand by my opening

[Puppet Users] Using puppet to install puppet modules

2013-04-26 Thread Jonathan Gazeley
Hi people, I use puppet forge to install various modules on my puppetmaster. I'm thinking about the build process if I build a new puppetmaster. Manually reinstalling the modules is prone to error if I forget which modules I used to have. I looked at this module[1] as a way of making puppet

[Puppet Users] Hiera lookups in templates

2013-05-10 Thread Jonathan Gazeley
Hi, I'm having a problem accessing Hiera data from within templates. Yes, I know this is not the recommended way to access Hiera data, but in my use case I think it will be easier overall. In manifests, this code works: { ip => hiera('jrs_config_server1'), } In a template, part of the sam

Re: [Puppet Users] Re: Hiera lookups in templates

2013-05-10 Thread Jonathan Gazeley
c /path/to/hiera.yaml jrs_config_server1 fqdn=hostname Cheers, Jon On Friday, May 10, 2013 12:18:22 PM UTC+1, Jonathan Gazeley wrote: Hi, I'm having a problem accessing Hiera data from within templates. Yes, I know this is not the recommended way to access Hiera data, bu

Re: [Puppet Users] Re: Hiera lookups in templates

2013-05-13 Thread Jonathan Gazeley
r —no-daemonize —debug Now when you run puppet you should see the Hiera lookups happening as the catalog is compiled, this might help you pinpoint the problem.. On Friday, May 10, 2013 3:46:28 PM UTC+1, Jonathan Gazeley wrote: Hi Jon, Thanks for your tip. I had made a typo in my yaml w

[Puppet Users] Puppet/Nagios/PuppetDB slow performance

2013-05-24 Thread Jonathan Gazeley
Hi all, For months now I've been using Puppet with PuppetDB backend to manage my Nagios configs. We now have 1200+ services being checked and including servicedependency, host, hostdependency, command and other Nagios resources being managed, that's about 3000 resources in total. Unfortunatel

Re: [Puppet Users] Puppet/Nagios/PuppetDB slow performance

2013-06-05 Thread Jonathan Gazeley
On 25/05/13 17:24, David Schmitt wrote: On 2013-05-25 10:11, Alexander Bien wrote: On 24.05.2013 16:58, Ken Barber wrote: Its probably the nagios resource, its well known for not scaling when the files contain a lot of entries. That would explain why your PuppetDB is showing low load - as its p

[Puppet Users] Segmentation fault in methodhelper.rb

2013-06-27 Thread Jonathan Gazeley
Hi chaps, Since overnight, my puppetmaster has been crashing every now and then (it has crashed about 5 times this morning). We upgraded to puppet 3.2.2 about a week ago but the problems only started this morning. There was nothing in the logs so I ran it in debug mode and captured this: /us

[Puppet Users] Puppet Nagios resources

2013-07-22 Thread Jonathan Gazeley
Hi all, We've been using Puppet to write out our Nagios configs for ages. I think I understand it pretty well. Recently we've had reason to set 'target' on all Nagios resources, based on the fqdn of the monitored host. However I don't want to have to set 'target' by hand on all Nagios resourc

Re: [Puppet Users] Puppet Nagios resources

2013-07-23 Thread Jonathan Gazeley
tes => "$manufacturer $productname", target => "/etc/nagios/conf.d/puppet/$hostname.cfg", } etc. On Mon, Jul 22, 2013 at 10:08 AM, Jonathan Gazeley <mailto:jonathan.gaze...@bristol.ac.uk>> wrote: Hi all, We've been using Puppet to wri

Re: [Puppet Users] Puppet Nagios resources

2013-07-23 Thread Jonathan Gazeley
On 23/07/13 02:50, Pete Brown wrote: I find it best to not use a target for the nagios resources. The provider is only able to delete them if you use the default locations. Yes, I'm aware of the limitations and have avoided setting the target until now. Unfortunately our Nagios config is so la

[Puppet Users] Nagios_servicedependency oddness

2013-07-23 Thread Jonathan Gazeley
I've had many nagios_servicedependency declarations in my manifests for ages. This morning I added 'target' parameters to these blocks, like this: @@nagios_servicedependency { "check_uptime_${::fqdn}": host_name => $::fqdn, dependent_host_name => $::fqdn,

[Puppet Users] Puppet master concurrency

2013-07-29 Thread Jonathan Gazeley
We've got quite a few puppet nodes now (50-60, and increasing), and some have quite large catalogues. I've noticed that sometimes too many nodes attempt to check in at once that their puppet runs will time out or fail for other reasons. Certainly if I kick off all nodes simultaneously using cl

Re: [Puppet Users] Puppet master concurrency

2013-07-29 Thread Jonathan Gazeley
On 29/07/13 12:20, Matthew Burgess wrote: On 29 July 2013 11:52, Jonathan Gazeley <mailto:jonathan.gaze...@bristol.ac.uk>> wrote: I'd like to know how to increase the number of simultaneous runs the puppetmaster can handle because as we keep increasing the number o

Re: [Puppet Users] puppetlabs/firewall and fail2ban

2013-11-01 Thread Jonathan Gazeley
Have a look at pam_shield. It can protect any services that use PAM for authentication (i.e. ssh, authenticated mail, but not web). It can use either null-routing or iptables rules for blocking. If you set it to use null-routing then it doesn't interfere with puppetlabs/firewall - we are using

[Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Jonathan Gazeley
Hi chaps, I run all my Puppetised servers on CentOS 6.4. Overnight there were a load of updates for CentOS including an update to openssl-1.0.1e-15.el6. Since installing the updates, PuppetDB is no longer working and seems to be having troubles with SSL. All my puppet nodes show: Error: Cou

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Jonathan Gazeley
On 27/11/13 14:55, Ken Barber wrote: This all sounds pretty serious, but something isn't quite right here with the information you have provided. This error: >puppetdb.resnet.bris.ac.uk:8081: Connection refused - connect(2) Its very rare that a bug in a running piece of code/framework whatever

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Jonathan Gazeley
Oops, I was a bit premature firing off my previous response. Here are the responses to your questions - and thanks very much for your help. Sorry for the massive email... On 27/11/13 14:55, Ken Barber wrote: * What_exact_ version of the JDK is PuppetDB using? The output of 'jinfo ' (pid of th

Re: [Puppet Users] Problem with PuppetDB and OpenSSL

2013-11-27 Thread Jonathan Gazeley
Hmm, well I removed java-1.6.0-openjdk and installed java-1.7.0-openjdk. Reinstalled puppetdb, which pulled java-1.6.0-openjdk back in again, so the two javas were installed simultaneously. Restarted puppetdb and puppetmaster and everything works again I have no idea what was wrong. -- You

[Puppet Users] Nagios_contact in multiple contactgroups

2014-01-13 Thread Jonathan Gazeley
quot;unifiedusers") create_resources("nagios::user", $unifiedusers) ## common.yaml unifiedusers: jg4461: nagiosuser: true comment: Jonathan Gazeley gid: resnet uid: 56933 groups: - sudoers - resnet - netops - superadmins ## nagios_c

Re: [Puppet Users] Re: Nagios_contact in multiple contactgroups

2014-01-14 Thread Jonathan Gazeley
On 13/01/14 23:00, jcbollinger wrote: Puppet expects a comma-delimited string of contact group names (as will appear in the target config file) rather than an array. Upon receiving an array, it somehow chooses just one of its elements. It seems your second suggestion was correct. The nagios_*

Re: [Puppet Users] Re: Nagios_contact in multiple contactgroups

2014-01-15 Thread Jonathan Gazeley
On 14/01/14 23:27, jcbollinger wrote: On Tuesday, January 14, 2014 5:42:54 AM UTC-6, Jonathan Gazeley wrote: This is ridiculous and bizarre behaviour and seems to defy the whole point of having a managed resource, and there is an old, open bug for it. http

[Puppet Users] "You need rubygems to use Hiera"

2014-01-20 Thread Jonathan Gazeley
Hi chaps, This morning I started running into an error. All my nodes started failing with: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: You need rubygems to use Hiera at /home/ispms/PUPPETROOT/environments/common/modules/uob_ntp/manifests/init.pp:5 on node dhcp

[Puppet Users] Re: "You need rubygems to use Hiera"

2014-01-20 Thread Jonathan Gazeley
s and doing "sudo yum reinstall puppet" put back the files and it now works again. Cheers, Jonathan On 20/01/14 12:19, Jonathan Gazeley wrote: Hi chaps, This morning I started running into an error. All my nodes started failing with: Error: Could not retrieve catalog from remot

[Puppet Users] Hiera seems to be using stale data

2014-02-19 Thread Jonathan Gazeley
Hi chaps, I'm using Hiera in a light way to store a few global values for my servers, including the site-wide SMTP relay etc. Yesterday I changed one of the values to reflect my organisation's new SMTP server, but the change hasn't been applied to my nodes. I'm using camptocamp/postfix to con

[Puppet Users] Puppet always recreates Nagios_hosts

2014-04-07 Thread Jonathan Gazeley
I've been using puppet with nagios for ages without any problems. Recently I looked into the puppet logs on my nagios server and it seems on every puppet run, puppet throws an error and recreates all the nagios_host objects (see below), even if none of them have been changed. I haven't changed

Re: [Puppet Users] Announce: Puppet 3.5.0 now available!

2014-04-07 Thread Jonathan Gazeley
On 07/04/14 15:08, Kinzel, David wrote: This does not appear to exist athttp://downloads.puppetlabs.com/puppet/puppet-3.5.0.tar.gz yet... Can someone fix it? This release of puppet was withdrawn after bugs were identified. https://groups.google.com/forum/#!msg/puppet-users/uJCKQ7uUlCs/46Hlk

Re: [Puppet Users] Puppet always recreates Nagios_hosts

2014-04-07 Thread Jonathan Gazeley
On 07/04/14 14:10, Felix Frank wrote: Ugh, dammit. This does look like a bug. What version of Puppet is this? Can you open a Jira issue? This is Puppet 3.4.3. I've logged issue PUP-2170 - let me know if you want me to provide any more info. Thanks, Jonathan -- You received this message bec

[Puppet Users] PuppetDB intermittent crashing

2014-04-28 Thread Jonathan Gazeley
Hi folks, I'm using Puppet with PuppetDB running on the same machine, but with the Postgresql database on an external server. Several times a day, PuppetDB seems to crash with errors like the one below. Nodes are then unable to check in, although Puppet will restart its own PuppetDB service on

  1   2   >