[Puppet Users] classes with parameters

2011-09-06 Thread David Kavanagh
I have a node def that refers to 2 classes like this; node default { class { [ eucalyptus, eucalyptus::nc ]: } } The 2nd "requires" the first class. Now, I've added parameters to the 2nd class and would like to set values here. What is the appropriate way to do that? I'm looking at the

[Puppet Users] setting facts in dashboard

2011-08-24 Thread David Kavanagh
I'd like to set some values in the dashboard that would apply to a bunch of nodes. I'm thinking the best way is if those things become facts. Then, I'd just have puppet scripts that look for those things (update config files and restart services). Can facts be set in the dashboard? If so, I'm not s

Re: [Puppet Users] property file provider

2011-08-23 Thread David Kavanagh
yes, That's actually does. I wasn't finding much to read about this. David On Tue, Aug 23, 2011 at 5:12 PM, Stefan Schulte wrote: > On Tue, Aug 23, 2011 at 04:27:30PM -0400, David Kavanagh wrote: >> I understand regular expressions. been doing them a long time in >> va

Re: [Puppet Users] property file provider

2011-08-23 Thread David Kavanagh
Like a charm! What designates the fields in the regex? I'm having trouble finding documentation on that part. David On Tue, Aug 23, 2011 at 4:59 PM, Stefan Schulte wrote: > On Tue, Aug 23, 2011 at 04:19:40PM -0400, David Kavanagh wrote: >> for reference, here's how th

Re: [Puppet Users] property file provider

2011-08-23 Thread David Kavanagh
I understand regular expressions. been doing them a long time in various languages. But, how are the fields determined from this regex? David On Tue, Aug 23, 2011 at 4:19 PM, David Kavanagh wrote: > for reference, here's how the regex matches the trailing comment; > http://ru

Re: [Puppet Users] property file provider

2011-08-23 Thread David Kavanagh
for reference, here's how the regex matches the trailing comment; http://rubular.com/r/vJUtBWpB6J On Tue, Aug 23, 2011 at 4:17 PM, David Kavanagh wrote: > Hi Stefan, > I have it working using your suggestions (I took out my hacks). I > adjusted the match regex to match the quote

Re: [Puppet Users] property file provider

2011-08-23 Thread David Kavanagh
even if there isn't a comment after the value, it adds a "#" at the end of line. David On Tue, Aug 23, 2011 at 11:45 AM, Stefan Schulte wrote: > On Tue, Aug 23, 2011 at 10:32:54AM -0400, David Kavanagh wrote: >> I did get this working. In a nutshell, I modified to_line lik

Re: [Puppet Users] Difference between include and require

2011-08-23 Thread David Kavanagh
It seems there's a problem including a class multiple times. By stating that one class requires another, you formalize the dependency, but don't actually have an include. What you do then is to include the class in your main implementation which uses that class. That way, if you have several classe

Re: [Puppet Users] property file provider

2011-08-23 Thread David Kavanagh
lines key="value" I also need to handle this; key="value" #optional comment I could add to the regex for the line matching (in record_line :parsed). Then, I'm not sure how to get that into to_line for output. David On Mon, Aug 22, 2011 at 8:48 PM, David Kavanagh wrote:

Re: [Puppet Users] property file provider

2011-08-22 Thread David Kavanagh
Thanks, I'll try to work through your suggestions. I took this from the nova_config stuff on github, so that was my example. David On Mon, Aug 22, 2011 at 7:36 PM, Stefan Schulte wrote: > On Mon, Aug 22, 2011 at 06:33:27PM -0400, David Kavanagh wrote: >> I'm working on a ty

[Puppet Users] property file provider

2011-08-22 Thread David Kavanagh
I'm working on a type/provider for the eucalyptus.conf file. What I have generally works for modifying properties. I have a couple of issues and not being very experienced with Ruby and custom providers, I wonder if anyone can help? The code is included below. The key/value constructs in the file l

Re: [Puppet Users] class locating problem

2011-08-08 Thread David Kavanagh
gn scott wrote: > On 08/08/2011 05:55 PM, David Kavanagh wrote: >> >> eucalyptus/modules/ntp/manifests/init.pp (defines class eucalyptus::ntp) >> > > try putting > >        /eucalyptus/modules > > on your module path. > > -- > vagn > > -- > Y

[Puppet Users] class locating problem

2011-08-08 Thread David Kavanagh
I have a problem importing a class. Here's they layout eucalyptus/manifests/init.pp (imports eucalyptus::ntp) eucalyptus/modules/ntp/manifests/init.pp (defines class eucalyptus::ntp) when I run puppet apply, specifying the modulepath to be the parent directory of "eucalyptus", I see this; Could

[Puppet Users] variable/function evaluation

2011-07-22 Thread David Kavanagh
I have this in a class: $version = '2.0.3', $repourl = "http://www.eucalyptussoftware.com/downloads/repo/eucalyptus/$version/yum/downcase($operatingsystem)/$architecture" repourl evaluates to: http://www.eucalyptussoftware.com/downloads/repo/eucalyptus//yum/downcase(CentOS)/x86_64 I included t

[Puppet Users] tolower()??

2011-07-21 Thread David Kavanagh
I need to convert a value from facter to lower case for inclusion in a path. Is there a built-in function for that? David -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To uns

Re: [Puppet Users] Using with EC2 (and auto-scaling)

2011-07-21 Thread David Kavanagh
One way is to pass a "role" in via user data which gets written to a file (like /etc/role) and then have a custom fact that reads that. Then, your scripts can key off that to apply the classes for that node type. David On Thu, Jul 21, 2011 at 5:56 AM, Oliver Beattie wrote: > Hi there, > I am try

Re: [Puppet Users] editing property files

2011-04-19 Thread David Kavanagh
David On Tue, Apr 19, 2011 at 1:58 PM, Patrick wrote: > > On Apr 18, 2011, at 6:08 AM, David Kavanagh wrote: > > > I assumed this would be simple. I thought about using augeas, but don't > want to pull that in if I don't really need it. Is there a built-in resource &g

[Puppet Users] editing property files

2011-04-18 Thread David Kavanagh
I assumed this would be simple. I thought about using augeas, but don't want to pull that in if I don't really need it. Is there a built-in resource that I could use to edit property files that I'm missing? Thanks, David -- You received this message because you are subscribed to the Google Groups

Re: [Puppet Users] facter # cores

2011-04-14 Thread David Kavanagh
FWIW, I happened to try on OS X, but our target is many different linux distros. As long as there's some consistency across those. Oh, soon, we'll be supporting Windows server as well. David On Thu, Apr 14, 2011 at 6:20 PM, Daniel Pittman wrote: > On Thu, Apr 14, 2011 at 14:16, D

[Puppet Users] facter # cores

2011-04-14 Thread David Kavanagh
I'd like to use Facter to determine how many cores or processors are available and edit a property file accordingly. I run it on my Mac and get sp_number_processors and on my Centos box, get processorcount. Both are using facter 1.5.8 David -- You received this message because you are subscribed

[Puppet Users] grub config

2011-03-14 Thread David Kavanagh
Has anyone come up with a preferred method of messing with grub? I need to install a hypervisor (like xen or kvm) and modify the grub.conf to make the machine boot from the new kernel. I might mess with Augeas. What do the experts say? David -- You received this message because you are subscribe

Re: [Puppet Users] A question of order

2011-03-14 Thread David Kavanagh
t { class { 'first': stage => pre } class { 'second': stage => main } class { 'third': stage => post } } On Tue, Mar 15, 2011 at 12:13 AM, Nigel Kersten wrote: > On Mon, Mar 14, 2011 at 9:29 AM, David Kavanagh > wrote: > > I understand how be

[Puppet Users] Re: A question of order

2011-03-14 Thread David Kavanagh
I found this, which helps. I'm going to try something based on it. http://projects.puppetlabs.com/issues/5709 On Mon, Mar 14, 2011 at 4:29 PM, David Kavanagh wrote: > I understand how before, requires, etc work. I'm not quite so clear on > stages. > > I have many mo

[Puppet Users] A question of order

2011-03-14 Thread David Kavanagh
I understand how before, requires, etc work. I'm not quite so clear on stages. I have many modules I've created for various configuration items. My site.pp contains a class that simply includes them (some, based on facts). I have a default node that includes the class. That's fine. However, I want

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

2011-02-23 Thread David Kavanagh
Jared, Are you suggesting separate physical subnet, or simply a logical subnet on the same physical network (using netmask)? David On Wed, Feb 23, 2011 at 10:37 AM, Jennings, Jared L CTR USAF AFMC 46 SK/CCI wrote: > +1 for Cobbler. > > At my site, we don't kickstart on the production network, i

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

2011-02-22 Thread David Kavanagh
oper static IP that it should have, > disables DHCP, sets the hostname, sets up NTP, etc. > > > > 7. From now on, it's dead easy to use puppet to install and configure > everything else. > > > > Cheers, > > Jonathan > > > > ---

[Puppet Users] provisioning bare metal (best practices)

2011-02-22 Thread David Kavanagh
I'm about to start playing with Kickstart. I never really had to provision bare servers beyond a normal OS install, so I need something to use along with Puppet. Is there a general consensus on what the best option is? I'd need to set up the node with IP/hostname/role. (I have a custom fact for rol

Re: [Puppet Users] fileserver "Could not retrieve information from source(s)"

2011-02-21 Thread David Kavanagh
Sweet! It was a permissions problem. Just added rw to group and others. It was on the keys subdir where the permissions weren't open enough. I'll have to think about a special keys group that puppet can belong to for better certificate protection on the production servers. Thanks, David On Mon, F

Re: [Puppet Users] Re: fileserver "Could not retrieve information from source(s)"

2011-02-19 Thread David Kavanagh
No. The mount defines varlibeuca as being /var/lib/eucalyptus What's the proper URL for getting at the fileserver mount? That's maybe what was elusive in the docs I was able to find. When the master reports this error: info: File does not exist or is not accessible: /var/lib/eucalyptus/keys/node-pk